-
Notifications
You must be signed in to change notification settings - Fork 55
chore: enforce planning label rules for issues #421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: enforce planning label rules for issues #421
Conversation
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to update the labels used in this PR to match the actual labels we decided to use for planning:
kind/plan-epic
kind/plan-feature
kind/plan-task
related #361 (comment)
c5dda79
to
b5fad92
Compare
b5fad92
to
ed32e1a
Compare
related: kubeflow#327 This new GitHub Actions workflow listens for the 'opened' and 'labeled' events on GitHub issues and ensures any issue opened (or labelled) with a `kind/plan-xxx` label meets the following criteria: - only users listed in the `AUTHORIZED_USER` JSON array can label an issue with the `kind/plan-xxx` label - at most one of the `kind/plan-xxx` labels can exist on a given issue The set of supported/expected `kind/plan-xxx` labels are: - `kind/plan-epic` - `kind/plan-feature` - `kind/plan-task` If an issue (with a `kind/plan-xxx` label) is **opened** by a non-authorized user - the issue will be automatically closed when the GitHub action fires. If an issue is labelled with the `kind/plan-xxx` label by an unauthorized user - the `kind/plan-xxx` label is removed. In both cases, a GitHub comment is added to the issue explaining why the issue was updated by the bot. Please note, when opening a GH issue - **BOTH** the `opened` and `labeled` events will fire (if the issue has a label on it). As such, the GitHub action in this PR was deliberately structured to account for multiple instances running in parallel on the same underlying GitHub issue. Also, this work complements kubeflow#361 - which defines GH issue templates that use the labels in a manner appropriate to satisfy the checks of this action. Signed-off-by: Andy Stoneberg <[email protected]>
ed32e1a
to
a27d378
Compare
Lets see if this works. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: thesuperzapper The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
related: #327
This new GitHub Actions workflow listens for the 'opened' and 'labeled' events on GitHub issues and ensures any issue opened (or labelled) with a
kind/plan-xxx
label meets the following criteria:AUTHORIZED_USER
JSON array can label an issue with thekind/plan-xxx
labelkind/plan-xxx
labels can exist on a given issueThe set of supported/expected
kind/plan-xxx
labels are:kind/plan-epic
kind/plan-feature
kind/plan-task
If an issue (with a
kind/plan-xxx
label) is opened by a non-authorized user - the issue will be automatically closed when the GitHub action fires.If an issue is labelled with the
kind/plan-xxx
label by an unauthorized user - thekind/plan-xxx
label is removed.In both cases, a GitHub comment is added to the issue explaining why the issue was updated by the bot.
Please note, when opening a GH issue - BOTH the
opened
andlabeled
events will fire (if the issue has a label on it). As such, the GitHub action in this PR was deliberately structured to account for multiple instances running in parallel on the same underlying GitHub issue.Also, this work complements #361 - which defines GH issue templates that use the labels in a manner appropriate to satisfy the checks of this action.