Skip to content

Disallow creating new labels #369

@sarina

Description

@sarina

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions