Skip to content

Allow automatic creation of labels via labeler + a custom workflow #467

@llucax

Description

@llucax

What's needed?

Creating labels correctly is a bit cumbersome because there are several steps involved, in particular for part:* labels:

  1. Create the label in GitHub
  2. Add the label to the labeler workflow to automatically label PRs.
  3. Add the label to the keyword labeler to automatically label issues.
  4. Add the label to the issue templates

We can automate most of this with a new workflow that runs on label creation plus allowing automatic creation of labels by the labeler action.

Proposed solution

  • Add a workflow that updates the keyword labeler configuration to add the new label

    When it has the shape of a part:*, it can add it to:

    • the .github/keylabeler.yml file in the labelMappings key
    • the .github/ISSUE_TEMPLATE/bug.yml file in the part field
    • maybe add an entry to the .github/labeler.yml with an empty pattern if it is not present, if that's allowed, to make it easier for users to add a new pattern
  • Enable creation of new labels for the labeler workflow.

    This can simplify creation of part:* labels by just adding them to .github/labeler.yml. Then the previous workflow will be triggered and add the label to the rest of the files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    part:ciAffects the GitHub workflow and other parts for running CItype:enhancementNew feature or enhancement visitble to users

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions