Sync-labels should not remove an unspecified label

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

Nobody has claimed this yet.

Assessment

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

Research direction

Start by locating the handling for sync-labels: true and the labeler.yml label definitions, then inspect any nearby tests for label synchronization. Done means labels absent from labeler.yml remain untouched while labels defined there continue to synchronize, with the behavior covered by tests.

Written by the indexing model from the issue text.

Description

feature request

Description:
I think that even with sync-labels: true, a label which is not defined in labeler.yml at all should not be removed.

Justification:
Some labels might be applied by other means, such as non-labeler workflows marking a PR as 'deployed' for example, which have no file or branch based (or any static/declarative) way of describing when they should exist.

If a label is not even defined according to paths etc., then it should not be removed by labeler - we should assume it has some other source.

If people want labeler to be an absolute source of truth for allowed labels, then an ignore key or similar would do - i.e. to define a list of allowed labels which aren't synchronised.

Are you willing to submit a PR?

Willing but not that familiar.

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.