Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync-labels should not remove an unspecified label #741

Open
OJFord opened this issue Jan 11, 2024 · 2 comments
Open

Sync-labels should not remove an unspecified label #741

OJFord opened this issue Jan 11, 2024 · 2 comments
Labels
feature request New feature or request to improve the current logic

Comments

@OJFord
Copy link

OJFord commented Jan 11, 2024

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.

@OJFord OJFord added feature request New feature or request to improve the current logic needs triage labels Jan 11, 2024
@HarithaVattikuti
Copy link
Contributor

Hello @OJFord
Thank you for creating this feature. We will investigate it and get back to you as soon as we have some feedback.

@abhishekrb19
Copy link

This feature would be a neat addition! If there's a way to differentiate manually added labels from auto-added labels by the labeler, that would be great.

With sync-labels: true, I'd expect the labeler to only sync labels that it had added. We found that the labeler would also spuriously remove labels manually added by maintainers. As a result of that, we set sync-labels: false, so we're having to manually remove any stale labels if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

3 participants