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

Stale action erroneously removed the stale label #690

Closed
Chocobo1 opened this issue Mar 7, 2022 · 1 comment · Fixed by #696
Closed

Stale action erroneously removed the stale label #690

Chocobo1 opened this issue Mar 7, 2022 · 1 comment · Fixed by #696
Labels
bug Something isn't working Stale

Comments

@Chocobo1
Copy link

Chocobo1 commented Mar 7, 2022

Describe your issue

The stale action added stale label and erroneously removed the stale label in the same run.

Please refer to the full log at the bottom of this report.
The action logged Marking this pull request as stale and so far so good. Then the action triggers the following, note the inline comments.

[#15409] 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
[#15409] The stale label should not be removed   # correct
[#15409] Remove the stale label since the pull request has a comment and the workflow should remove the stale label when updated  # wrong, it shouldn't count because the comment was added by stale action itself earlier 
[#15409] The pull request is no longer stale. Removing the stale label...  # wrong

Your stale action configuration

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - name: Mark and close stale PRs
        uses: actions/stale@v4
        with:
          stale-pr-message: "This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity."
          close-pr-message: "This PR was closed because it has been stalled for some time with no activity."
          days-before-stale: -1 # avoid marking issues
          days-before-pr-stale: 60
          days-before-close: -1 # avoid closing issues
          days-before-pr-close: 7
          exempt-all-pr-assignees: true  # avoid stale for all PR with assignees
          exempt-all-pr-milestones: true # avoid stale for all PR with milestones
          operations-per-run: 200

Further context

Relevant pull request: qbittorrent/qBittorrent#15409
Relevant log: https://github.com/qbittorrent/qBittorrent/runs/5400693331?check_suite_focus=true#step:2:7825

  [#15409] Pull request #15409
  [#15409] Found this pull request last updated at: 2022-01-01T07:45:53Z
  [#15409] The option only-labels (​[https://github.com/actions/stale#only-labels​)](https://github.com/actions/stale#only-labels%E2%80%8B)) was not specified
  [#15409] └── Continuing the process for this pull request
  [#15409] Days before pull request stale: 60
  [#15409] The pull request is not closed nor locked. Trying to remove the close label...
  [#15409] ├── The close-pr-label (​[https://github.com/actions/stale#close-pr-label​)](https://github.com/actions/stale#close-pr-label%E2%80%8B)) option was not set
  [#15409] └── Skipping the removal of the close label
  [#15409] This pull request hasn't a stale label
  [#15409] 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
  [#15409] └── Continuing the process for this pull request
  [#15409] This pull request has no milestone
  [#15409] └── Skip the milestones checks
  [#15409] This pull request has no assignee
  [#15409] └── Skip the assignees checks
  [#15409] This pull request is not stale
  [#15409] The option ignore-updates (​[https://github.com/actions/stale#ignore-updates​)](https://github.com/actions/stale#ignore-updates%E2%80%8B)) is disabled. The stale counter will take into account updates and comments on this pull request to avoid to stale when there is some update
  [#15409] This pull request should be stale based on the last update date the 01-01-2022 (2022-01-01T07:45:53Z)
  [#15409] This pull request should be marked as stale based on the option days-before-pr-stale (​[https://github.com/actions/stale#days-before-pr-stale​)](https://github.com/actions/stale#days-before-pr-stale%E2%80%8B)) (60)
  [#15409] Marking this pull request as stale
  [#15409] This pull request is now stale
  [#15409] This pull request is already stale
  [#15409] Checking for label on this pull request
  [#15409] Pull request marked stale on: 2021-11-22T00:51:11Z
  [#15409] Checking for comments on pull request since: 2021-11-22T00:51:11Z
  [#15409] Comments that are not the stale comment or another bot: 1
  [#15409] Pull request has been commented on: true
  [#15409] Days before pull request close: 7
  [#15409] Pull request has been updated: true
  [#15409] 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
  [#15409] The stale label should not be removed
  [#15409] Remove the stale label since the pull request has a comment and the workflow should remove the stale label when updated
  [#15409] The pull request is no longer stale. Removing the stale label...
  [#15409] Removing the label "Stale" from this pull request...
  [#15409] The label "Stale" was removed
  [#15409] Skipping the process since the pull request is now un-stale
  [#15409] 4 operations consumed for this pull request
@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2022

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant