Skip to content

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

Merged

Conversation

andyatmiami
Copy link
Contributor

@andyatmiami andyatmiami commented Jun 13, 2025

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:

  • 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 #361 - which defines GH issue templates that use the labels in a manner appropriate to satisfy the checks of this action.

@paulovmr
Copy link

/ok-to-test

Copy link
Member

@thesuperzapper thesuperzapper left a 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)

@andyatmiami andyatmiami force-pushed the chore/planning-labels-gha branch from c5dda79 to b5fad92 Compare July 8, 2025 20:17
@google-oss-prow google-oss-prow bot added the area/ci area - related to ci label Jul 8, 2025
@andyatmiami andyatmiami force-pushed the chore/planning-labels-gha branch from b5fad92 to ed32e1a Compare July 16, 2025 17:45
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]>
@thesuperzapper thesuperzapper changed the title feat: planning labels validation for epic owners chore: enforce issue planning label rules Jul 24, 2025
@thesuperzapper thesuperzapper changed the title chore: enforce issue planning label rules chore: enforce planning label rules for issues Jul 24, 2025
@andyatmiami andyatmiami force-pushed the chore/planning-labels-gha branch from ed32e1a to a27d378 Compare July 24, 2025 20:30
@google-oss-prow google-oss-prow bot added size/XL and removed size/L labels Jul 24, 2025
@andyatmiami andyatmiami changed the base branch from notebooks-v2 to main July 24, 2025 20:31
@google-oss-prow google-oss-prow bot added size/L and removed size/XL labels Jul 24, 2025
@thesuperzapper
Copy link
Member

Lets see if this works.

/lgtm
/approve

@google-oss-prow google-oss-prow bot added the lgtm label Jul 24, 2025
Copy link

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 73cac81 into kubeflow:main Jul 24, 2025
8 of 9 checks passed
@github-project-automation github-project-automation bot moved this from Needs Triage to Done in Kubeflow Notebooks Jul 24, 2025
@andyatmiami andyatmiami deleted the chore/planning-labels-gha branch August 6, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants