Skip to content
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

Restrict which users can add certain labels to PRs #30599

Open
mikeharder opened this issue Sep 16, 2024 · 1 comment
Open

Restrict which users can add certain labels to PRs #30599

mikeharder opened this issue Sep 16, 2024 · 1 comment

Comments

@mikeharder
Copy link
Member

It has been suggested to restrict which users can add certain labels to PRs. For example, some breaking change labels should only be applied by the breaking change board.

Implementation options:

  • GitHub Action that triggers on pull_request:labeled event, checks user, and removes label if user is not allowed. Simpler, but could be circumvented, say if the action fails to run once when the label was added.
  • GitHub Action that uses timeline events API (https://octokit.github.io/rest.js/v18/#issues-list-events-for-timeline) to block PRs, if the most recent timeline event for a label was added by a disallowed user. Slightly more complex to implement, but more reliable since it would block until it confirms the label was added by the correct user.
@mikekistler
Copy link
Member

There is already an issue open for this in the azure-sdk-tools repo:

Azure/azure-sdk-tools#6035

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants