Skip to content

Use REST API to create labels if they don't exist yet #807

Open
@xander-marjoram

Description

Description:
Add a configuration option which would allow the action to attempt to create new labels if they do not already exist.

Justification:
We have a generator which creates new components inside a monorepo. We use this labeler action to apply labels to pull requests based on which components are included in the pull request.

Currently, the majority of steps in our process are automated (including adding a new entry to our label YML file), however we still need to go to the labels page in the UI to create a new label before it can actually be added to PRs.

It's possible to use the REST API to do this separately, but I wondered whether this functionality might be well-suited as part of this action because it already has the logic to read the configuration and know which labels exist or not.

Are you willing to submit a PR?
Maybe, but I don't know if this idea would be accepted or rejected in principle first.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or request to improve the current logic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions