1
-
2
1
# These are YAML anchor definitions to avoid repetition and make the file more readable
3
2
shared :
4
3
# Automated pull requests from bot users
5
4
is_a_bot : &is_a_bot
6
5
- or :
7
- - " author=cloudpossebot"
8
- - " author=github-actions[bot]"
9
- - " author=dependabot[bot]"
10
- - " author=renovate[bot]"
6
+ - " author=cloudpossebot"
7
+ - " author=github-actions[bot]"
8
+ - " author=dependabot[bot]"
9
+ - " author=renovate[bot]"
11
10
12
11
# Not a bot user
13
12
not_a_bot : ¬_a_bot
14
13
- and :
15
- - " -author=cloudpossebot"
16
- - " -author=github-actions[bot]"
17
- - " -author=dependabot[bot]"
18
- - " -author=renovate[bot]"
14
+ - " -author=cloudpossebot"
15
+ - " -author=github-actions[bot]"
16
+ - " -author=dependabot[bot]"
17
+ - " -author=renovate[bot]"
19
18
20
19
# Contribution is from an external contributor, not part of the organization
21
20
is_external_contributor : &is_external_contributor
22
21
- and :
23
- - " -author=@engineering"
24
- - " -author=@contributors"
25
- - " -author=@admins"
26
- - " -author=@bots"
27
- - " -author=@approvers"
28
- - " -author=@security"
29
- - and : *not_a_bot
22
+ - " -author=@engineering"
23
+ - " -author=@contributors"
24
+ - " -author=@admins"
25
+ - " -author=@bots"
26
+ - " -author=@approvers"
27
+ - " -author=@security"
28
+ - and : *not_a_bot
30
29
31
30
# Default branches
32
31
is_default_branch : &is_default_branch
33
32
- and :
34
- - " base=main"
35
- - " base=master"
33
+ - " base=main"
34
+ - " base=master"
36
35
37
36
# Release branches
38
37
is_release_branch : &is_release_branch
39
38
- and :
40
- - " base~=^release/v\\ d{1,2}$"
39
+ - " base~=^release/v\\ d{1,2}$"
41
40
42
41
# Not a work in progress
43
42
not_wip : ¬_wip
44
43
- and :
45
- - " -title~=^(wip|WIP)"
46
- - " -label~=(WIP|wip|do-not-merge|do not merge|triage|stale|feedback|help needed)"
47
- - ' -draft'
44
+ - " -title~=^(wip|WIP)"
45
+ - " -label~=(WIP|wip|do-not-merge|do not merge|triage|stale|feedback|help needed)"
46
+ - " -draft"
48
47
49
48
# Label indicates some action is needed
50
49
needs_attention : &needs_attention
51
50
- and :
52
- - " label~=(triage|stale|feedback|help needed)"
51
+ - " label~=(triage|stale|feedback|help needed)"
53
52
54
53
# Do not merge this PR
55
54
do_not_merge : &do_not_merge
56
55
- or :
57
- - " label~=(do-not-merge|do not merge)"
58
- - " title~=(do-not-merge|do not merge)"
56
+ - " label~=(do-not-merge|do not merge)"
57
+ - " title~=(do-not-merge|do not merge)"
59
58
60
59
# Is a work in progress
61
60
is_wip : &is_wip
62
61
- or :
63
- - " title~=^(wip|WIP)"
64
- - " label~=(WIP|wip)"
65
- - and : *do_not_merge
66
- - and : *needs_attention
67
- - ' draft '
62
+ - " title~=^(wip|WIP)"
63
+ - " label~=(WIP|wip)"
64
+ - and : *do_not_merge
65
+ - and : *needs_attention
66
+ - " draft "
68
67
69
68
# Not in conflict
70
69
not_in_conflict : ¬_in_conflict
71
70
- and :
72
- - " -conflict"
73
- - " -label~=(conflict)"
71
+ - " -conflict"
72
+ - " -label~=(conflict)"
74
73
75
74
# Properly titled and described
76
75
pr_has_metadata : &pr_has_metadata
77
76
- and :
78
- - " title~=(^[0-9A-Za-z]+)"
79
- - body~=[0-9A-Za-z]{3,}\\s+[0-9A-Za-z]{3,}\\s+[0-9A-Za-z]{3,}
80
- - -body~=(Describe high-level what changed)
77
+ - " title~=(^[0-9A-Za-z]+)"
78
+ - body~=[0-9A-Za-z]{3,}\\s+[0-9A-Za-z]{3,}\\s+[0-9A-Za-z]{3,}
79
+ - -body~=(Describe high-level what changed)
81
80
82
81
# Has reviews and no changes requested
83
82
is_approved : &is_approved
84
83
- and :
85
- - ' #approved-reviews-by>=1'
86
- - ' #changes-requested-reviews-by=0'
87
- - " #review-threads-unresolved=0"
88
- - " #commented-reviews-by=0"
84
+ - " #approved-reviews-by>=1"
85
+ - " #changes-requested-reviews-by=0"
86
+ - " #review-threads-unresolved=0"
87
+ - " #commented-reviews-by=0"
89
88
90
89
# Checks are passing
91
90
checks_are_passing : &checks_are_passing
92
91
- and :
93
- - " #check-pending=0"
94
- - " #status-failure=0"
92
+ - " #check-pending=0"
93
+ - " #status-failure=0"
95
94
96
95
# Only for terraform files
97
96
require_terraform_checks_are_passing : &require_terraform_checks_are_passing
98
97
- or :
99
- - " -files~=\\ .tf$"
100
- - and :
101
- - " check-success=test/bats"
102
- - " check-success=test/terratest"
103
- - -status-failure~=^(terratest|terraform)$
98
+ - " -files~=\\ .tf$"
99
+ - and :
100
+ - " check-success=test/bats"
101
+ - " check-success=test/terratest"
102
+ - -status-failure~=^(terratest|terraform)$
104
103
105
104
# CODEOWNERS check did not run or is not passing
106
105
require_codeowners_checks_are_passing : &require_codeowners_checks_are_passing
107
106
- or :
108
- - " -files=CODEOWNERS"
109
- - and :
110
- - " check-success=validate-codeowners"
107
+ - " -files=CODEOWNERS"
108
+ - and :
109
+ - " check-success=validate-codeowners"
111
110
112
111
# Has changes to terraform code
113
112
is_terraform : &is_terraform
114
113
- and :
115
- - " files~=\\ .tf$"
114
+ - " files~=\\ .tf$"
116
115
117
116
# It's not closed or merged
118
117
is_open : &is_open
119
118
- and :
120
- - -merged
121
- - -closed
119
+ - -merged
120
+ - -closed
122
121
123
122
# Was recently updated one minute ago
124
123
is_recent_commit : &is_recent_commit
125
124
- and :
126
- - commits[*].date_committer > 1 minutes ago
125
+ - commits[*].date_committer > 1 minutes ago
127
126
128
127
# README.md is updated together with README.yaml
129
128
readme_updated : &readme_updated
130
129
- or :
131
- - and :
132
- - -files=README.md
133
- - -files=README.yaml
134
- - and :
135
- - files=README.md
136
- - files=README.yaml
130
+ - and :
131
+ - -files=README.md
132
+ - -files=README.yaml
133
+ - and :
134
+ - files=README.md
135
+ - files=README.yaml
137
136
138
137
# Needs Cloud Posse review
139
138
needs_cloudposse : &needs_cloudposse
140
139
- or :
141
- - " files~=(mergify|settings|dependabot|renovate|CODEOWNERS|\\ .github|Makefile|Dockerfile)"
142
- - " label~=(cloudposse)"
140
+ - " files~=(mergify|settings|dependabot|renovate|CODEOWNERS|\\ .github|Makefile|Dockerfile)"
141
+ - " label~=(cloudposse)"
143
142
144
143
# Has no changes
145
144
has_no_changes : &has_no_changes
146
145
- and :
147
- - " #files=0"
146
+ - " #files=0"
148
147
149
148
# All the rules for the Pull Request
150
149
pull_request_rules :
@@ -291,7 +290,7 @@ pull_request_rules:
291
290
- name : " remove triage label if approved"
292
291
conditions :
293
292
- and : *is_open
294
- - ' #approved-reviews-by>=1'
293
+ - " #approved-reviews-by>=1"
295
294
actions :
296
295
label :
297
296
remove :
@@ -353,9 +352,9 @@ pull_request_rules:
353
352
- and : *is_default_branch
354
353
- " label~=(stale)"
355
354
- or :
356
- - " label~=(feedback)"
357
- - ' #commented-reviews-by > 0'
358
- - ' #changes-requested-reviews-by > 0'
355
+ - " label~=(feedback)"
356
+ - " #commented-reviews-by > 0"
357
+ - " #changes-requested-reviews-by > 0"
359
358
- updated-at < 30 days ago
360
359
actions :
361
360
close :
@@ -405,9 +404,9 @@ pull_request_rules:
405
404
- " no-changes"
406
405
close :
407
406
message : |
408
- This pull request was automatically closed as it no longer contains any changes.
409
-
410
- This typically happens when another merged pull request has already included this request's
407
+ This pull request was automatically closed as it no longer contains any changes.
408
+
409
+ This typically happens when another merged pull request has already included this request's
411
410
proposed modifications into the default branch.
412
411
413
412
- name : welcome new contributors
@@ -422,27 +421,27 @@ pull_request_rules:
422
421
actions :
423
422
comment :
424
423
message : |
425
- Thanks @{{author}} for creating this pull request!
424
+ Thanks @{{author}} for creating this pull request!
426
425
427
426
A maintainer will review your changes shortly. Please don't be discouraged if it takes a while.
428
427
429
428
While you wait, make sure to review our [contributor guidelines](https://github.com/cloudposse/.github/blob/main/CONTRIBUTING.md).
430
429
431
430
> [!TIP]
432
431
> #### Need help or want to ask for a PR review to be expedited?
433
- > Join us on [Slack](https://slack. cloudposse.com) in the `#pr-reviews` channel.
432
+ > Join us on [Slack](https://cloudposse.com/slack ) in the `#pr-reviews` channel.
434
433
435
434
- name : add triage label for new pull requests
436
435
conditions :
437
436
- and : *is_open
438
437
- and : *not_a_bot
439
- - ' #label=0'
438
+ - " #label=0"
440
439
# When the PR is approved, the triage label is removed. Do not add it back
441
- - ' #approved-reviews-by=0'
440
+ - " #approved-reviews-by=0"
442
441
- or :
443
- - created-at > 5 minutes ago
444
- - commits[*].date_committer > 5 minutes ago
445
- - updated-at > 7 days ago
442
+ - created-at > 5 minutes ago
443
+ - commits[*].date_committer > 5 minutes ago
444
+ - updated-at > 7 days ago
446
445
actions :
447
446
label :
448
447
add :
@@ -491,7 +490,7 @@ pull_request_rules:
491
490
> #### Cloud Posse Engineering Team Review Required
492
491
> This pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes.
493
492
>
494
- > To expedite this process, reach out to us on [Slack](https://slack. cloudposse.com) in the `#pr-reviews` channel.
493
+ > To expedite this process, reach out to us on [Slack](https://cloudposse.com/slack ) in the `#pr-reviews` channel.
495
494
496
495
- name : rebase pull request when it's more than 10 commits behind main
497
496
conditions :
@@ -513,10 +512,10 @@ pull_request_rules:
513
512
- name : " Comment on PRs during code freeze and close them"
514
513
conditions :
515
514
- and :
516
- - " base=main" # or whichever branch the freeze applies to
517
- - " created-at > 2024-11-12" # Start date of the code freeze
518
- - " repository-full-name=cloudposse/terraform-aws-components" # Apply only to cloudposse/terraform-aws-components
519
- - " label != force" # Skip PR auto close
515
+ - " base=main" # or whichever branch the freeze applies to
516
+ - " created-at > 2024-11-12" # Start date of the code freeze
517
+ - " repository-full-name=cloudposse/terraform-aws-components" # Apply only to cloudposse/terraform-aws-components
518
+ - " label != force" # Skip PR auto close
520
519
actions :
521
520
close :
522
521
message : |-
@@ -527,7 +526,6 @@ pull_request_rules:
527
526
> All future updates, contributions, and issues should be directed to the respective component repositories in the new organization.
528
527
>
529
528
> [Learn more](https://github.com/cloudposse/terraform-aws-components/issues/1177) about the migration.
530
-
531
529
532
530
# - name: mergeable
533
531
# conditions:
0 commit comments