ADNCD-1948: Add workaround for all PRs being rebuilt after GitHub migration #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On initial load of a PR material (handleGetLatestRevision), store all seen PRs, not just the one we're building. For subsequent loads (handleLatestRevisionSince) behave the same as before, and only store the PR we're building.
Also tried fancier variants where you can configure the behavior per PR material, even allowing to clear the state and rebuild everything. However, there seems to be a GoCD caching bug such that PR material config changes in the UI are properly displayed, but not actually propagated to the PR plugin. It keeps using the old config until GoCD is restarted, or the PR material (and due to dependency the referencing config repo) is removed and readded.