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

Disallow creating new labels #369

Open
sarina opened this issue Apr 21, 2022 · 0 comments
Open

Disallow creating new labels #369

sarina opened this issue Apr 21, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@sarina
Copy link
Contributor

sarina commented Apr 21, 2022

What you want to add

A flag that would give the option to disallow creating new labels.

Why this is needed

I added a new action that allows users to add labels, but they can add arbitrary labels. I'd like to restrict them to adding only labels already on the repo.

Implementation notes

I may have time to tackle this later, but my JS skills are poor. It seems like around here: https://github.com/actions-ecosystem/action-add-labels/blob/main/dist/index.js#L2046-L2052 you add a call to https://github.com/actions-ecosystem/action-add-labels/blob/main/dist/index.js#L12982-L13001 and check if each new label is in the repo, and if not throw it away. Not sure the best way to raise an error or call out the discarded labels to the user.

@sarina sarina added the enhancement New feature or request label Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant