Skip to content

Commit 078f548

Browse files
authored
Create safe-changes.cm
1 parent 1058ade commit 078f548

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.cm/safe-changes.cm

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# -*- mode: yaml -*-
2+
3+
manifest:
4+
version: 1.0
5+
6+
automations:
7+
safe_changes:
8+
# Triggered for any changes that only affect formatting, documentation, tests, or images
9+
if:
10+
- {{ is.formatting or is.docs or is.tests or is.image }}
11+
# Apply a safe change label, approve the PR and explain why in a comment.
12+
run:
13+
- action: add-label@v1
14+
args:
15+
label: 'safe-change'
16+
- action: approve@v1
17+
- action: add-comment@v1
18+
args:
19+
comment: |
20+
This PR is considered a safe change and has been automatically approved.
21+
22+
# These custom expressions are used in the safe_changes automation
23+
is:
24+
formatting: {{ source.diff.files | isFormattingChange }}
25+
docs: {{ files | allDocs }}
26+
tests: {{ files | allTests }}
27+
image: {{ files | allImages }}

0 commit comments

Comments
 (0)