stale
stale copied to clipboard
Enhancement: ignore stale labeling events
Description:
This PR is an alternative to #1310 that I believe will solve the issue more gracefully. The idea is if issue.updated_at is more recent than markedStaleOn and the issue has updated since stale (preserving the 15s 'tolerance' that seems to have mostly worked for a long time) we then check for and "ignore" the adding the stale label event(s).
In other words, dont count adding the stale label towards un-stale-ing an issue. Hopefully preventing things like:
Other notes:
- I updated the PR since opening it to use cached events that are already retrieved in
getLabelCreationDate, so no new API calls - I did use ChatGPT for generating the tests, mostly building the mock client stuff, the rest is mine entirely
Statistics:
Processed PRs: 1
Test Suites: 29 passed, 29 total
Tests: 1359 passed, 1359 total
Snapshots: 0 total
Time: 5.499 s, estimated 7 s
Related issue: See https://github.com/actions/stale/issues/1184 but this is a broader scope
Check list:
- [ ] ~~Mark if documentation changes are required.~~ (I dont think so, but happy to if needed)
- [x] Mark if tests were added or updated to cover the changes.