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 label not removed from issue that had an update #509

Closed
dfawley opened this issue Jun 16, 2021 · 10 comments · Fixed by #519
Closed

stale label not removed from issue that had an update #509

dfawley opened this issue Jun 16, 2021 · 10 comments · Fixed by #519
Labels
bug Something isn't working

Comments

@dfawley
Copy link

dfawley commented Jun 16, 2021

Describe your issue

stale label not removed from issue that had an update.

Your stale action configuration

https://github.com/grpc/grpc-go/blob/master/.github/workflows/stale.yml

    steps:
    - uses: actions/stale@v3
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        days-before-stale: 6
        days-before-close: 7
        only-labels: 'Status: Requires Reporter Clarification'
        stale-issue-label: 'stale'
        stale-pr-label: 'stale'
        operations-per-run: 60
        stale-issue-message: ...
        stale-pr-message: ...

Further context

Issue: grpc/grpc-go#4522
Run: https://github.com/grpc/grpc-go/runs/2841504434?check_suite_focus=true#step:2:94

[#4522] Found this issue last updated at: 2021-06-16T15:04:02Z
[#4522] The option only-labels (​https://github.com/actions/stale#only-labels​) was specified to only process issues and pull requests with all those labels (1)
[#4522] ├── All the required labels are present on this issue
[#4522] └── Continuing the process for this issue
[#4522] Days before issue stale: 6
[#4522] The issue is not closed nor locked. Trying to remove the close label...
[#4522] There is no close label on this issue. Skip
[#4522] This issue has a stale label
[#4522] The option any-of-labels (​https://github.com/actions/stale#any-of-labels​) was not specified
[#4522] └── Continuing the process for this issue
[#4522] This issue has no milestone
[#4522] └── Skip the milestones checks
[#4522] The option exempt-all-assignees (​https://github.com/actions/stale#exempt-all-assignees​) is disabled. Only some specific assignees on this issue will skip the stale process
[#4522] ├── The option exempt-issue-assignees (​https://github.com/actions/stale#exempt-issue-assignees​) is disabled. No specific assignee can skip the stale process for this issue
[#4522] ├── The option exempt-assignees (​https://github.com/actions/stale#exempt-assignees​) is disabled. No specific assignee can skip the stale process for this issue
[#4522] ├── No assignee option was specified to skip the stale process for this issue
[#4522] └── Skip the assignees checks
[#4522] This issue is already stale
[#4522] Checking for label on this issue
[#4522] Issue marked stale on: 2021-06-16T04:52:42Z
[#4522] Checking for comments on issue since: 2021-06-16T04:52:42Z
[#4522] Comments not made by actor or another bot: 0
[#4522] Issue has been commented on: false
[#4522] Days before issue close: 7
[#4522] Issue has been updated: true
[#4522] Stale issue is not old enough to close yet (hasComments? false, hasUpdate? true)
[#4522] 1 operation consumed for this issue

Entries of note from the log above:

Found this issue last updated at: 2021-06-16T15:04:02Z
Issue marked stale on: 2021-06-16T04:52:42Z
Checking for comments on issue since: 2021-06-16T04:52:42Z
Comments not made by actor or another bot: 0
Issue has been commented on: false

Note that it sees my update at 15:04:02, after the marked stale time of 04:52:42. But it says "Comments not made by actor or another bot: 0". What does "actor" mean in this instance?

@dfawley dfawley added the bug Something isn't working label Jun 16, 2021
@luketomlinson
Copy link
Collaborator

Hi @dfawley. We did some work to fix some similar bugs recently. If you point to @main instead of v3 does that work for you? If so, we are releasing a new version soon!

@dfawley
Copy link
Author

dfawley commented Jun 16, 2021

I can try out main and let you know - is main backward compatible with v3?

@C0ZEN
Copy link
Contributor

C0ZEN commented Jun 16, 2021

@dfawley there are breaking changes, but you can refer to the documentation on the main branch (default).

@LekoArts
Copy link

I'm also seeing the same: https://github.com/LekoArts/stale-bot-test/issues/23

I'll try the @main version and report back in 2 days :D

@LekoArts
Copy link

mhh, still doesn‘t work :/
https://github.com/LekoArts/stale-bot-test/issues/24

@luketomlinson
Copy link
Collaborator

@LekoArts @dfawley I think I know why this is happening. Right now, comments that were made by the actor are filtered out. The actor is the person who set it up the workflow see github.actor. I think this is the case to account for bot users using a PAT.

I think one possible (albeit slightly hacky) solution might be to filter out comments based on the stale-issue-message rather than WHO made the comment.

@luketomlinson
Copy link
Collaborator

luketomlinson commented Jun 24, 2021

☝️ cc @Rylan12 I think you made those actor changes originally, what do you think about filtering by comment body rather than author?

I think this might be the same issue you're seeing in #441. Because you are triggering the workflow on_comment, YOU are the actor and your comment doesn't count.

@dfawley
Copy link
Author

dfawley commented Jun 24, 2021

Interesting. Could "commenters to ignore" be configured manually instead of automagically determined based on who committed the configuration?

@Rylan12
Copy link
Contributor

Rylan12 commented Jun 24, 2021

☝️ cc @Rylan12 I think you made those actor changes originally, what do you think about filtering by comment body rather than author?

I think this might be the same issue you're seeing in #441. Because you are triggering the workflow on_comment, YOU are the actor and your comment doesn't count.

Ahh, how ironic...

Filtering based on the comment seems to make sense to me. I know that from my perspective, manually commenting a message identical to the stale message would make sense to be ignored. Idk how often someone would manually comment "marking this issue as stale" and not want it to be treated as being marked as stale. I agree, though, does feel a bit hacky, but I'm not the maintainer here so whatever you think is best seems fine.

As an aside, we (Homebrew) eventually switched away from using @BrewTestBot as our stale actor in favor of the default GitHub actions bot (with the default GITHUB_TOKEN) for unrelated security reasons, so we don't technically need the changes I made in #231 anymore (although I don't think just reverting that is the right move here as the issue solved in that PR is still likely to be a real issue for others).


Just a heads up: I'm on vacation this week so I won't be super quick to respond or be able to test things out. I'll should be fully back next Tuesday.

@Rylan12
Copy link
Contributor

Rylan12 commented Jun 25, 2021

Oh, here's another idea: you could use a markdown comment at the beginning so the comment markdown is this:

<!-- #stale-message -->
This issue has been marked as stale... (whatever the stale-issue-message is)

Since it's a comment, it won't be shown. Then, just ignore any comments that start with that commented-out placeholder.


We do something similar for debugging in some of our automated comments for approval periods to some of our PRs. For example, this comment: Homebrew/brew#11555 (comment) actually contains this markdown (copy and pasted directly from the box that appears when I hit the edit button).

<!-- #review-period-begin -->

Review period will end on 2021-06-18 at 18:14:26 UTC.

We then query the issue comments and filter based on a regex later to find a match for the commented-out text.

This wouldn't be much more work than just checking against the stale-issue-message but feels a bit less hacky to me.

Again, I'm on vacation this week but let me know if I can help when I return.

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

Successfully merging a pull request may close this issue.

5 participants