generated from devnw/oss-template
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(.cm): add .cm files for gitstream
- Loading branch information
1 parent
2c0851f
commit 55e95a5
Showing
6 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- mode: yaml -*- | ||
|
||
manifest: | ||
version: 1.0 | ||
|
||
automations: | ||
safe_changes: | ||
if: | ||
- {{ is.formatting or is.docs or is.tests or is.asset }} | ||
run: | ||
- action: add-label@v1 | ||
args: | ||
label: 'safe-changes' | ||
- action: approve@v1 | ||
|
||
# To simplify the automation, this calculation is placed under a unique YAML key. | ||
# The result is is assigned to `is.formatting`, `is.docs` and `is.tests` which is | ||
# used in the automation above. You can add as many keys as you like. | ||
is: | ||
formatting: {{ source.diff.files | isFormattingChange }} | ||
docs: {{ files | allDocs }} | ||
tests: {{ files | allTests }} | ||
asset: {{ files | match(regex=r/\.(png|svg|gif|css)$/) | every }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# -*- mode: yaml -*- | ||
|
||
manifest: | ||
version: 1.0 | ||
|
||
automations: | ||
the_right_reviewer: | ||
if: | ||
- true | ||
run: | ||
- action: add-comment@v1 | ||
args: | ||
comment: | | ||
{{ repo | explainRankByGitBlame(gt=25) }} | ||
- action: add-reviewers@v1 | ||
args: | ||
reviewers: {{ repo | rankByGitBlame(gt=25) | random }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- mode: yaml -*- | ||
|
||
manifest: | ||
version: 1.0 | ||
|
||
automations: | ||
estimated_time_to_review: | ||
if: | ||
- true | ||
run: | ||
- action: add-label@v1 | ||
args: | ||
label: "{{ calc.etr }} min review" | ||
color: {{ 'E94637' if (calc.etr >= 20) else ('FBBD10' if (calc.etr >= 5) else '36A853') }} | ||
|
||
# To simplify the automation, this calculation is placed under a unique YAML key. | ||
# The result is assigned to `calc.etr` which is used in the automation above. | ||
# You can add as many keys as you like. | ||
calc: | ||
etr: {{ branch | estimatedReviewTime }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# -*- mode: yaml -*- | ||
|
||
manifest: | ||
version: 1.0 | ||
|
||
automations: | ||
deleted: | ||
if: | ||
- {{ has.deleted_files }} | ||
run: | ||
- action: add-label@v1 | ||
args: | ||
label: 'deleted-files' | ||
color: '#DF9C04' | ||
|
||
has: | ||
deleted_files: {{ source.diff.files | map(attr='new_file') | match(term='/dev/null') | some }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# -*- mode: yaml -*- | ||
|
||
manifest: | ||
version: 1.0 | ||
|
||
automations: | ||
no_tests: | ||
if: | ||
- {{ files | match(regex=r/(test|spec)/) | nope }} | ||
run: | ||
- action: add-label@v1 | ||
args: | ||
label: 'missing-tests' | ||
color: '#E94637' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# -*- mode: yaml -*- | ||
|
||
manifest: | ||
version: 1.0 | ||
|
||
automations: | ||
double_review: | ||
if: | ||
- {{ branch | estimatedReviewTime >= 30 }} | ||
- {{ files | length >= 10 }} | ||
- {{ files | match(regex=r/src\//) | some }} | ||
run: | ||
- action: set-required-approvals@v1 | ||
args: | ||
approvals: 2 |