actions / actions/labeler

Create dynamic labels from branch name

Open
#730 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
TypeScript
Stars
2.5k
Forks
492
PR merge metrics
No merged PRs in 30d

Description

Description:
Setting the label according to the branch name -
For example, my branch name is -> release/v0/v0.0.1
My desired label is -> v0.0.1

currently I am using my own action with a condition like this ->
if [[ "$TARGET_BRANCH" =~ ^release/v[0-9]+/v[0-9]+\.[0-9]+\.[0-9]+$ ]];
and then I assigned the label like this ->
LABEL_NAME=$(echo "$TARGET_BRANCH" | cut -d'/' -f 3)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository file, test, or entry point; start by tracing the existing labeler action behavior for pull requests and how it obtains branch names. Reproduce the example branch release/v0/v0.0.1, then verify that the completed behavior derives the label v0.0.1 without the user's separate shell action.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.