-
Notifications
You must be signed in to change notification settings - Fork 418
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
Labeler should never remove labels it has not configured #763
Comments
Hello @silverwind |
I reworded the PR because I think "atomic" is not the right term. Essentially it should:
It will need to use a 1-shot API to achieve this, as 2-shot will always have the race condition. |
We are running into the same issue, where the labeler is removing a label that a different bot added. |
Until this gets fixed, my approach has been registering the labels with a glob pattern that will never match a file (unless the only modified file is named 'THIS-NEVER-MATCHES-A-FILE'): 'your-label':
- all:
- changed-files:
- all-globs-to-all-files: ['THIS-NEVER-MATCHES-A-FILE'] |
See also #741. |
Description:
The label addition is not atomic and there is a small time window after opening a PR where the action will unexpectedly remove user-added labels. Example from here:
I guess the API flow is like this:
GET labels
requestPUT labels
request with previously seen labels, reverting the user's changesAction version:
v5
Platform:
Runner type:
Repro steps:
Expected behavior:
The action should atomically update the labels or at least never removing labels it does not have in its config.
Actual behavior:
The action will remove user-set labels when set within a certain time window.
The text was updated successfully, but these errors were encountered: