Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BC: Do not run stale logic for newly stale objects
https://github.com/jsoref/stale-bot-debug/actions/runs/5828506506/job/15806335430#step:2:97 ::group::[actions#2] Issue actions#2 [actions#2] Issue actions#2 [actions#2] Found this issue last updated at: 2023-08-09T14:33:12Z ... [actions#2] Marking this issue as stale [actions#2] This issue is now stale [actions#2] This issue is already stale At this point, things are already pretty bad. The issue wasn't _already_ stale, it was _just marked_ stale. There was a lot of code trying to keep this state in mind, and it yields some really lousy outcomes... [actions#2] Checking for label on this issue [actions#2] Issue marked stale on: 2023-08-11T03:11:21Z [actions#2] Checking for comments on issue since: 2023-08-11T03:11:21Z Great, so, while the workflow is running, it's looking to see if any new comments have arrived since the workflow itself marked the issue as stale. The odds of there being any are very close to 0, and really there's no point in checking now, it makes much more sense to check the _next_ time the workflow runs. [actions#2] Comments that are not the stale comment or another bot: 0 [actions#2] Issue has been commented on: false [actions#2] Days before issue close: 3 [actions#2] The option remove-stale-when-updated (https://github.com/actions/stale#remove-stale-when-updated) is: true [actions#2] The stale label should not be removed [actions#2] marked stale this run, so don't check for updates Here we finally think about the fact that we're in this edge case. The only thing that makes sense to keep, and which is moved by this change is: [actions#2] Removing all the labels specified via the labels-to-remove-when-stale (https://github.com/actions/stale#labels-to-remove-when-stale) option. [actions#2] Removing the label "label-to-add-when-unstale" from this issue... Error: [actions#2] Error when removing the label: "Label does not exist" We return to nonsensical tasks: [actions#2] Issue has been updated since it was marked stale: false [actions#2] Issue has been updated in the last 3 days: true [actions#2] Stale issue is not old enough to close yet (hasComments? false, hasUpdate? true) Note that it's a really rude behavior to mark an item as stale and close it in the same action. BEHAVIOR CHANGE: This change will force action users to trigger two workflow runs if they want to retain that rude behavior. [actions#2] 5 operations consumed for this issue ::endgroup::
- Loading branch information