RFR: 2420: Remove closed pr from all entries in targetRefPRMap [v2]
Zhao Song
zsong at openjdk.org
Thu Dec 5 18:20:24 UTC 2024
> In [SKARA-1937](https://bugs.openjdk.org/browse/SKARA-1937), we introduced a feature that pull request bot can re-evaluate all PRs when jcheck configuration changes. When implementing it, I let pull request bot maintains a hash map called targetRefPRMap. The key is the name of targetRef and the value is the list of pr which targets to the targetRef. Currently, when a pr is closed, the bot will unlink it with its current targetRef. There was an issue happened recently, there was an entry {pr/96=[pr/97]} in the hash map, and before pr/97 was integrated, the user retargeted the pr from pr/96 to master, so the bot fails to remove the association between pr/96 and pr/97.
>
> I think the right behavior here is that when pull request bot finds an updated pr, it should unlink this pr with all targetRefs and if this pr is still open, the bot should link the pr with current targetRef.
Zhao Song has updated the pull request incrementally with one additional commit since the last revision:
Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestBot.java
Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com>
-------------
Changes:
- all: https://git.openjdk.org/skara/pull/1701/files
- new: https://git.openjdk.org/skara/pull/1701/files/1dde45cf..c52ea15d
Webrevs:
- full: https://webrevs.openjdk.org/?repo=skara&pr=1701&range=01
- incr: https://webrevs.openjdk.org/?repo=skara&pr=1701&range=00-01
Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/skara/pull/1701.diff
Fetch: git fetch https://git.openjdk.org/skara.git pull/1701/head:pull/1701
PR: https://git.openjdk.org/skara/pull/1701
More information about the skara-dev
mailing list