-
Notifications
You must be signed in to change notification settings - Fork 370
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
Problems since moving to v5 - action takes bot comment as a regular update #795
Comments
I have a similar issue, but my scenario is somewhat niche. Would be nice if I could ignore updated from a particular user (which I use to run this action), instead of being hardcoded. I acknowledge this may not be the scenario which you want to optimize the tool for, but if its would be just about exposing a configuration option instead of hardcoding something in then maybe it would be worthy addition? |
This is a totally blocking issue for us in the docs platform. We're forced to revert to the earlier version. |
The actions/stale GitHub Actions v5 has an issue where updates by the GitHub Actions bot are recognized as updates. This causes the bot to not work as intended as the Stale label will be removed. This issue has already been reported at: actions/stale#795 Let's downgrade the actions/stale package to v4 until the bug has been fixed upstream.
@ghogen Can you confirm which version of stale you are on? |
The actions/stale GitHub Actions v5 has an issue where updates by the GitHub Actions bot are recognized as updates. This causes the bot to not work as intended as the Stale label will be removed. This issue has already been reported at: actions/stale#795 Let's downgrade the actions/stale package to v4 until the bug has been fixed upstream.
@luketomlinson |
@luketomlinson Line 1847 is correct - stale should not be removed The issue is https://github.com/MicrosoftDocs/visualstudio-docs/issues/7515 |
The test that leads to incorrect result that "Issue has been updated since it was marked stale" is the following from line 741 of index.js: const issueHasUpdateSinceStale = new Date(issue.updated_at) > new Date(markedStaleOn); We know the value of "markedStaleOn" as it is printed in the log 2022-07-14T00:14:00Z. The issue updated date is also printed at the top of the log screenshot 2022-07-14T00:14:01Z, and it differs by one second. The test returned "true" because the timestamp slightly differs between those two Date objects, even though they represent the same "update" (the application of the stale label). Suggested fix: Change the test to check if the absolute value of the difference between the two Date objects is greater than 1 minute. |
Great find @ghogen! I just merged a PR to fix it. If you're so inclined, you can try pointing your action to |
@luketomlinson, when do you plan to release? |
@derberg done! https://github.com/actions/stale/releases/tag/v5.2.0 (the |
We're looking at the newer activity of the bot and still seeing that the bot's own prior activity (adding comments, adding or removing labels) is still counted as activity on the issue. This is unrelated to the timestamp comparison problem, but it matches the original title of this issue. I'm using "v5" which should pick up the 5.2.0 which I think should have the update. Here's an issue that we processed through the latest version and it decides that the "last updated date" is 9/15/2022 which is when it removed the stale label. The last real update was back in March. https://github.com/MicrosoftDocs/visualstudio-docs/issues/6077 |
@luketomlinson Honestly, I don't see in the logic in processIssues where it supposedly filters out its own activity to measure the last updated date. It looks to me like it just takes "updated_at" from the GitHub API and so where is the intelligence to ignore its own activity? |
Your stale action configuration
Config here -> https://github.com/asyncapi/bundler/blob/master/.github/workflows/stale-issues-prs.yml
Further context
One of examples is this issue -> asyncapi/bundler#34
We run stale action every day.
So one day issue got stale label and comment from bot: https://github.com/asyncapi/bundler/runs/7602251973?check_suite_focus=true
But then, next day, it was "unstaled" with https://github.com/asyncapi/bundler/runs/7622201096?check_suite_focus=true
See the logs:
I can't figure why it decided all suddenly to remove stale label.
Another example, from completely different repo, but with exactly the same configuration -> asyncapi/website#659 (comment)
Issues noticed after moving from
v4.0.0
tov5.1.0
The text was updated successfully, but these errors were encountered: