Skip to content

Commit fd05cac

Browse files
authored
feat: transition to new governance bot (#6228)
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
1 parent cbd397a commit fd05cac

5 files changed

Lines changed: 279 additions & 85 deletions

File tree

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ body:
99
1010
Feature requests are reviewed by maintainers on a best-effort basis. Submitting a request does not guarantee it will be implemented.
1111
12-
**Do NOT begin work on a feature until all blocking labels have been removed from the issue by a maintainer.** These include `kind/proposal`, `needs discussion`, `needs research`, `maintainer only`, `area/security`, `size/large`, `size/x-large`, and `size/xx-large`.
12+
**Do NOT begin work on a feature until all blocking labels have been removed from the issue by a maintainer.** Pull requests linked to issues that still carry blocking labels (`kind/proposal`, `needs discussion`, `needs research`, `maintainer only`, `area/security`, `size/large`, `size/x-large`, `size/xx-large`) will be automatically converted to drafts.
1313
1414
See the [Contributor Guide](https://docs.kargo.io/contributor-guide) for full details on the contribution process.
1515

.github/governance.yaml

Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
# Users with these relationships to the events are counted as maintainers.
2+
maintainerAssociations:
3+
- MEMBER
4+
- OWNER
5+
6+
# Defines all issue automation.
7+
issues:
8+
# At least one label with each of these prefixes must exist on all new issues.
9+
# For any that don't, a label will be automatically added to indicate what
10+
# remains to be added.
11+
requiredLabelPrefixes:
12+
- area
13+
- kind
14+
- priority
15+
16+
# Slash commands available to maintainers on issues.
17+
slashCommands:
18+
discuss:
19+
description: "Add `needs discussion` label; blocks work"
20+
actions:
21+
- addLabels: [needs discussion]
22+
- comment: |
23+
## Discussion Needed
24+
25+
A maintainer has indicated that this issue requires further discussion before any implementation work should begin.
26+
27+
Please do not open a pull request for this issue until the discussion has concluded and all blocking labels have been removed.
28+
29+
duplicate:
30+
description: "Close as duplicate"
31+
requiresArg: true
32+
actions:
33+
- addLabels: [duplicate]
34+
- comment: |
35+
## Duplicate
36+
37+
This has been closed as a duplicate of #{{.Arg}}.
38+
39+
Please follow the linked issue for updates.
40+
- close: true
41+
42+
enterprise:
43+
description: "Close as already planned for Kargo Enterprise"
44+
actions:
45+
- comment: |
46+
## Already Planned for Kargo Enterprise
47+
48+
Thank you for your suggestion. This is something already planned for (or already available in) [Kargo Enterprise](https://akuity.io). As such, it will not be implemented in the open source project.
49+
50+
For more information about enterprise features and support, please contact [Akuity](https://akuity.io) directly.
51+
- close: true
52+
53+
maintainer:
54+
description: "Add `maintainer only` label; blocks external contribution"
55+
actions:
56+
- addLabels: [maintainer only]
57+
- comment: |
58+
## Maintainer Only
59+
60+
A maintainer has indicated that this issue will only be worked on by the maintainer team due to its size, complexity, or sensitivity.
61+
62+
External pull requests for this issue will be closed.
63+
64+
research:
65+
description: "Add `needs research` label; blocks work"
66+
actions:
67+
- addLabels: [needs research]
68+
- comment: |
69+
## Research Needed
70+
71+
A maintainer has indicated that this issue needs further investigation or research before any implementation work should begin.
72+
73+
Please do not open a pull request for this issue until the research has concluded and all blocking labels have been removed.
74+
75+
unblock:
76+
description: "Remove process-blocking labels; unblocks work"
77+
actions:
78+
- removeLabels: [kind/proposal, needs discussion, needs research]
79+
- comment: |
80+
## Unblocked for Contribution
81+
82+
A maintainer has unblocked this issue for external contribution. Process-blocking labels have been removed.
83+
84+
If you would like to work on this, please comment to indicate your intent.
85+
86+
Wait for a maintainer to acknowledge your comment and formally assign the issue to you before starting work. This ensures multiple contributors do not duplicate effort on the same issue.
87+
88+
When you open a pull request, reference this issue using `Closes #<number>`.
89+
90+
Before starting, confirm the issue has no remaining blocking labels. See the [Contributor Guide](https://docs.kargo.io/contributor-guide) for details.
91+
92+
93+
# Defines all pull request automation.
94+
pullRequests:
95+
# Criteria under which a PR is exempt from policy enforcement. Any one
96+
# matching criterion exempts the PR (OR semantics). Slash commands like
97+
# /policy bypass exemptions and always re-evaluate.
98+
exemptions:
99+
# Policy doesn't apply to PRs authored by maintainers.
100+
maintainers: true
101+
# Bot-authored PRs (e.g. dependabot) skip policy.
102+
bots: true
103+
# Drive-by typo fixes are exempt — saves the friction of opening an
104+
# issue for a few-line cleanup.
105+
maxChangedLines: 5
106+
# Doc-only and chore PRs are exempt. Patterns are gitignore-style.
107+
pathPatterns:
108+
- 'README.md'
109+
- 'docs/**/*.md'
110+
111+
# Defines how to handle PRs that aren't linked to an issue.
112+
onNoLinkedIssue:
113+
actions:
114+
- addLabels:
115+
- policy/no-linked-issue
116+
- comment: |
117+
## Automated Policy Notice
118+
119+
This pull request has been converted to a draft because it does not reference an unblocked issue. Maintainers do not routinely review drafts.
120+
121+
All contributions to Kargo require a linked, unblocked issue. This ensures that proposed changes have been reviewed by maintainers before effort is invested.
122+
123+
**To move forward:**
124+
125+
1. Open a [Bug Report](https://github.com/akuity/kargo/issues/new?template=bug_report.yml) or [Feature Request](https://github.com/akuity/kargo/issues/new?template=feature_request.yml)
126+
2. Wait for a maintainer to review the issue and remove any blocking labels
127+
3. Update this PR's description, linking to the issue using `Closes #<number>`
128+
4. Ensure the implementation in this PR is consistent with discussion points in the linked issue
129+
5. Mark the PR ready for review
130+
131+
See the [Contributor Guide](https://docs.kargo.io/contributor-guide) for full details.
132+
- convertToDraft: true
133+
134+
# Defines how to handle PRs that are linked to issues bearing labels that
135+
# indicate the PR is either premature or should be worked on only by a
136+
# maintainer.
137+
onBlockedIssue:
138+
blockingLabels:
139+
- area/security # Security related issues are are off-limits to all but maintainers.
140+
- kind/proposal # If this label hasn't been removed, maintainers aren't yet bought into the idea.
141+
- maintainer only # Generic indicator that the issue is off-limits to all but maintainers.
142+
- needs discussion # If this label hasn't been removed, maintainers feel the issue requires more discussion before moving forward.
143+
- needs research # If this label hasn't been removed, maintainers feel the issue requires more research before moving forward.
144+
# Changes estimated to be very large are off-limits to all but maintainers.
145+
- size/large
146+
- size/x-large
147+
- size/xx-large
148+
actions:
149+
- addLabels:
150+
- policy/blocked-issue # Makes it easier to find PRs that were auto-closed due to policy violations.
151+
- comment: |
152+
## Automated Policy Notice
153+
154+
This pull request has been converted to a draft because the linked issue (#{{.IssueNumber}}) has not been unblocked for external contribution. Maintainers do not routinely review drafts.
155+
156+
The issue currently has the following blocking label(s): {{.BlockingLabels}}
157+
158+
**To move forward:**
159+
160+
1. Wait for a maintainer to review the issue and remove any blocking labels
161+
2. Ensure the implementation in this PR is consistent with discussion points in the linked issue
162+
3. Mark the PR ready for review
163+
164+
See the [Contributor Guide](https://docs.kargo.io/contributor-guide) for full details.
165+
- convertToDraft: true
166+
167+
# Defines actions to take when a PR passes policy — neither onNoLinkedIssue
168+
# nor onBlockedIssue fires. Runs on every opened/reopened/ready_for_review
169+
# event, so this is where stale policy labels from a prior failing
170+
# evaluation get cleaned up.
171+
onPass:
172+
actions:
173+
- removeLabels:
174+
- policy/no-linked-issue
175+
- policy/blocked-issue
176+
177+
# When a PR is opened, it will inherit labels with these prefixes from the
178+
# linked issue.
179+
inheritedLabelPrefixes:
180+
- kind
181+
- area
182+
183+
# At least one label with each of these prefixes must exist on all new PRs.
184+
# For any that don't, a label will be automatically added to indicate what
185+
# remains to be added.
186+
requiredLabelPrefixes:
187+
- area
188+
- kind
189+
- priority
190+
191+
# Slash commands available to maintainers on pull requests.
192+
slashCommands:
193+
discuss:
194+
description: "Add `needs discussion` label; blocks merge"
195+
actions:
196+
- addLabels: [needs discussion]
197+
- comment: |
198+
## Discussion Needed
199+
200+
A maintainer has indicated that further discussion is needed before this pull request can be merged.
201+
202+
Please do not merge this PR until the discussion has concluded and all blocking labels have been removed.
203+
204+
duplicate:
205+
description: "Close as duplicate"
206+
requiresArg: true
207+
actions:
208+
- addLabels: [duplicate]
209+
- comment: |
210+
## Duplicate
211+
212+
This has been closed as a duplicate of #{{.Arg}}.
213+
214+
Please follow the linked issue for updates.
215+
- close: true
216+
217+
enterprise:
218+
description: "Close as already planned for Kargo Enterprise"
219+
actions:
220+
- comment: |
221+
## Already Planned for Kargo Enterprise
222+
223+
Thank you for your suggestion. This is something already planned for (or already available in) [Kargo Enterprise](https://akuity.io). As such, it will not be implemented in the open source project.
224+
225+
For more information about enterprise features and support, please contact [Akuity](https://akuity.io) directly.
226+
- close: true
227+
228+
quality:
229+
description: "Close; does not meet quality standards"
230+
actions:
231+
- comment: |
232+
## 💩 Quality Standards Notice
233+
234+
This pull request has been closed because it does not meet the project's quality standards for review.
235+
236+
All pull requests must be authored and reviewed by a human. AI-assisted coding is acceptable, but every line must be understood and verified by the submitter. Submissions that appear to be generated without meaningful human review will be closed.
237+
238+
If you believe this was in error, please review the [Contributor Guide](https://docs.kargo.io/contributor-guide), ensure your changes meet project standards, and open a new pull request.
239+
- close: true
240+
241+
policy:
242+
description: "Reapply policy; useful if labels were manually modified in a way that would affect the outcome of policy evaluation"
243+
actions:
244+
- applyPRPolicy: true
245+
246+
research:
247+
description: "Add `needs research` label; blocks merge"
248+
actions:
249+
- addLabels: [needs research]
250+
- comment: |
251+
## Research Needed
252+
253+
A maintainer has indicated that further investigation or research is needed before this pull request can be merged.
254+
255+
Please do not merge this PR until the research has concluded and all blocking labels have been removed.
256+
257+
unblock:
258+
description: "Remove blocking labels; unblocks merge"
259+
actions:
260+
- removeLabels: [needs discussion, needs research]
261+
- comment: |
262+
## Unblocked for Merge
263+
264+
A maintainer has removed blocking labels from this pull request. Review may now proceed.

.github/governance.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

.github/workflows/governance.yaml

Lines changed: 0 additions & 31 deletions
This file was deleted.

docs/docs/60-contributor-guide/index.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,20 @@ Exempt pull requests must still adhere to the
7676
[Quality Expectations](#quality-expectations) below — the issue requirement is
7777
the only thing waived.
7878

79+
## Automatic Enforcement
80+
81+
Pull requests that do not observe the process described above are
82+
**automatically converted to a draft**. Maintainers do not routinely review
83+
drafts. The author is expected to address the underlying problems and then
84+
mark the PR ready for review. This applies to:
85+
86+
- PRs with no linked issue.
87+
88+
- PRs linked to issues that still carry blocking labels.
89+
90+
Pull requests covered by [Exceptions](#exceptions) are not subject to this
91+
enforcement.
92+
7993
## Quality Expectations
8094

8195
All pull requests must:

0 commit comments

Comments
 (0)