2
2
3
3
actions :
4
4
# 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
6
6
if : |1
7
7
merge_request.state_is("opened")
8
8
&& merge_request.has_no_label("stale")
@@ -23,7 +23,7 @@ actions:
23
23
MR in the right menu or add comment with `/label ~"do-not-close"`
24
24
25
25
# 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
27
27
if : |1
28
28
merge_request.state_is("opened")
29
29
&& merge_request.has_label("stale")
@@ -62,78 +62,78 @@ label:
62
62
&& merge_request.has_no_user_activity_within("21d")
63
63
64
64
- name : lang/go
65
- color : " $indigo"
65
+ color : $indigo
66
66
script : merge_request.modified_files("*.go")
67
67
68
68
- name : lang/markdown
69
- color : " $indigo"
70
- description : " Modified MarkDown files"
69
+ color : $indigo
70
+ description : Modified MarkDown files
71
71
script : merge_request.modified_files("*.md")
72
72
73
73
- 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
76
76
script : merge_request.modified_files("go.mod", "go.sum")
77
77
78
78
- name : type/ci
79
- color : " $green"
80
- description : " Modified CI files"
79
+ color : $green
80
+ description : Modified CI files
81
81
script : merge_request.modified_files(".gitlab-ci.yml") || merge_request.modified_files("build/")
82
82
83
83
- name : type/deployment
84
- color : " $green"
85
- description : " Modified Deployment files"
84
+ color : $green
85
+ description : Modified Deployment files
86
86
script : merge_request.modified_files("_infrastructure/", "scripts/", "configs/")
87
87
88
88
- name : type/documentation
89
- color : " $green"
90
- description : " Modified Documentation files"
89
+ color : $green
90
+ description : Modified Documentation files
91
91
script : merge_request.modified_files("docs/")
92
92
93
93
- name : type/services
94
- color : " $green"
95
- description : " Modified pkg/services files"
94
+ color : $green
95
+ description : Modified pkg/services files
96
96
script : merge_request.modified_files("internal/pkg/services")
97
97
98
98
# NOTE: This label assume your GitLab supports scoped labels
99
99
# See: https://docs.gitlab.com/ee/user/project/labels.html#scoped-labels
100
100
- 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
103
103
priority : 999
104
104
script : not merge_request.modified_files("*_test.go") && merge_request.modified_files("*.go")
105
105
106
106
# NOTE: This label assume your GitLab supports scoped labels
107
107
# See: https://docs.gitlab.com/ee/user/project/labels.html#scoped-labels
108
108
- 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
111
111
priority : 999
112
112
script : merge_request.modified_files("*_test.go") && merge_request.modified_files("*.go")
113
113
114
114
# NOTE: This label assume your GitLab supports scoped labels
115
115
# See: https://docs.gitlab.com/ee/user/project/labels.html#scoped-labels
116
116
- 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
119
119
priority : 999
120
120
script : merge_request.time_since_last_commit > duration("45d")
121
121
skip_if : merge_request.state in ["merged", "closed", "locked"]
122
122
123
123
# NOTE: This label assume your GitLab supports scoped labels
124
124
# See: https://docs.gitlab.com/ee/user/project/labels.html#scoped-labels
125
125
- 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
128
128
priority : 999
129
129
script : duration("30d") < merge_request.time_since_last_commit < duration("45d")
130
130
skip_if : merge_request.state in ["merged", "closed", "locked"]
131
131
132
132
# NOTE: This label assume your GitLab supports scoped labels
133
133
# See: https://docs.gitlab.com/ee/user/project/labels.html#scoped-labels
134
134
- 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
137
137
priority : 999
138
138
script : duration("14d") < merge_request.time_since_last_commit < duration("30d")
139
139
skip_if : merge_request.state in ["merged", "closed", "locked"]
@@ -144,8 +144,8 @@ label:
144
144
# =>
145
145
# service/vault
146
146
- strategy : generate
147
- description : " Modified this a service directory"
148
- color : " $pink"
147
+ description : Modified this a service directory
148
+ color : $pink
149
149
script : >
150
150
merge_request.modified_files_list("internal/service/")
151
151
| map({ filepath_dir(#) })
@@ -158,8 +158,8 @@ label:
158
158
# =>
159
159
# command/aws/login
160
160
- strategy : generate
161
- description : " Modified this my-command command"
162
- color : " $purple"
161
+ description : Modified this my-command command
162
+ color : $purple
163
163
script : >
164
164
merge_request.modified_files_list("internal/app/my-command/subcommands/")
165
165
| map({ filepath_dir(#) })
0 commit comments