Enhancement: ignore stale labeling events (#1311)

* Ignore updates if only stale label changed after marking

* Initial tests

* test hasOnlyStaleLabelUpdateSince itself

* Actually we should only ignore label events, not unlabel

* Add logger

* Fix test

* Remove trailing whitespace

* Add test for non-label event

* Add boundary test

* Add error handling to hasOnlyStaleLabelAddedSince

* Add comment noting intentional event before boundary

* Remove unneeded optional chaining

* Limit pagination to max 3 calls / 300 events

* Rename method

* Handle invalid timestamps

* Fallback when limit reached

* Oh wow, just realized we already got events...

* Refactor

* Lint

* Build

* Remove events "cache"

* Update index.js
This commit is contained in:
shamoon
2026-03-18 09:25:18 -07:00
committed by GitHub
parent b5d41d4e1d
commit db5d06a4c8
5 changed files with 427 additions and 12 deletions

View File

@@ -129,6 +129,7 @@ class IssuesProcessorBuilder {
async p => (p === 1 ? this._issues : []),
async () => [],
async () => new Date().toDateString(),
undefined,
async (): Promise<IPullRequest> => {
return Promise.resolve({
number: 0,