Dynamic label creation from path

Open
#708 3 comments 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
ci-cd, tooling

Research direction

No file or test is named. Start by reading the repository's current labeler configuration and path-matching behavior, then compare it with the k8s/service/[service] example in the issue. Done means a matcher can derive a path segment and use it to create the corresponding label without updating labeler.yml for each service.

Written by the indexing model from the issue text.

Description

feature request

Description:
We have a directory structure in our repo which looks like this:

k8s
|-> services
  |-> analytics
  |-> catalog
  |-> consul
  ...

It would be great if I could define a "matcher" pattern that could pull part of the path out, and use that in the label name.

k8s/service/[service]:
- k8s/services/**[service]/*

Justification:

This would give us a way to automatically label services without having to remember to update the labeler.yml file each time we add a new path.

Are you willing to submit a PR?
Don't have time right now, just an idea.

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

Getting set up

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.

More from actions/labeler

All issues in actions/labeler

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.