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

Error when removing the label: "Label does not exist" #1165

Closed
2 of 5 tasks
andig opened this issue Jun 29, 2024 · 6 comments
Closed
2 of 5 tasks

Error when removing the label: "Label does not exist" #1165

andig opened this issue Jun 29, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@andig
Copy link

andig commented Jun 29, 2024

Description:
Bot is unable to remove the self-created stale label

Action version:
v9

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:
Processing this issue evcc-io/evcc#14377 the bot has failed to remove it's own label in https://github.com/evcc-io/evcc/actions/runs/9724013582/job/26839788852.

Expected behavior:
"Stale" label removed.

Actual behavior:
From the log:

[#14377] Issue #14377
  [#14377] Found this issue last updated at: 2024-06-29T11:59:32Z
  [#14377] The option only-labels (​[https://github.com/actions/stale#only-labels​)](https://github.com/actions/stale#only-labels%E2%80%8B)) was not specified
  [#14377] └── Continuing the process for this issue
  [#14377] Days before issue stale: 7
  [#14377] The issue is not closed nor locked. Trying to remove the close label...
  [#14377] ├── The close-issue-label (​[https://github.com/actions/stale#close-issue-label​)](https://github.com/actions/stale#close-issue-label%E2%80%8B)) option was not set
  [#14377] └── Skipping the removal of the close label
  [#14377] This issue includes a stale label
  [#14377] The option any-of-labels (​[https://github.com/actions/stale#any-of-labels​)](https://github.com/actions/stale#any-of-labels%E2%80%8B)) was not specified
  [#14377] └── Continuing the process for this issue
  [#14377] This issue has no milestone
  [#14377] └── Skip the milestones checks
  [#14377] The option exempt-all-assignees (​[https://github.com/actions/stale#exempt-all-assignees​)](https://github.com/actions/stale#exempt-all-assignees%E2%80%8B)) is disabled. Only some specific assignees on this issue will skip the stale process
  [#14377] ├── The option exempt-issue-assignees (​[https://github.com/actions/stale#exempt-issue-assignees​)](https://github.com/actions/stale#exempt-issue-assignees%E2%80%8B)) is disabled. No specific assignee can skip the stale process for this issue
  [#14377] ├── The option exempt-assignees (​[https://github.com/actions/stale#exempt-assignees​)](https://github.com/actions/stale#exempt-assignees%E2%80%8B)) is disabled. No specific assignee can skip the stale process for this issue
  [#14377] ├── No assignee option was specified to skip the stale process for this issue
  [#14377] └── Skip the assignees checks
  [#14377] This issue is already stale
  [#14377] Checking for label on this issue
  [#14377] Issue marked stale on: 2024-06-29T11:54:55Z
  [#14377] Checking for comments on issue since: 2024-06-29T11:54:55Z
  [#14377] Comments that are not the stale comment or another bot: 1
  [#14377] Issue has been commented on: true
  [#14377] Days before issue close: 5
  [#14377] The option remove-stale-when-updated (​[https://github.com/actions/stale#remove-stale-when-updated​)](https://github.com/actions/stale#remove-stale-when-updated%E2%80%8B)) is: true
  [#14377] The stale label should not be removed
  [#14377] Issue has been updated since it was marked stale: true
  [#14377] Remove the stale label since the issue has been updated and the workflow should remove the stale label when updated
  [#14377] The issue is no longer stale. Removing the stale label...
  [#14377] Removing the label "Stale" from this issue...
  Error: [#14377] Error when removing the label: "Label does not exist"
  [#14377] Skipping the process since the issue is now un-stale
  [#14377] 3 operations consumed for this issue

Bot config: https://github.com/evcc-io/evcc/blob/b3a6197a2599a4a60f59392502b139877726f6d5/.github/workflows/stale.yaml

Note there are more examples where removing labels does not work, see https://github.com/evcc-io/evcc/actions/runs/9724165084

I don't think it's a permissions issue since permissions are granted through the token and, more specifically, the bot is able to create the labels.

@andig andig added bug Something isn't working needs triage labels Jun 29, 2024
@HarithaVattikuti
Copy link
Contributor

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

@andig
Copy link
Author

andig commented Jul 20, 2024

This is still an issue. Anything I can contribute to get this diagnosed?

@suyashgaonkar
Copy link

Hi @andig , we investigated the issue from the provided details and see no issue with @actions/stale as it able to remove self-created labels with workflow file you provided. Please refer to the screenshot below and following run.
We suggest you to re-check the values passed for exempt-issue-labels and exempt-pr-labels as that might cause the issue you are looking for to be excluded from the workflow run by actions/stale, also we observe that the necessary permissions are missing from the worflow that you share.
Please add the following permissions.

 permissions:
      issues: write
      pull-requests: write"

@andig
Copy link
Author

andig commented Mar 5, 2025

@suyashgaonkar this feels weird. How can the bot be missing write permissions if it is able write labels?

@andig
Copy link
Author

andig commented Mar 5, 2025

@andig
Copy link
Author

andig commented Mar 5, 2025

Given this issue is 9 months old, maybe it has been fixed.

@andig andig closed this as completed Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants