|
1 | 1 | # See: https://getbootstrap.com/docs/5.3/customize/color/#all-colors
|
2 | 2 |
|
3 | 3 | actions:
|
4 |
| - - name: Warn that the ticket if older than 30 days |
| 4 | + - name: Warn if the Merge Request haven't had commit activity for 21 days and will be closed |
5 | 5 | if: |
|
6 |
| - // ignore MRs already closed |
7 | 6 | merge_request.state != "closed"
|
8 |
| - // if last commit happened more than 30 days ago |
9 |
| - && merge_request.time_since_last_commit > duration("30d") |
10 |
| - // but still less than 45 days ago (where we close the MR) |
11 |
| - && merge_request.time_since_last_commit < duration("45d") |
12 |
| - // and the label to disable this feature is not on the MR |
| 7 | + && merge_request.time_since_last_commit > duration("21d") |
| 8 | + && merge_request.time_since_last_commit < duration("28d") |
13 | 9 | && not merge_request.has_label("do-not-close")
|
14 | 10 | then:
|
15 | 11 | - action: comment
|
16 | 12 | message: |
|
17 |
| - Hello! |
| 13 | + :wave: Hello! |
18 | 14 |
|
19 |
| - This Merge Request have not seen any commit activity for 30 days. In an effort to keep our project clean we will automatically close the Merge request after 45 days. |
| 15 | + This Merge Request has not seen any commit activity for 21 days. |
| 16 | + We will automatically close the Merge request after 28 days to keep our project clean. |
20 | 17 |
|
21 |
| - You can add the "do-not-close" label to the Merge Request to disable this behavior. |
| 18 | + To disable this behavior, add the `do-not-close` label to the Merge Request in the right menu or add a comment with `/label ~"do-not-close"`. |
22 | 19 |
|
23 |
| - - name: Close ticket if older than 45 days |
| 20 | + - name: Close the Merge Request if it haven't had commit activity for 28 days |
24 | 21 | if: |
|
25 | 22 | merge_request.state != "closed"
|
26 |
| - && merge_request.time_since_last_commit > duration("45d") |
| 23 | + && merge_request.time_since_last_commit > duration("28d") |
27 | 24 | && not merge_request.has_label("do-not-close")
|
28 | 25 | then:
|
29 | 26 | - action: close
|
30 | 27 | - action: comment
|
31 | 28 | message: |
|
32 |
| - Hello! |
| 29 | + :wave: Hello! |
33 | 30 |
|
34 |
| - This Merge Request have not seen any commit activity for 45 days. In an effort to keep our project clean we will automatically close the Merge request. |
| 31 | + This Merge Request has not seen any commit activity for 28 days. |
| 32 | + To keep our project clean, we will close the Merge request now. |
35 | 33 |
|
36 |
| - You can add the "do-not-close" label to the Merge Request to disable this behavior. |
| 34 | + To disable this behavior, add the `do-not-close` label to the Merge Request in the right menu or add a comment with `/label ~"do-not-close"`. |
37 | 35 |
|
38 | 36 | - name: Approve MR if the 'break-glass-approve' label is configured
|
39 | 37 | if: |
|
|
0 commit comments