Skip to content

Commit 3290675

Browse files
committed
docs: tune the example config
Signed-off-by: Christian Winther <jippignu@gmail.com>
1 parent 881afb2 commit 3290675

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

.scm-engine.example.yml

+29-29
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
actions:
44
# NOTE: depends on the "stale" label further down in the document
5-
- name: "Warn if the Merge Request haven't had commit activity for 21 days and will be closed"
5+
- name: Warn if the Merge Request haven't had commit activity for 21 days and will be closed
66
if: |1
77
merge_request.state_is("opened")
88
&& merge_request.has_no_label("stale")
@@ -23,7 +23,7 @@ actions:
2323
MR in the right menu or add comment with `/label ~"do-not-close"`
2424
2525
# NOTE: depends on the "stale" label further down in the document
26-
- name: "Close the Merge Request if it haven't had commit activity for 28 days"
26+
- name: Close the Merge Request if it haven't had commit activity for 28 days
2727
if: |1
2828
merge_request.state_is("opened")
2929
&& merge_request.has_label("stale")
@@ -62,78 +62,78 @@ label:
6262
&& merge_request.has_no_user_activity_within("21d")
6363
6464
- name: lang/go
65-
color: "$indigo"
65+
color: $indigo
6666
script: merge_request.modified_files("*.go")
6767

6868
- name: lang/markdown
69-
color: "$indigo"
70-
description: "Modified MarkDown files"
69+
color: $indigo
70+
description: Modified MarkDown files
7171
script: merge_request.modified_files("*.md")
7272

7373
- name: dependencies/go
74-
color: "$orange"
75-
description: "Updated Go dependency files like go.mod and go.sum"
74+
color: $orange
75+
description: Updated Go dependency files go.mod or go.sum
7676
script: merge_request.modified_files("go.mod", "go.sum")
7777

7878
- name: type/ci
79-
color: "$green"
80-
description: "Modified CI files"
79+
color: $green
80+
description: Modified CI files
8181
script: merge_request.modified_files(".gitlab-ci.yml") || merge_request.modified_files("build/")
8282

8383
- name: type/deployment
84-
color: "$green"
85-
description: "Modified Deployment files"
84+
color: $green
85+
description: Modified Deployment files
8686
script: merge_request.modified_files("_infrastructure/", "scripts/", "configs/")
8787

8888
- name: type/documentation
89-
color: "$green"
90-
description: "Modified Documentation files"
89+
color: $green
90+
description: Modified Documentation files
9191
script: merge_request.modified_files("docs/")
9292

9393
- name: type/services
94-
color: "$green"
95-
description: "Modified pkg/services files"
94+
color: $green
95+
description: Modified pkg/services files
9696
script: merge_request.modified_files("internal/pkg/services")
9797

9898
# NOTE: This label assume your GitLab supports scoped labels
9999
# See: https://docs.gitlab.com/ee/user/project/labels.html#scoped-labels
100100
- name: go::tests::missing
101-
color: "$red"
102-
description: "The Merge Request did NOT modify Go test files"
101+
color: $red
102+
description: The Merge Request did NOT modify Go test files
103103
priority: 999
104104
script: not merge_request.modified_files("*_test.go") && merge_request.modified_files("*.go")
105105

106106
# NOTE: This label assume your GitLab supports scoped labels
107107
# See: https://docs.gitlab.com/ee/user/project/labels.html#scoped-labels
108108
- name: go::tests::OK
109-
color: "$green"
110-
description: "The Merge Request modified Go test files"
109+
color: $green
110+
description: The Merge Request modified Go test files
111111
priority: 999
112112
script: merge_request.modified_files("*_test.go") && merge_request.modified_files("*.go")
113113

114114
# NOTE: This label assume your GitLab supports scoped labels
115115
# See: https://docs.gitlab.com/ee/user/project/labels.html#scoped-labels
116116
- name: status::age::abandoned
117-
color: "$red"
118-
description: "The most recent commit is older than 45 days"
117+
color: $red
118+
description: The most recent commit is older than 45 days
119119
priority: 999
120120
script: merge_request.time_since_last_commit > duration("45d")
121121
skip_if: merge_request.state in ["merged", "closed", "locked"]
122122

123123
# NOTE: This label assume your GitLab supports scoped labels
124124
# See: https://docs.gitlab.com/ee/user/project/labels.html#scoped-labels
125125
- name: status::age::stale
126-
color: "$red"
127-
description: "The most recent commit is older than 30 days"
126+
color: $red
127+
description: The most recent commit is older than 30 days
128128
priority: 999
129129
script: duration("30d") < merge_request.time_since_last_commit < duration("45d")
130130
skip_if: merge_request.state in ["merged", "closed", "locked"]
131131

132132
# NOTE: This label assume your GitLab supports scoped labels
133133
# See: https://docs.gitlab.com/ee/user/project/labels.html#scoped-labels
134134
- name: status::age::old
135-
color: "$red"
136-
description: "The most recent commit is older than 14 days"
135+
color: $red
136+
description: The most recent commit is older than 14 days
137137
priority: 999
138138
script: duration("14d") < merge_request.time_since_last_commit < duration("30d")
139139
skip_if: merge_request.state in ["merged", "closed", "locked"]
@@ -144,8 +144,8 @@ label:
144144
# =>
145145
# service/vault
146146
- strategy: generate
147-
description: "Modified this a service directory"
148-
color: "$pink"
147+
description: Modified this a service directory
148+
color: $pink
149149
script: >
150150
merge_request.modified_files_list("internal/service/")
151151
| map({ filepath_dir(#) })
@@ -158,8 +158,8 @@ label:
158158
# =>
159159
# command/aws/login
160160
- strategy: generate
161-
description: "Modified this my-command command"
162-
color: "$purple"
161+
description: Modified this my-command command
162+
color: $purple
163163
script: >
164164
merge_request.modified_files_list("internal/app/my-command/subcommands/")
165165
| map({ filepath_dir(#) })

0 commit comments

Comments
 (0)