From zsong at openjdk.org Mon Apr 3 18:25:36 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 3 Apr 2023 18:25:36 GMT Subject: RFR: 1858: Make it possible to configure to require reviewers for "Merge" PRs In-Reply-To: References: Message-ID: On Fri, 31 Mar 2023 22:04:41 GMT, Erik Joelsson wrote: >> In this patch, PR bot has been added with the capability to control the requirement of reviews for merge pull requests. >> >> By default, review is not necessary for merge pull requests. >> >> However, if it is desired to enable the requirement of reviews for merge requests in a repo, the configuration can be added to the PR bot configuration as follows: >> >> { >> "pr": { >> "repositories": { >> "repo1": { >> "reviewMergePullRequest": true >> } >> } >> } >> } >> >> >> Currently, jcheck would run in two places in skara bot. One is in checkRun and one is in IntegrateCommand. The basic idea for us to ignore reviewersCheck for CleanBackport and Merge PullRequest is ignoring the error message. > > jcheck/src/main/java/org/openjdk/skara/jcheck/ReviewersCheck.java line 70: > >> 68: @Override >> 69: Iterator check(Commit commit, CommitMessage message, JCheckConfiguration conf, Census census) { >> 70: if (utils.addsHgTag(commit)) { > > We can't just remove this default behavior in jcheck itself. Then the cli version of jcheck would always require reviewers for a merge commit. We are going to need a new setting in `.jcheck/conf` for this and the PR bot would override it when creating the jcheck instance. Ok, got it. If we have to make changes to `.jcheck/conf`. I will rework on this issue. It would be much easier than current solution. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1495#discussion_r1156304627 From zsong at openjdk.org Mon Apr 3 20:00:25 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 3 Apr 2023 20:00:25 GMT Subject: RFR: 1858: Make it possible to configure to require reviewers for "Merge" PRs [v2] In-Reply-To: References: Message-ID: > In this patch, PR bot has been added with the capability to control the requirement of reviews for merge pull requests. > > By default, review is not necessary for merge pull requests. > > However, if it is desired to enable the requirement of reviews for merge requests in a repo, the configuration can be added to the jcheck configuration as follows: > > [checks "reviewers"] > reviewers=1 > merge=check > > > Currently, jcheck would run in two places in skara bot. One is in checkRun and one is in IntegrateCommand. For the merge pull requests that not require review, the Reviewers check would be skipped. > > The other way to run jcheck in using SKARA CLI. This patch is also compatible with it. Zhao Song has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: SKARA-1858 ------------- Changes: - all: https://git.openjdk.org/skara/pull/1495/files - new: https://git.openjdk.org/skara/pull/1495/files/2293892a..02c54dfb Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1495&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1495&range=00-01 Stats: 262 lines in 12 files changed: 105 ins; 139 del; 18 mod Patch: https://git.openjdk.org/skara/pull/1495.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1495/head:pull/1495 PR: https://git.openjdk.org/skara/pull/1495 From erikj at openjdk.org Mon Apr 3 21:06:29 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 3 Apr 2023 21:06:29 GMT Subject: RFR: 1858: Make it possible to configure to require reviewers for "Merge" PRs [v2] In-Reply-To: References: Message-ID: On Mon, 3 Apr 2023 18:22:49 GMT, Zhao Song wrote: >> jcheck/src/main/java/org/openjdk/skara/jcheck/ReviewersCheck.java line 70: >> >>> 68: @Override >>> 69: Iterator check(Commit commit, CommitMessage message, JCheckConfiguration conf, Census census) { >>> 70: if (utils.addsHgTag(commit)) { >> >> We can't just remove this default behavior in jcheck itself. Then the cli version of jcheck would always require reviewers for a merge commit. We are going to need a new setting in `.jcheck/conf` for this and the PR bot would override it when creating the jcheck instance. > > Ok, got it. If we have to make changes to `.jcheck/conf`. I will rework on this issue. It would be much easier than current solution. I think you misunderstood me. It needs to be possible to configure this from `.jcheck/conf`, but we still want to also be able to control it in the PR bot configuration for a specific repository. In the latter case it would be inserted as a config override when create the jcheck instance. We want to enable this for the jdk main repository, but it should not get inherited by all downstream and project repos. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1495#discussion_r1156455894 From zsong at openjdk.org Tue Apr 4 00:30:00 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Apr 2023 00:30:00 GMT Subject: RFR: 1858: Make it possible to configure to require reviewers for "Merge" PRs [v3] In-Reply-To: References: Message-ID: > In this patch, PR bot has been added with the capability to control the requirement of reviews for merge pull requests. > > By default, review is not necessary for merge pull requests. > > However, if it is desired to enable the requirement of reviews for merge requests in a repo, the configuration can be added to the jcheck configuration as follows: > > [checks "reviewers"] > reviewers=1 > merge=check > > > Currently, jcheck would run in two places in skara bot. One is in checkRun and one is in IntegrateCommand. For the merge pull requests that not require review, the Reviewers check would be skipped. > > The other way to run jcheck in using SKARA CLI. This patch is also compatible with it. Zhao Song has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: SKARA-1858 ------------- Changes: - all: https://git.openjdk.org/skara/pull/1495/files - new: https://git.openjdk.org/skara/pull/1495/files/02c54dfb..838677d9 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1495&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1495&range=01-02 Stats: 249 lines in 12 files changed: 127 ins; 99 del; 23 mod Patch: https://git.openjdk.org/skara/pull/1495.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1495/head:pull/1495 PR: https://git.openjdk.org/skara/pull/1495 From erikj at openjdk.org Tue Apr 4 13:30:09 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 4 Apr 2023 13:30:09 GMT Subject: RFR: 1858: Make it possible to configure to require reviewers for "Merge" PRs [v3] In-Reply-To: References: Message-ID: On Tue, 4 Apr 2023 00:30:00 GMT, Zhao Song wrote: >> In this patch, PR bot has been added with the capability to control the requirement of reviews for merge pull requests. >> >> By default, review is not necessary for merge pull requests. >> >> However, if it is desired to enable the requirement of reviews for merge requests in a repo, the configuration can be added to the PR bot configuration as follows: >> >> { >> "pr": { >> "repositories": { >> "repo1": { >> "reviewMergePullRequest": true >> } >> } >> } >> } >> >> >> Currently, jcheck would run in two places in skara bot. One is in checkRun and one is in IntegrateCommand. For the merge pull requests that not require review, the Reviewers check would be skipped. >> >> The other way to run jcheck in using SKARA CLI. This patch is also compatible with it. > > Zhao Song has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: > > SKARA-1858 bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestBotFactory.java line 119: > 117: var repository = configuration.repository(repo.name()); > 118: var botBuilder = PullRequestBot.newBuilder() > 119: .repo(configuration.repository(repo.name())) Why this change? The variable repository is defined on the line above. bots/pr/src/test/java/org/openjdk/skara/bots/pr/MergeTests.java line 211: > 209: > 210: // Author and committer should updated in the merge commit > 211: var headCommit = pushedRepo.commits(headHash.hex() + "^.." + headHash.hex()).asList().get(0); Does the commit message contain a "Reviewed-by" line? ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1495#discussion_r1157243637 PR Review Comment: https://git.openjdk.org/skara/pull/1495#discussion_r1157248787 From zsong at openjdk.org Tue Apr 4 15:29:47 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Apr 2023 15:29:47 GMT Subject: RFR: 1858: Make it possible to configure to require reviewers for "Merge" PRs [v3] In-Reply-To: References: Message-ID: On Tue, 4 Apr 2023 13:24:41 GMT, Erik Joelsson wrote: >> Zhao Song has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: >> >> SKARA-1858 > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestBotFactory.java line 119: > >> 117: var repository = configuration.repository(repo.name()); >> 118: var botBuilder = PullRequestBot.newBuilder() >> 119: .repo(configuration.repository(repo.name())) > > Why this change? The variable repository is defined on the line above. When merging SKARA-1850 to this one, I must made a mistake. Thanks for catching it! ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1495#discussion_r1157427061 From zsong at openjdk.org Tue Apr 4 15:34:04 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Apr 2023 15:34:04 GMT Subject: RFR: 1858: Make it possible to configure to require reviewers for "Merge" PRs [v3] In-Reply-To: References: Message-ID: On Tue, 4 Apr 2023 13:27:51 GMT, Erik Joelsson wrote: >> Zhao Song has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: >> >> SKARA-1858 > > bots/pr/src/test/java/org/openjdk/skara/bots/pr/MergeTests.java line 211: > >> 209: >> 210: // Author and committer should updated in the merge commit >> 211: var headCommit = pushedRepo.commits(headHash.hex() + "^.." + headHash.hex()).asList().get(0); > > Does the commit message contain a "Reviewed-by" line? Yes, it should have. I will update the test. Thx ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1495#discussion_r1157432646 From zsong at openjdk.org Tue Apr 4 15:50:42 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Apr 2023 15:50:42 GMT Subject: RFR: 1858: Make it possible to configure to require reviewers for "Merge" PRs [v4] In-Reply-To: References: Message-ID: <1eP74HYo6lqHMEjhn3bd8of9qKTX694uFi1aAG68AdQ=.cf8cbf1e-3c3a-43a6-b2a5-377b6d51101d@github.com> > In this patch, PR bot has been added with the capability to control the requirement of reviews for merge pull requests. > > By default, review is not necessary for merge pull requests. > > However, if it is desired to enable the requirement of reviews for merge requests in a repo, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "reviewMergePullRequest": true > } > } > } > } > > > Currently, jcheck would run in two places in skara bot. One is in checkRun and one is in IntegrateCommand. For the merge pull requests that not require review, the Reviewers check would be skipped. > > The other way to run jcheck in using SKARA CLI. This patch is also compatible with it. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: fix some problems ------------- Changes: - all: https://git.openjdk.org/skara/pull/1495/files - new: https://git.openjdk.org/skara/pull/1495/files/838677d9..75a8b7b2 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1495&range=03 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1495&range=02-03 Stats: 4 lines in 2 files changed: 3 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1495.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1495/head:pull/1495 PR: https://git.openjdk.org/skara/pull/1495 From erikj at openjdk.org Tue Apr 4 15:59:14 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 4 Apr 2023 15:59:14 GMT Subject: RFR: 1858: Make it possible to configure to require reviewers for "Merge" PRs [v4] In-Reply-To: <1eP74HYo6lqHMEjhn3bd8of9qKTX694uFi1aAG68AdQ=.cf8cbf1e-3c3a-43a6-b2a5-377b6d51101d@github.com> References: <1eP74HYo6lqHMEjhn3bd8of9qKTX694uFi1aAG68AdQ=.cf8cbf1e-3c3a-43a6-b2a5-377b6d51101d@github.com> Message-ID: <-dynTQLciTUZ38TRESpw-jwlNR9fnM-C1AOxUP9ubag=.0d81b644-3013-413e-9902-8cb6ce552dc7@github.com> On Tue, 4 Apr 2023 15:50:42 GMT, Zhao Song wrote: >> In this patch, PR bot has been added with the capability to control the requirement of reviews for merge pull requests. >> >> By default, review is not necessary for merge pull requests. >> >> However, if it is desired to enable the requirement of reviews for merge requests in a repo, the configuration can be added to the PR bot configuration as follows: >> >> { >> "pr": { >> "repositories": { >> "repo1": { >> "reviewMergePullRequest": true >> } >> } >> } >> } >> >> >> Currently, jcheck would run in two places in skara bot. One is in checkRun and one is in IntegrateCommand. For the merge pull requests that not require review, the Reviewers check would be skipped. >> >> The other way to run jcheck in using SKARA CLI. This patch is also compatible with it. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix some problems Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1495#pullrequestreview-1371306854 From zsong at openjdk.org Tue Apr 4 16:56:07 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Apr 2023 16:56:07 GMT Subject: Integrated: 1858: Make it possible to configure to require reviewers for "Merge" PRs In-Reply-To: References: Message-ID: On Thu, 30 Mar 2023 18:51:31 GMT, Zhao Song wrote: > In this patch, PR bot has been added with the capability to control the requirement of reviews for merge pull requests. > > By default, review is not necessary for merge pull requests. > > However, if it is desired to enable the requirement of reviews for merge requests in a repo, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "reviewMerge": true > } > } > } > } > > > Currently, jcheck would run in two places in skara bot. One is in checkRun and one is in IntegrateCommand. For the merge pull requests that not require review, the Reviewers check would be skipped. > > The other way to run jcheck in using SKARA CLI. This patch is also compatible with it. This pull request has now been integrated. Changeset: fe8efd83 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/fe8efd838011970c034daea65a7d7c0f1ffc9813 Stats: 163 lines in 12 files changed: 135 ins; 7 del; 21 mod 1858: Make it possible to configure to require reviewers for "Merge" PRs Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1495 From zsong at openjdk.org Tue Apr 4 16:56:07 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Apr 2023 16:56:07 GMT Subject: RFR: 1858: Make it possible to configure to require reviewers for "Merge" PRs [v4] In-Reply-To: <1eP74HYo6lqHMEjhn3bd8of9qKTX694uFi1aAG68AdQ=.cf8cbf1e-3c3a-43a6-b2a5-377b6d51101d@github.com> References: <1eP74HYo6lqHMEjhn3bd8of9qKTX694uFi1aAG68AdQ=.cf8cbf1e-3c3a-43a6-b2a5-377b6d51101d@github.com> Message-ID: On Tue, 4 Apr 2023 15:50:42 GMT, Zhao Song wrote: >> In this patch, PR bot has been added with the capability to control the requirement of reviews for merge pull requests. >> >> By default, review is not necessary for merge pull requests. >> >> However, if it is desired to enable the requirement of reviews for merge requests in a repo, the configuration can be added to the PR bot configuration as follows: >> >> { >> "pr": { >> "repositories": { >> "repo1": { >> "reviewMerge": true >> } >> } >> } >> } >> >> >> Currently, jcheck would run in two places in skara bot. One is in checkRun and one is in IntegrateCommand. For the merge pull requests that not require review, the Reviewers check would be skipped. >> >> The other way to run jcheck in using SKARA CLI. This patch is also compatible with it. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix some problems Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1495#issuecomment-1496299817 From zsong at openjdk.org Tue Apr 4 21:18:54 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Apr 2023 21:18:54 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch Message-ID: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> As SKARA-1851 fixed, now we could be able to search for CSR with the fixVersion in .jcheck/conf from the "merge branch". ------------- Commit messages: - SKARA-1850 Changes: https://git.openjdk.org/skara/pull/1496/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1496&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1850 Stats: 142 lines in 4 files changed: 113 ins; 25 del; 4 mod Patch: https://git.openjdk.org/skara/pull/1496.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1496/head:pull/1496 PR: https://git.openjdk.org/skara/pull/1496 From zsong at openjdk.org Tue Apr 4 21:19:57 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Apr 2023 21:19:57 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch In-Reply-To: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> Message-ID: On Fri, 31 Mar 2023 21:27:10 GMT, Zhao Song wrote: > As SKARA-1851 fixed, now we could be able to search for CSR with the fixVersion in .jcheck/conf from the "merge branch". Some tests fail because now, the bot would post a 'fixVersion' comment. I will fix the failed tests if this pr is approved. ------------- PR Comment: https://git.openjdk.org/skara/pull/1496#issuecomment-1496618067 From erikj at openjdk.org Tue Apr 4 21:35:30 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 4 Apr 2023 21:35:30 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch In-Reply-To: References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> Message-ID: On Tue, 4 Apr 2023 21:17:48 GMT, Zhao Song wrote: > Some tests fail because now, the bot would post a 'fixVersion' comment. I will fix the failed tests if this pr is approved. Hold off on that. I'm not sure this new comment is the right solution. I need to think about this. ------------- PR Comment: https://git.openjdk.org/skara/pull/1496#issuecomment-1496632809 From erikj at openjdk.org Tue Apr 4 21:43:11 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 4 Apr 2023 21:43:11 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch In-Reply-To: References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> Message-ID: On Tue, 4 Apr 2023 21:33:20 GMT, Erik Joelsson wrote: > > Some tests fail because now, the bot would post a 'fixVersion' comment. I will fix the failed tests if this pr is approved. > > Hold off on that. I'm not sure this new comment is the right solution. I need to think about this. I think we need to perform the merge in `CSRCommand` for this to work. It would have to instantiate `CheckablePullRequest` and call merge. Not sure if any code can be abstracted out of `CheckRun` to be shared here. At least the logic for extracting the version from `.jcheck/conf` should be possible to share between CheckRun and CSRCommand. Maybe it belongs in `CheckablePullRequest` now? Also in `CSRCommand` we are currently getting the version in the issues loop, so that call is repeated for all issues. Please move the new call to get version to before the loop instead. ------------- PR Comment: https://git.openjdk.org/skara/pull/1496#issuecomment-1496639782 From zsong at openjdk.org Tue Apr 4 21:46:27 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Apr 2023 21:46:27 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch In-Reply-To: References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> Message-ID: On Tue, 4 Apr 2023 21:41:04 GMT, Erik Joelsson wrote: > > > Some tests fail because now, the bot would post a 'fixVersion' comment. I will fix the failed tests if this pr is approved. > > > > > > Hold off on that. I'm not sure this new comment is the right solution. I need to think about this. > > I think we need to perform the merge in `CSRCommand` for this to work. It would have to instantiate `CheckablePullRequest` and call merge. Not sure if any code can be abstracted out of `CheckRun` to be shared here. At least the logic for extracting the version from `.jcheck/conf` should be possible to share between CheckRun and CSRCommand. Maybe it belongs in `CheckablePullRequest` now? > > Also in `CSRCommand` we are currently getting the version in the issues loop, so that call is repeated for all issues. Please move the new call to get version to before the loop instead. I was thinking that perform merge every time maybe not very efficient. But CSR commands might not be used very frequently. I would follow your advice. Thanks! ------------- PR Comment: https://git.openjdk.org/skara/pull/1496#issuecomment-1496642734 From erikj at openjdk.org Tue Apr 4 22:13:50 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 4 Apr 2023 22:13:50 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch In-Reply-To: References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> Message-ID: On Tue, 4 Apr 2023 21:44:10 GMT, Zhao Song wrote: > I was thinking that perform merge every time maybe not very efficient. But CSR commands might not be used very frequently. I would follow your advice. Thanks! A Command only runs once when a user submits it, so doing extra work there isn't a big problem, except maybe if it affects the response time too much. In the old CSRBot, it would have been a problem because it gets triggered to re-check quite often. ------------- PR Comment: https://git.openjdk.org/skara/pull/1496#issuecomment-1496666881 From zsong at openjdk.org Wed Apr 5 18:02:19 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 5 Apr 2023 18:02:19 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch [v2] In-Reply-To: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> Message-ID: > As SKARA-1851 fixed, now we could be able to search for CSR with the fixVersion in .jcheck/conf from the "merge branch". > > There are also some changes to CSR Command in this patch. > > Originally, we need to search for CSR issues in CSR Command because updating CSR progress in PR body needs cooperation between CSR bot and PR bot(so we couldn?t trust the CSR progress in PR body). > > But now, we could force the update of PR body before handling the CSR command. > > The logic of handling CSR command is also easy now. > > For `/csr unneeded`: > > Case 1: There exists CSR progress in the pr body, in this case, the csr requirement cannot be removed and we prompt user that 'withdraw csr first then try again' > Case 2: No CSR progress in the pr body, it means all the issues this pr solves don't have csr issue or the csr issue has already been withdrawn. In this case, we could remove the csr requirement safely. > > For '/csr needed': > > Case 1: The pr has csr label. We just tell the user csr is already require for this pr. > > Case 2: The pr doesn't have csr label. > In this case, there are only three possibilities > (i) CSR is never requested and No CSR issues been created. In this case, we add CSR label to this pr and give user some prompts. > (ii) ALL CSR issues are withdrawn. In this case, we do the same as case (i) > (iii) ALL CSR issues are resolved. In this case, we won't add the csr label again and we just need to tell user there already exists resolved CSR issues. Zhao Song has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: SKARA-1850 ------------- Changes: - all: https://git.openjdk.org/skara/pull/1496/files - new: https://git.openjdk.org/skara/pull/1496/files/1396cfe3..eb7facfc Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1496&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1496&range=00-01 Stats: 195 lines in 5 files changed: 12 ins; 144 del; 39 mod Patch: https://git.openjdk.org/skara/pull/1496.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1496/head:pull/1496 PR: https://git.openjdk.org/skara/pull/1496 From erikj at openjdk.org Wed Apr 5 20:02:53 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 5 Apr 2023 20:02:53 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch [v2] In-Reply-To: References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> Message-ID: <-LbuT82LT3efdIVsYeTDyfsW-4o9xd7G2K0wPrTnQAE=.bd358d50-48f7-40f0-9a37-d11b93b4c1ff@github.com> On Wed, 5 Apr 2023 18:02:19 GMT, Zhao Song wrote: >> As SKARA-1851 fixed, now we could be able to search for CSR with the fixVersion in .jcheck/conf from the "merge branch". >> >> There are also some changes to CSR Command in this patch. >> >> Originally, we need to search for CSR issues in CSR Command because updating CSR progress in PR body needs cooperation between CSR bot and PR bot(so we couldn?t trust the CSR progress in PR body). >> >> But now, we could force the update of PR body before handling the CSR command. >> >> The logic of handling CSR command is also easy now. >> >> For `/csr unneeded`: >> >> Case 1: There exists CSR progress in the pr body, in this case, the csr requirement cannot be removed and we prompt user that 'withdraw csr first then try again' >> Case 2: No CSR progress in the pr body, it means all the issues this pr solves don't have csr issue or the csr issue has already been withdrawn. In this case, we could remove the csr requirement safely. >> >> For '/csr needed': >> >> Case 1: The pr has csr label. We just tell the user csr is already require for this pr. >> >> Case 2: The pr doesn't have csr label. >> In this case, there are only three possibilities >> (i) CSR is never requested and No CSR issues been created. In this case, we add CSR label to this pr and give user some prompts. >> (ii) ALL CSR issues are withdrawn. In this case, we do the same as case (i) >> (iii) ALL CSR issues are resolved. In this case, we won't add the csr label again and we just need to tell user there already exists resolved CSR issues. > > Zhao Song has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: > > SKARA-1850 bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRCommand.java line 55: > 53: writer.println("@" + pr.author().username() + " this pull request must refer to an issue in " + > 54: "[JBS](https://bugs.openjdk.org) to be able to link it to a [CSR](https://wiki.openjdk.org/display/csr/Main) request. To refer this pull request to " + > 55: "an issue in JBS, please use the `/issue` command in a comment in this pull request."); This is unrelated to your change, but these instructions are wrong. The main issue must be set through the title and not the /issue command. Suggestion: "an issue in JBS, please update the title of this pull request to just the issue ID."); bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRCommand.java line 60: > 58: private static void linkReply(PullRequest pr, PrintWriter writer) { > 59: writer.println("@" + pr.author().username() + " please create a [CSR](https://wiki.openjdk.org/display/csr/Main) request for any issue this pr solves" + > 60: " with the correct fix version. This pull request cannot be integrated until the CSR request is approved."); The name of this method `linkReply` implies that it's linking to the issue for which the CSR is needed. I think we should still do that in the normal case where there is only one issue, but we need to use the SolvesTracker to figure out if there are multiple issues first. When there are multiple issues, we can print a different message. I would suggest something like this: Suggestion: writer.println("@" + pr.author().username() + " please create a [CSR](https://wiki.openjdk.org/display/csr/Main) request, with the correct fix version, for at least one of the issues associated with this pull request." + " This pull request cannot be integrated until all the CSR request are approved."); bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRCommand.java line 106: > 104: var csrLinks = new StringBuilder(); > 105: for (Matcher csr : csrs) { > 106: csrLinks.append("[").append(csr.group(1)).append("](").append(csr.group(2)).append(")").append(" "); I think this can be moved into the conditional block below. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRCommand.java line 154: > 152: var csrLinks = new StringBuilder(); > 153: for (Matcher resolvedCSR : resolvedCSRs) { > 154: csrLinks.append("[").append(resolvedCSR.group(1)).append("](").append(resolvedCSR.group(2)).append(")").append(" "); Same here, this could move into the if block below. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1180: > 1178: } > 1179: > 1180: var confFile = localRepo.show(Path.of(".jcheck/conf"), localHash); I recommend using `localRepo.lines` here instead of `show`, then you don't need to be responsible for knowing the encoding of the file contents on line 1183. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 116: > 114: .flatMap(comment -> comment.body().lines()) > 115: .filter(line -> line.startsWith("/csr")) > 116: .collect(Collectors.joining()); I think we only need to look for the last `CSR_NEEDED_MARKER` or `CSR_UNNEEDED_MARKER`. Unless the csr needed state changes from the /csr command, is there anything for the `CheckRun` to update? Reacting to the user issuing `/csr` seems wrong to me because we need the `PullRequestCommandWorkItem` to have finished processing it before `CheckRun` can find anything to act on. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1496#discussion_r1158937825 PR Review Comment: https://git.openjdk.org/skara/pull/1496#discussion_r1158942324 PR Review Comment: https://git.openjdk.org/skara/pull/1496#discussion_r1158932939 PR Review Comment: https://git.openjdk.org/skara/pull/1496#discussion_r1158934935 PR Review Comment: https://git.openjdk.org/skara/pull/1496#discussion_r1158949534 PR Review Comment: https://git.openjdk.org/skara/pull/1496#discussion_r1158955095 From zsong at openjdk.org Wed Apr 5 20:29:31 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 5 Apr 2023 20:29:31 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch [v3] In-Reply-To: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> Message-ID: > As SKARA-1851 fixed, now we could be able to search for CSR with the fixVersion in .jcheck/conf from the "merge branch". > > There are also some changes to CSR Command in this patch. > > Originally, we need to search for CSR issues in CSR Command because updating CSR progress in PR body needs cooperation between CSR bot and PR bot(so we couldn?t trust the CSR progress in PR body). > > But now, we could force the update of PR body before handling the CSR command. > > The logic of handling CSR command is also easy now. > > For `/csr unneeded`: > > Case 1: There exists CSR progress in the pr body, in this case, the csr requirement cannot be removed and we prompt user that 'withdraw csr first then try again' > Case 2: No CSR progress in the pr body, it means all the issues this pr solves don't have csr issue or the csr issue has already been withdrawn. In this case, we could remove the csr requirement safely. > > For '/csr needed': > > Case 1: The pr has csr label. We just tell the user csr is already require for this pr. > > Case 2: The pr doesn't have csr label. > In this case, there are only three possibilities > (i) CSR is never requested and No CSR issues been created. In this case, we add CSR label to this pr and give user some prompts. > (ii) ALL CSR issues are withdrawn. In this case, we do the same as case (i) > (iii) ALL CSR issues are resolved. In this case, we won't add the csr label again and we just need to tell user there already exists resolved CSR issues. Zhao Song has updated the pull request incrementally with two additional commits since the last revision: - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRCommand.java Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRCommand.java Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> ------------- Changes: - all: https://git.openjdk.org/skara/pull/1496/files - new: https://git.openjdk.org/skara/pull/1496/files/eb7facfc..4f62fc60 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1496&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1496&range=01-02 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/skara/pull/1496.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1496/head:pull/1496 PR: https://git.openjdk.org/skara/pull/1496 From zsong at openjdk.org Wed Apr 5 20:29:31 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 5 Apr 2023 20:29:31 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch [v2] In-Reply-To: <-LbuT82LT3efdIVsYeTDyfsW-4o9xd7G2K0wPrTnQAE=.bd358d50-48f7-40f0-9a37-d11b93b4c1ff@github.com> References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> <-LbuT82LT3efdIVsYeTDyfsW-4o9xd7G2K0wPrTnQAE=.bd358d50-48f7-40f0-9a37-d11b93b4c1ff@github.com> Message-ID: On Wed, 5 Apr 2023 19:32:46 GMT, Erik Joelsson wrote: >> Zhao Song has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: >> >> SKARA-1850 > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRCommand.java line 106: > >> 104: var csrLinks = new StringBuilder(); >> 105: for (Matcher csr : csrs) { >> 106: csrLinks.append("[").append(csr.group(1)).append("](").append(csr.group(2)).append(")").append(" "); > > I think this can be moved into the conditional block below. Yes, it will be better > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 116: > >> 114: .flatMap(comment -> comment.body().lines()) >> 115: .filter(line -> line.startsWith("/csr")) >> 116: .collect(Collectors.joining()); > > I think we only need to look for the last `CSR_NEEDED_MARKER` or `CSR_UNNEEDED_MARKER`. Unless the csr needed state changes from the /csr command, is there anything for the `CheckRun` to update? Reacting to the user issuing `/csr` seems wrong to me because we need the `PullRequestCommandWorkItem` to have finished processing it before `CheckRun` can find anything to act on. Think more about it and now I think we don't need to look for anything here. I will remove this code. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1496#discussion_r1158977105 PR Review Comment: https://git.openjdk.org/skara/pull/1496#discussion_r1158975786 From zsong at openjdk.org Wed Apr 5 20:31:18 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 5 Apr 2023 20:31:18 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch [v2] In-Reply-To: <-LbuT82LT3efdIVsYeTDyfsW-4o9xd7G2K0wPrTnQAE=.bd358d50-48f7-40f0-9a37-d11b93b4c1ff@github.com> References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> <-LbuT82LT3efdIVsYeTDyfsW-4o9xd7G2K0wPrTnQAE=.bd358d50-48f7-40f0-9a37-d11b93b4c1ff@github.com> Message-ID: On Wed, 5 Apr 2023 19:53:18 GMT, Erik Joelsson wrote: >> Zhao Song has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: >> >> SKARA-1850 > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1180: > >> 1178: } >> 1179: >> 1180: var confFile = localRepo.show(Path.of(".jcheck/conf"), localHash); > > I recommend using `localRepo.lines` here instead of `show`, then you don't need to be responsible for knowing the encoding of the file contents on line 1183. Sure. Thanks! ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1496#discussion_r1158990576 From zsong at openjdk.org Wed Apr 5 22:45:21 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 5 Apr 2023 22:45:21 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch [v4] In-Reply-To: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> Message-ID: > As SKARA-1851 fixed, now we could be able to search for CSR with the fixVersion in .jcheck/conf from the "merge branch". > > There are also some changes to CSR Command in this patch. > > Originally, we need to search for CSR issues in CSR Command because updating CSR progress in PR body needs cooperation between CSR bot and PR bot(so we couldn?t trust the CSR progress in PR body). > > But now, we could force the update of PR body before handling the CSR command. > > The logic of handling CSR command is also easy now. > > For `/csr unneeded`: > > Case 1: There exists CSR progress in the pr body, in this case, the csr requirement cannot be removed and we prompt user that 'withdraw csr first then try again' > Case 2: No CSR progress in the pr body, it means all the issues this pr solves don't have csr issue or the csr issue has already been withdrawn. In this case, we could remove the csr requirement safely. > > For '/csr needed': > > Case 1: The pr has csr label. We just tell the user csr is already require for this pr. > > Case 2: The pr doesn't have csr label. > In this case, there are only three possibilities > (i) CSR is never requested and No CSR issues been created. In this case, we add CSR label to this pr and give user some prompts. > (ii) ALL CSR issues are withdrawn. In this case, we do the same as case (i) > (iii) ALL CSR issues are resolved. In this case, we won't add the csr label again and we just need to tell user there already exists resolved CSR issues. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: fix problems ------------- Changes: - all: https://git.openjdk.org/skara/pull/1496/files - new: https://git.openjdk.org/skara/pull/1496/files/4f62fc60..e0c399ae Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1496&range=03 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1496&range=02-03 Stats: 122 lines in 6 files changed: 72 ins; 17 del; 33 mod Patch: https://git.openjdk.org/skara/pull/1496.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1496/head:pull/1496 PR: https://git.openjdk.org/skara/pull/1496 From zsong at openjdk.org Wed Apr 5 22:47:13 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 5 Apr 2023 22:47:13 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch [v5] In-Reply-To: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> Message-ID: > As SKARA-1851 fixed, now we could be able to search for CSR with the fixVersion in .jcheck/conf from the "merge branch". > > There are also some changes to CSR Command in this patch. > > Originally, we need to search for CSR issues in CSR Command because updating CSR progress in PR body needs cooperation between CSR bot and PR bot(so we couldn?t trust the CSR progress in PR body). > > But now, we could force the update of PR body before handling the CSR command. > > The logic of handling CSR command is also easy now. > > For `/csr unneeded`: > > Case 1: There exists CSR progress in the pr body, in this case, the csr requirement cannot be removed and we prompt user that 'withdraw csr first then try again' > Case 2: No CSR progress in the pr body, it means all the issues this pr solves don't have csr issue or the csr issue has already been withdrawn. In this case, we could remove the csr requirement safely. > > For '/csr needed': > > Case 1: The pr has csr label. We just tell the user csr is already require for this pr. > > Case 2: The pr doesn't have csr label. > In this case, there are only three possibilities > (i) CSR is never requested and No CSR issues been created. In this case, we add CSR label to this pr and give user some prompts. > (ii) ALL CSR issues are withdrawn. In this case, we do the same as case (i) > (iii) ALL CSR issues are resolved. In this case, we won't add the csr label again and we just need to tell user there already exists resolved CSR issues. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: fix line break issues ------------- Changes: - all: https://git.openjdk.org/skara/pull/1496/files - new: https://git.openjdk.org/skara/pull/1496/files/e0c399ae..12deb26f Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1496&range=04 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1496&range=03-04 Stats: 2 lines in 2 files changed: 1 ins; 1 del; 0 mod Patch: https://git.openjdk.org/skara/pull/1496.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1496/head:pull/1496 PR: https://git.openjdk.org/skara/pull/1496 From zsong at openjdk.org Wed Apr 5 23:10:49 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 5 Apr 2023 23:10:49 GMT Subject: RFR: 1852: Make it possible to disable backport PRs for repository Message-ID: In this patch, PR bot has been added with the capability to control whether backport pr is allowed in specific repositories. By default, backport is enabled. However, if it is desired to disable backport in a repo, the configuration can be added to the PR bot configuration as follows: { "pr": { "repositories": { "repo1": { "backport": false } } } } If backport pr is disabled and the title of the pr matches the pattern of backport pr, the pr bot would reply a warning message to the user and prompt for the next steps. ------------- Commit messages: - fix a problem - SKARA-1852 Changes: https://git.openjdk.org/skara/pull/1497/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1497&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1852 Stats: 101 lines in 6 files changed: 97 ins; 2 del; 2 mod Patch: https://git.openjdk.org/skara/pull/1497.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1497/head:pull/1497 PR: https://git.openjdk.org/skara/pull/1497 From erikj at openjdk.org Thu Apr 6 16:45:26 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 6 Apr 2023 16:45:26 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch [v5] In-Reply-To: References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> Message-ID: On Wed, 5 Apr 2023 22:47:13 GMT, Zhao Song wrote: >> As SKARA-1851 fixed, now we could be able to search for CSR with the fixVersion in .jcheck/conf from the "merge branch". >> >> There are also some changes to CSR Command in this patch. >> >> Originally, we need to search for CSR issues in CSR Command because updating CSR progress in PR body needs cooperation between CSR bot and PR bot(so we couldn?t trust the CSR progress in PR body). >> >> But now, we could force the update of PR body before handling the CSR command. >> >> The logic of handling CSR command is also easy now. >> >> For `/csr unneeded`: >> >> Case 1: There exists CSR progress in the pr body, in this case, the csr requirement cannot be removed and we prompt user that 'withdraw csr first then try again' >> Case 2: No CSR progress in the pr body, it means all the issues this pr solves don't have csr issue or the csr issue has already been withdrawn. In this case, we could remove the csr requirement safely. >> >> For '/csr needed': >> >> Case 1: The pr has csr label. We just tell the user csr is already require for this pr. >> >> Case 2: The pr doesn't have csr label. >> In this case, there are only three possibilities >> (i) CSR is never requested and No CSR issues been created. In this case, we add CSR label to this pr and give user some prompts. >> (ii) ALL CSR issues are withdrawn. In this case, we do the same as case (i) >> (iii) ALL CSR issues are resolved. In this case, we won't add the csr label again and we just need to tell user there already exists resolved CSR issues. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix line break issues bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRCommand.java line 59: > 57: } > 58: > 59: private static void multipleIssueLinkReply(PullRequest pr, PrintWriter writer) { This reply isn't linking to anything so I would suggest: Suggestion: private static void multipleIssueReply(PullRequest pr, PrintWriter writer) { bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRCommand.java line 66: > 64: private static void singleIssueLinkReply(PullRequest pr, PrintWriter writer) { > 65: writer.println("@" + pr.author().username() + " please create a [CSR](https://wiki.openjdk.org/display/csr/Main) request, with the correct fix version, for the issue associated with this pull request." + > 66: " This pull request cannot be integrated until the CSR request is approved."); Can we restore the link to the main issue? ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1496#discussion_r1160029007 PR Review Comment: https://git.openjdk.org/skara/pull/1496#discussion_r1160028648 From zsong at openjdk.org Thu Apr 6 17:19:43 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 6 Apr 2023 17:19:43 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch [v6] In-Reply-To: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> Message-ID: > As SKARA-1851 fixed, now we could be able to search for CSR with the fixVersion in .jcheck/conf from the "merge branch". > > There are also some changes to CSR Command in this patch. > > Originally, we need to search for CSR issues in CSR Command because updating CSR progress in PR body needs cooperation between CSR bot and PR bot(so we couldn?t trust the CSR progress in PR body). > > But now, we could force the update of PR body before handling the CSR command. > > The logic of handling CSR command is also easy now. > > For `/csr unneeded`: > > Case 1: There exists CSR progress in the pr body, in this case, the csr requirement cannot be removed and we prompt user that 'withdraw csr first then try again' > Case 2: No CSR progress in the pr body, it means all the issues this pr solves don't have csr issue or the csr issue has already been withdrawn. In this case, we could remove the csr requirement safely. > > For '/csr needed': > > Case 1: The pr has csr label. We just tell the user csr is already require for this pr. > > Case 2: The pr doesn't have csr label. > In this case, there are only three possibilities > (i) CSR is never requested and No CSR issues been created. In this case, we add CSR label to this pr and give user some prompts. > (ii) ALL CSR issues are withdrawn. In this case, we do the same as case (i) > (iii) ALL CSR issues are resolved. In this case, we won't add the csr label again and we just need to tell user there already exists resolved CSR issues. 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/CSRCommand.java Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> ------------- Changes: - all: https://git.openjdk.org/skara/pull/1496/files - new: https://git.openjdk.org/skara/pull/1496/files/12deb26f..e22da965 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1496&range=05 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1496&range=04-05 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1496.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1496/head:pull/1496 PR: https://git.openjdk.org/skara/pull/1496 From zsong at openjdk.org Thu Apr 6 17:19:45 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 6 Apr 2023 17:19:45 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch [v5] In-Reply-To: References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> Message-ID: <3idgg_9INOLKd8Ep9Pz-Pblw-uX5pz257vc_3RB7CEs=.25276656-b761-464e-bae1-151a0855505f@github.com> On Thu, 6 Apr 2023 16:37:42 GMT, Erik Joelsson wrote: >> Zhao Song has updated the pull request incrementally with one additional commit since the last revision: >> >> fix line break issues > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRCommand.java line 66: > >> 64: private static void singleIssueLinkReply(PullRequest pr, PrintWriter writer) { >> 65: writer.println("@" + pr.author().username() + " please create a [CSR](https://wiki.openjdk.org/display/csr/Main) request, with the correct fix version, for the issue associated with this pull request." + >> 66: " This pull request cannot be integrated until the CSR request is approved."); > > Can we restore the link to the main issue? Sure, will fix it soon ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1496#discussion_r1160062573 From zsong at openjdk.org Thu Apr 6 17:39:20 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 6 Apr 2023 17:39:20 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch [v7] In-Reply-To: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> Message-ID: > As SKARA-1851 fixed, now we could be able to search for CSR with the fixVersion in .jcheck/conf from the "merge branch". > > There are also some changes to CSR Command in this patch. > > Originally, we need to search for CSR issues in CSR Command because updating CSR progress in PR body needs cooperation between CSR bot and PR bot(so we couldn?t trust the CSR progress in PR body). > > But now, we could force the update of PR body before handling the CSR command. > > The logic of handling CSR command is also easy now. > > For `/csr unneeded`: > > Case 1: There exists CSR progress in the pr body, in this case, the csr requirement cannot be removed and we prompt user that 'withdraw csr first then try again' > Case 2: No CSR progress in the pr body, it means all the issues this pr solves don't have csr issue or the csr issue has already been withdrawn. In this case, we could remove the csr requirement safely. > > For '/csr needed': > > Case 1: The pr has csr label. We just tell the user csr is already require for this pr. > > Case 2: The pr doesn't have csr label. > In this case, there are only three possibilities > (i) CSR is never requested and No CSR issues been created. In this case, we add CSR label to this pr and give user some prompts. > (ii) ALL CSR issues are withdrawn. In this case, we do the same as case (i) > (iii) ALL CSR issues are resolved. In this case, we won't add the csr label again and we just need to tell user there already exists resolved CSR issues. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: fix a problem ------------- Changes: - all: https://git.openjdk.org/skara/pull/1496/files - new: https://git.openjdk.org/skara/pull/1496/files/e22da965..8652ce30 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1496&range=06 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1496&range=05-06 Stats: 8 lines in 1 file changed: 2 ins; 0 del; 6 mod Patch: https://git.openjdk.org/skara/pull/1496.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1496/head:pull/1496 PR: https://git.openjdk.org/skara/pull/1496 From erikj at openjdk.org Thu Apr 6 17:57:03 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 6 Apr 2023 17:57:03 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch [v7] In-Reply-To: References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> Message-ID: On Thu, 6 Apr 2023 17:39:20 GMT, Zhao Song wrote: >> As SKARA-1851 fixed, now we could be able to search for CSR with the fixVersion in .jcheck/conf from the "merge branch". >> >> There are also some changes to CSR Command in this patch. >> >> Originally, we need to search for CSR issues in CSR Command because updating CSR progress in PR body needs cooperation between CSR bot and PR bot(so we couldn?t trust the CSR progress in PR body). >> >> But now, we could force the update of PR body before handling the CSR command. >> >> The logic of handling CSR command is also easy now. >> >> For `/csr unneeded`: >> >> Case 1: There exists CSR progress in the pr body, in this case, the csr requirement cannot be removed and we prompt user that 'withdraw csr first then try again' >> Case 2: No CSR progress in the pr body, it means all the issues this pr solves don't have csr issue or the csr issue has already been withdrawn. In this case, we could remove the csr requirement safely. >> >> For '/csr needed': >> >> Case 1: The pr has csr label. We just tell the user csr is already require for this pr. >> >> Case 2: The pr doesn't have csr label. >> In this case, there are only three possibilities >> (i) CSR is never requested and No CSR issues been created. In this case, we add CSR label to this pr and give user some prompts. >> (ii) ALL CSR issues are withdrawn. In this case, we do the same as case (i) >> (iii) ALL CSR issues are resolved. In this case, we won't add the csr label again and we just need to tell user there already exists resolved CSR issues. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix a problem Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1496#pullrequestreview-1375333701 From zsong at openjdk.org Thu Apr 6 19:46:00 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 6 Apr 2023 19:46:00 GMT Subject: RFR: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch [v7] In-Reply-To: References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> Message-ID: On Thu, 6 Apr 2023 17:39:20 GMT, Zhao Song wrote: >> As SKARA-1851 fixed, now we could be able to search for CSR with the fixVersion in .jcheck/conf from the "merge branch". >> >> There are also some changes to CSR Command in this patch. >> >> Originally, we need to search for CSR issues in CSR Command because updating CSR progress in PR body needs cooperation between CSR bot and PR bot(so we couldn?t trust the CSR progress in PR body). >> >> But now, we could force the update of PR body before handling the CSR command. >> >> The logic of handling CSR command is also easy now. >> >> For `/csr unneeded`: >> >> Case 1: There exists CSR progress in the pr body, in this case, the csr requirement cannot be removed and we prompt user that 'withdraw csr first then try again' >> Case 2: No CSR progress in the pr body, it means all the issues this pr solves don't have csr issue or the csr issue has already been withdrawn. In this case, we could remove the csr requirement safely. >> >> For '/csr needed': >> >> Case 1: The pr has csr label. We just tell the user csr is already require for this pr. >> >> Case 2: The pr doesn't have csr label. >> In this case, there are only three possibilities >> (i) CSR is never requested and No CSR issues been created. In this case, we add CSR label to this pr and give user some prompts. >> (ii) ALL CSR issues are withdrawn. In this case, we do the same as case (i) >> (iii) ALL CSR issues are resolved. In this case, we won't add the csr label again and we just need to tell user there already exists resolved CSR issues. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix a problem Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1496#issuecomment-1499532558 From zsong at openjdk.org Thu Apr 6 19:46:01 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 6 Apr 2023 19:46:01 GMT Subject: Integrated: 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch In-Reply-To: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> References: <0nG2i3ljvIrEokcskr6IxJsn9LilnqUTMweOGzmo-JA=.e85b5311-b538-444b-aeea-25b3acc73e82@github.com> Message-ID: <5gtIE1b2T6VKod_vUKhzTMd4qJeCQAJbtsb8OvARYRU=.2e5a3e21-84ca-484c-a46d-2dff0b2de34c@github.com> On Fri, 31 Mar 2023 21:27:10 GMT, Zhao Song wrote: > As SKARA-1851 fixed, now we could be able to search for CSR with the fixVersion in .jcheck/conf from the "merge branch". > > There are also some changes to CSR Command in this patch. > > Originally, we need to search for CSR issues in CSR Command because updating CSR progress in PR body needs cooperation between CSR bot and PR bot(so we couldn?t trust the CSR progress in PR body). > > But now, we could force the update of PR body before handling the CSR command. > > The logic of handling CSR command is also easy now. > > For `/csr unneeded`: > > Case 1: There exists CSR progress in the pr body, in this case, the csr requirement cannot be removed and we prompt user that 'withdraw csr first then try again' > Case 2: No CSR progress in the pr body, it means all the issues this pr solves don't have csr issue or the csr issue has already been withdrawn. In this case, we could remove the csr requirement safely. > > For '/csr needed': > > Case 1: The pr has csr label. We just tell the user csr is already require for this pr. > > Case 2: The pr doesn't have csr label. > In this case, there are only three possibilities > (i) CSR is never requested and No CSR issues been created. In this case, we add CSR label to this pr and give user some prompts. > (ii) ALL CSR issues are withdrawn. In this case, we do the same as case (i) > (iii) ALL CSR issues are resolved. In this case, we won't add the csr label again and we just need to tell user there already exists resolved CSR issues. This pull request has now been integrated. Changeset: cda21207 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/cda2120762e573a2dfd2f55c523337de2a2ae05a Stats: 323 lines in 6 files changed: 134 ins; 121 del; 68 mod 1850: CSR bot can pick up wrong fix version if PR branch is behind target branch Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1496 From zsong at openjdk.org Thu Apr 6 21:08:04 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 6 Apr 2023 21:08:04 GMT Subject: RFR: 1870: Make pr processing optional Message-ID: In this patch, PR bot has been added with the capability to disable PR processing and Commit processing. By default, PR processing and Commit processing are both enabled. However, if it is desired to disable PR processing or Commit processing in a repo, the configuration can be added to the PR bot configuration as follows: { "pr": { "repositories": { "repo1": { "processPR": false, "processCommit": false } } } } ------------- Commit messages: - SKARA-1870 Changes: https://git.openjdk.org/skara/pull/1498/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1498&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1870 Stats: 156 lines in 5 files changed: 145 ins; 1 del; 10 mod Patch: https://git.openjdk.org/skara/pull/1498.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1498/head:pull/1498 PR: https://git.openjdk.org/skara/pull/1498 From erikj at openjdk.org Thu Apr 6 21:33:38 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 6 Apr 2023 21:33:38 GMT Subject: RFR: 1870: Make pr processing optional In-Reply-To: References: Message-ID: <6DTS9zj_xR--YE9GpjOjfQ9eHEplE7aegO3eTzs__uM=.6eb64b4f-e7b2-4b20-9c51-bec7357ed75c@github.com> On Thu, 6 Apr 2023 20:28:59 GMT, Zhao Song wrote: > In this patch, PR bot has been added with the capability to disable PR processing and Commit processing. > > By default, PR processing and Commit processing are both enabled. > > However, if it is desired to disable PR processing or Commit processing in a repo, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "processPR": false, > "processCommit": false > } > } > } > } Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1498#pullrequestreview-1375598870 From zsong at openjdk.org Thu Apr 6 21:46:59 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 6 Apr 2023 21:46:59 GMT Subject: RFR: 1870: Make pr processing optional In-Reply-To: References: Message-ID: On Thu, 6 Apr 2023 20:28:59 GMT, Zhao Song wrote: > In this patch, PR bot has been added with the capability to disable PR processing and Commit processing. > > By default, PR processing and Commit processing are both enabled. > > However, if it is desired to disable PR processing or Commit processing in a repo, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "processPR": false, > "processCommit": false > } > } > } > } Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1498#issuecomment-1499663425 From zsong at openjdk.org Thu Apr 6 21:46:59 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 6 Apr 2023 21:46:59 GMT Subject: Integrated: 1870: Make pr processing optional In-Reply-To: References: Message-ID: On Thu, 6 Apr 2023 20:28:59 GMT, Zhao Song wrote: > In this patch, PR bot has been added with the capability to disable PR processing and Commit processing. > > By default, PR processing and Commit processing are both enabled. > > However, if it is desired to disable PR processing or Commit processing in a repo, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "processPR": false, > "processCommit": false > } > } > } > } This pull request has now been integrated. Changeset: 7e84f785 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/7e84f7852996def88a17f87317b47ef6ae4e7498 Stats: 156 lines in 5 files changed: 145 ins; 1 del; 10 mod 1870: Make pr processing optional Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1498 From zsong at openjdk.org Mon Apr 10 20:46:42 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 10 Apr 2023 20:46:42 GMT Subject: RFR: 1853: Make it possible to disable merge PRs for a repository Message-ID: In this patch, PR bot has been added with the capability to control whether merge-style pr is allowed in specific repositories. By default, merge-style pr is enabled. However, if it is desired to disable merge-style pr in a repo, the configuration can be added to the PR bot configuration as follows: { "pr": { "repositories": { "repo1": { "merge": false } } } } If merge-style pr is disabled and the title of the pr matches the pattern of merge-style pr, the pr bot would reply a warning message to the user and prompt for the next steps. ------------- Commit messages: - SKARA-1853 Changes: https://git.openjdk.org/skara/pull/1499/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1499&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1853 Stats: 97 lines in 6 files changed: 95 ins; 0 del; 2 mod Patch: https://git.openjdk.org/skara/pull/1499.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1499/head:pull/1499 PR: https://git.openjdk.org/skara/pull/1499 From ehelin at openjdk.org Tue Apr 11 13:47:56 2023 From: ehelin at openjdk.org (Erik Helin) Date: Tue, 11 Apr 2023 13:47:56 GMT Subject: RFR: 1859: Add "tags only" option to MirrorBot [v4] In-Reply-To: References: Message-ID: > Hi all, > > please review this patch that adds an option to the `MirrorBot` to mirror only tags from one repository to another. I also added some additional logging to `MirrorBot` and cleaned up the logic a bit for selecting the "mode" (tags, mirror, selected branches) that the `MirrorBot` uses. > > ### Testing > - [x] Added one additional unit test > > Thanks, > Erik Erik Helin has updated the pull request incrementally with one additional commit since the last revision: Allow tags and branches to be configured ------------- Changes: - all: https://git.openjdk.org/skara/pull/1493/files - new: https://git.openjdk.org/skara/pull/1493/files/4ba3c642..50ba64c5 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1493&range=03 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1493&range=02-03 Stats: 46 lines in 2 files changed: 15 ins; 30 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1493.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1493/head:pull/1493 PR: https://git.openjdk.org/skara/pull/1493 From ehelin at openjdk.org Tue Apr 11 13:49:45 2023 From: ehelin at openjdk.org (Erik Helin) Date: Tue, 11 Apr 2023 13:49:45 GMT Subject: RFR: 1859: Add "tags only" option to MirrorBot [v3] In-Reply-To: References: Message-ID: On Fri, 31 Mar 2023 13:48:40 GMT, Erik Joelsson wrote: >> Erik Helin has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove "exclude" for "tags" > > Marked as reviewed by erikj (Lead). @erikj79 @zhaosongzs thanks for the reviews! Sorry for a late update, I was out last week, but I realized that I had missed the case where we should allow branches to be explicitly configured _and_ tags to be included. This is fixed in the most recent commit [50ba64c](https://github.com/openjdk/skara/pull/1493/commits/50ba64c576be719d9752d56995235d78394a348e). Please have a look and thanks for helping out with this patch! ------------- PR Comment: https://git.openjdk.org/skara/pull/1493#issuecomment-1503388683 From erikj at openjdk.org Tue Apr 11 18:06:35 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 11 Apr 2023 18:06:35 GMT Subject: RFR: 1853: Make it possible to disable merge PRs for a repository In-Reply-To: References: Message-ID: On Mon, 10 Apr 2023 20:16:54 GMT, Zhao Song wrote: > In this patch, PR bot has been added with the capability to control whether merge-style pr is allowed in specific repositories. > > By default, merge-style pr is enabled. > > However, if it is desired to disable merge-style pr in a repo, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "merge": false > } > } > } > } > > > If merge-style pr is disabled and the title of the pr matches the pattern of merge-style pr, the pr bot would reply a warning message to the user and prompt for the next steps. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 258: > 256: var mergeDisabledText = "\n" + > 257: ":warning: @" + pr.author().username() + " merge PR is not allowed in this repository, please close this pr." + > 258: " If it was unintentional, please modify the title of this PR."; Suggestion: "? @" + pr.author().username() + " Merge-style pull requests are not allowed in this repository." + " If it was unintentional, please modify the title of this PR."; bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 263: > 261: return List.of(); > 262: } > 263: removeErrorComment(mergeDisabledText, comments); I think this whole check should be moved inside the `currentCheckValid` block. The check is cheap, but I still think it should be grouped with other similar checks. I don't think we should remove error comments. None of the other similar comments are removed, so unless we want to change that, then this new comment shouldn't be either. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1499#discussion_r1163160354 PR Review Comment: https://git.openjdk.org/skara/pull/1499#discussion_r1163162820 From erikj at openjdk.org Tue Apr 11 18:26:56 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 11 Apr 2023 18:26:56 GMT Subject: RFR: 1859: Add "tags only" option to MirrorBot [v4] In-Reply-To: References: Message-ID: On Tue, 11 Apr 2023 13:47:56 GMT, Erik Helin wrote: >> Hi all, >> >> please review this patch that adds an option to the `MirrorBot` to mirror only tags from one repository to another. I also added some additional logging to `MirrorBot` and cleaned up the logic a bit for selecting the "mode" (tags, mirror, selected branches) that the `MirrorBot` uses. >> >> ### Testing >> - [x] Added one additional unit test >> >> Thanks, >> Erik > > Erik Helin has updated the pull request incrementally with one additional commit since the last revision: > > Allow tags and branches to be configured Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1493#pullrequestreview-1379851062 From zsong at openjdk.org Tue Apr 11 18:33:26 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 11 Apr 2023 18:33:26 GMT Subject: RFR: 1853: Make it possible to disable merge PRs for a repository [v2] In-Reply-To: References: Message-ID: > In this patch, PR bot has been added with the capability to control whether merge-style pr is allowed in specific repositories. > > By default, merge-style pr is enabled. > > However, if it is desired to disable merge-style pr in a repo, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "merge": false > } > } > } > } > > > If merge-style pr is disabled and the title of the pr matches the pattern of merge-style pr, the pr bot would reply a warning message to the user and prompt for the next steps. 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/CheckWorkItem.java Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> ------------- Changes: - all: https://git.openjdk.org/skara/pull/1499/files - new: https://git.openjdk.org/skara/pull/1499/files/ab57a13a..05244e22 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1499&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1499&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1499.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1499/head:pull/1499 PR: https://git.openjdk.org/skara/pull/1499 From zsong at openjdk.org Tue Apr 11 18:33:26 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 11 Apr 2023 18:33:26 GMT Subject: RFR: 1853: Make it possible to disable merge PRs for a repository [v2] In-Reply-To: References: Message-ID: <881W7hmDF34YOXjoi6eYyCMjFMvjqI5CpoAybgOgO6w=.3149776e-7025-403b-9ca1-b9cb7dd351bf@github.com> On Tue, 11 Apr 2023 18:03:54 GMT, Erik Joelsson wrote: >> 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/CheckWorkItem.java >> >> Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 263: > >> 261: return List.of(); >> 262: } >> 263: removeErrorComment(mergeDisabledText, comments); > > I think this whole check should be moved inside the `currentCheckValid` block. The check is cheap, but I still think it should be grouped with other similar checks. > > I don't think we should remove error comments. None of the other similar comments are removed, so unless we want to change that, then this new comment shouldn't be either. I thought if we put the check on the top of the method, it would help us save some rest api calls. I am also ok with moving it inside the currentCheckValid block. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1499#discussion_r1163185530 From zsong at openjdk.org Tue Apr 11 18:42:08 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 11 Apr 2023 18:42:08 GMT Subject: RFR: 1853: Make it possible to disable merge PRs for a repository [v3] In-Reply-To: References: Message-ID: > In this patch, PR bot has been added with the capability to control whether merge-style pr is allowed in specific repositories. > > By default, merge-style pr is enabled. > > However, if it is desired to disable merge-style pr in a repo, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "merge": false > } > } > } > } > > > If merge-style pr is disabled and the title of the pr matches the pattern of merge-style pr, the pr bot would reply a warning message to the user and prompt for the next steps. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: fix a problem ------------- Changes: - all: https://git.openjdk.org/skara/pull/1499/files - new: https://git.openjdk.org/skara/pull/1499/files/05244e22..922cb193 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1499&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1499&range=01-02 Stats: 31 lines in 2 files changed: 9 ins; 19 del; 3 mod Patch: https://git.openjdk.org/skara/pull/1499.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1499/head:pull/1499 PR: https://git.openjdk.org/skara/pull/1499 From erikj at openjdk.org Tue Apr 11 18:43:28 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 11 Apr 2023 18:43:28 GMT Subject: RFR: 1853: Make it possible to disable merge PRs for a repository [v3] In-Reply-To: <881W7hmDF34YOXjoi6eYyCMjFMvjqI5CpoAybgOgO6w=.3149776e-7025-403b-9ca1-b9cb7dd351bf@github.com> References: <881W7hmDF34YOXjoi6eYyCMjFMvjqI5CpoAybgOgO6w=.3149776e-7025-403b-9ca1-b9cb7dd351bf@github.com> Message-ID: <-6JSuUt85UUQuChU3kx5732HpLahEmbnZxvOUNeWGJo=.15b54587-4981-459a-af7a-62abb61b1607@github.com> On Tue, 11 Apr 2023 18:29:16 GMT, Zhao Song wrote: >> bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 263: >> >>> 261: return List.of(); >>> 262: } >>> 263: removeErrorComment(mergeDisabledText, comments); >> >> I think this whole check should be moved inside the `currentCheckValid` block. The check is cheap, but I still think it should be grouped with other similar checks. >> >> I don't think we should remove error comments. None of the other similar comments are removed, so unless we want to change that, then this new comment shouldn't be either. > > I thought if we put the check on the top of the method, it would help us save some rest api calls. I am also ok with moving it inside the currentCheckValid block. That is true, we would. However, since this is such a rare code path, it's not really worth optimizing for. I think it's more important that the code is more readable. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1499#discussion_r1163195945 From erikj at openjdk.org Tue Apr 11 19:00:26 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 11 Apr 2023 19:00:26 GMT Subject: RFR: 1853: Make it possible to disable merge PRs for a repository [v3] In-Reply-To: References: Message-ID: On Tue, 11 Apr 2023 18:42:08 GMT, Zhao Song wrote: >> In this patch, PR bot has been added with the capability to control whether merge-style pr is allowed in specific repositories. >> >> By default, merge-style pr is enabled. >> >> However, if it is desired to disable merge-style pr in a repo, the configuration can be added to the PR bot configuration as follows: >> >> { >> "pr": { >> "repositories": { >> "repo1": { >> "merge": false >> } >> } >> } >> } >> >> >> If merge-style pr is disabled and the title of the pr matches the pattern of merge-style pr, the pr bot would reply a warning message to the user and prompt for the next steps. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix a problem Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1499#pullrequestreview-1379895589 From zsong at openjdk.org Tue Apr 11 19:41:24 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 11 Apr 2023 19:41:24 GMT Subject: RFR: 1853: Make it possible to disable merge PRs for a repository [v3] In-Reply-To: References: Message-ID: On Tue, 11 Apr 2023 18:42:08 GMT, Zhao Song wrote: >> In this patch, PR bot has been added with the capability to control whether merge-style pr is allowed in specific repositories. >> >> By default, merge-style pr is enabled. >> >> However, if it is desired to disable merge-style pr in a repo, the configuration can be added to the PR bot configuration as follows: >> >> { >> "pr": { >> "repositories": { >> "repo1": { >> "merge": false >> } >> } >> } >> } >> >> >> If merge-style pr is disabled and the title of the pr matches the pattern of merge-style pr, the pr bot would reply a warning message to the user and prompt for the next steps. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix a problem Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1499#issuecomment-1503990432 From zsong at openjdk.org Tue Apr 11 19:41:25 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 11 Apr 2023 19:41:25 GMT Subject: Integrated: 1853: Make it possible to disable merge PRs for a repository In-Reply-To: References: Message-ID: On Mon, 10 Apr 2023 20:16:54 GMT, Zhao Song wrote: > In this patch, PR bot has been added with the capability to control whether merge-style pr is allowed in specific repositories. > > By default, merge-style pr is enabled. > > However, if it is desired to disable merge-style pr in a repo, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "merge": false > } > } > } > } > > > If merge-style pr is disabled and the title of the pr matches the pattern of merge-style pr, the pr bot would reply a warning message to the user and prompt for the next steps. This pull request has now been integrated. Changeset: 0b01ba53 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/0b01ba53e694c261ebbaca20142bf96cd7757f22 Stats: 87 lines in 6 files changed: 85 ins; 0 del; 2 mod 1853: Make it possible to disable merge PRs for a repository Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1499 From zsong at openjdk.org Tue Apr 11 22:59:38 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 11 Apr 2023 22:59:38 GMT Subject: RFR: 1854: Add "clean" label for merge PRs that have no merge resolution Message-ID: In this patch, PR bot would add clean label to Merge-style PRs if one of the following conditions is met. 1. There isn't a merge commit at HEAD. To verify this condition, we can simply check the number of parents that the HEAD commit has. If the HEAD commit has one parent, it is not a merge commit. However, if it has two parents, then it is considered a merge commit. 2. The merge commit at HEAD is empty(has no merge resolutions) To verify this condition, we should be able to tell the difference between an empty merge commit and a non-empty merge commit. Using `git show ` would help us differentiate between this two types of commits. (1) git show output for empty merge commit commit 9752b806edafbdc210db00f3099404cd8bd11edf Merge: 982b5ad5d8b 99f8d05da93 Author: Zhao Song Date: Tue Apr 11 14:26:18 2023 -0700 Merge branch 'feature' (2) git show output for non-empty merge commit commit 242a0c07cf3204c662a2f1d55a2ca3e494f955fd (HEAD -> master) Merge: af35791d093 0ebf3bd5fe1 Author: Zhao Song Date: Tue Apr 11 14:38:05 2023 -0700 Merge branch 'feature2' diff --cc test.java index 7c736ab8f08,09647d12eda..a3c5725e39d --- a/test.java +++ b/test.java @@@ -3,4 -3,4 +3,5 @@@ aaaaa +++++ 11111 +33333 + 22222 We could find that the difference between the two is whether the commit message body is empty or not. Since we only care about commit message body, we can use the `git show --pretty=format:%b ` command to extract solely the commit message body. ------------- Commit messages: - SKARA-1854 Changes: https://git.openjdk.org/skara/pull/1500/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1500&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1854 Stats: 175 lines in 5 files changed: 172 ins; 0 del; 3 mod Patch: https://git.openjdk.org/skara/pull/1500.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1500/head:pull/1500 PR: https://git.openjdk.org/skara/pull/1500 From ehelin at openjdk.org Wed Apr 12 11:59:31 2023 From: ehelin at openjdk.org (Erik Helin) Date: Wed, 12 Apr 2023 11:59:31 GMT Subject: RFR: 1859: Add "tags only" option to MirrorBot [v4] In-Reply-To: References: Message-ID: On Tue, 11 Apr 2023 18:24:47 GMT, Erik Joelsson wrote: >> Erik Helin has updated the pull request incrementally with one additional commit since the last revision: >> >> Allow tags and branches to be configured > > Marked as reviewed by erikj (Lead). Thanks @erikj79! ------------- PR Comment: https://git.openjdk.org/skara/pull/1493#issuecomment-1505142019 From ehelin at openjdk.org Wed Apr 12 11:59:31 2023 From: ehelin at openjdk.org (Erik Helin) Date: Wed, 12 Apr 2023 11:59:31 GMT Subject: Integrated: 1859: Add "tags only" option to MirrorBot In-Reply-To: References: Message-ID: On Tue, 28 Mar 2023 09:34:32 GMT, Erik Helin wrote: > Hi all, > > please review this patch that adds an option to the `MirrorBot` to mirror only tags from one repository to another. I also added some additional logging to `MirrorBot` and cleaned up the logic a bit for selecting the "mode" (tags, mirror, selected branches) that the `MirrorBot` uses. > > ### Testing > - [x] Added one additional unit test > > Thanks, > Erik This pull request has now been integrated. Changeset: 687669fe Author: Erik Helin URL: https://git.openjdk.org/skara/commit/687669fea551d925b365723351c5938af0773f5d Stats: 342 lines in 7 files changed: 311 ins; 6 del; 25 mod 1859: Add "tags only" option to MirrorBot Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1493 From zsong at openjdk.org Wed Apr 12 17:27:50 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 12 Apr 2023 17:27:50 GMT Subject: RFR: 1854: Add "clean" label for merge PRs that have no merge resolution [v2] In-Reply-To: References: Message-ID: > In this patch, PR bot would add clean label to Merge-style PRs if one of the following conditions is met. > > 1. There isn't a merge commit at HEAD. > To verify this condition, we can simply check the number of parents that the HEAD commit has. If the HEAD commit has one parent, it is not a merge commit. However, if it has two parents, then it is considered a merge commit. > > 2. The merge commit at HEAD is empty(has no merge resolutions) > To verify this condition, we should be able to tell the difference between an empty merge commit and a non-empty merge commit. > > Using `git show ` would help us differentiate between this two types of commits. > > (1) git show output for empty merge commit > > commit 9752b806edafbdc210db00f3099404cd8bd11edf > Merge: 982b5ad5d8b 99f8d05da93 > Author: Zhao Song > Date: Tue Apr 11 14:26:18 2023 -0700 > > Merge branch 'feature' > > > > (2) git show output for non-empty merge commit > > commit 242a0c07cf3204c662a2f1d55a2ca3e494f955fd (HEAD -> master) > Merge: af35791d093 0ebf3bd5fe1 > Author: Zhao Song > Date: Tue Apr 11 14:38:05 2023 -0700 > > Merge branch 'feature2' > > diff --cc test.java > index 7c736ab8f08,09647d12eda..a3c5725e39d > --- a/test.java > +++ b/test.java > @@@ -3,4 -3,4 +3,5 @@@ > aaaaa > +++++ > 11111 > +33333 > + 22222 > > > > We could find that the difference between the two is whether the commit message body is empty or not. > > Since we only care about commit message body, we can use the `git show --pretty=format:%b ` command to extract solely the commit message body. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: update the logic in updateMergeClean ------------- Changes: - all: https://git.openjdk.org/skara/pull/1500/files - new: https://git.openjdk.org/skara/pull/1500/files/aad53a6f..6a5602a7 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1500&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1500&range=00-01 Stats: 14 lines in 5 files changed: 5 ins; 0 del; 9 mod Patch: https://git.openjdk.org/skara/pull/1500.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1500/head:pull/1500 PR: https://git.openjdk.org/skara/pull/1500 From erikj at openjdk.org Wed Apr 12 19:50:04 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 12 Apr 2023 19:50:04 GMT Subject: RFR: 1854: Add "clean" label for merge PRs that have no merge resolution [v2] In-Reply-To: References: Message-ID: On Wed, 12 Apr 2023 17:27:50 GMT, Zhao Song wrote: >> In this patch, PR bot would add clean label to Merge-style PRs if one of the following conditions is met. >> >> 1. There isn't a merge commit at HEAD. >> To verify this condition, we can simply check the number of parents that the HEAD commit has. If the HEAD commit has one parent, it is not a merge commit. However, if it has two parents, then it is considered a merge commit. >> >> 2. The merge commit at HEAD is empty(has no merge resolutions) >> To verify this condition, we should be able to tell the difference between an empty merge commit and a non-empty merge commit. >> >> Using `git show ` would help us differentiate between this two types of commits. >> >> (1) git show output for empty merge commit >> >> commit 9752b806edafbdc210db00f3099404cd8bd11edf >> Merge: 982b5ad5d8b 99f8d05da93 >> Author: Zhao Song >> Date: Tue Apr 11 14:26:18 2023 -0700 >> >> Merge branch 'feature' >> >> >> >> (2) git show output for non-empty merge commit >> >> commit 242a0c07cf3204c662a2f1d55a2ca3e494f955fd (HEAD -> master) >> Merge: af35791d093 0ebf3bd5fe1 >> Author: Zhao Song >> Date: Tue Apr 11 14:38:05 2023 -0700 >> >> Merge branch 'feature2' >> >> diff --cc test.java >> index 7c736ab8f08,09647d12eda..a3c5725e39d >> --- a/test.java >> +++ b/test.java >> @@@ -3,4 -3,4 +3,5 @@@ >> aaaaa >> +++++ >> 11111 >> +33333 >> + 22222 >> >> >> >> We could find that the difference between the two is whether the commit message body is empty or not. >> >> Since we only care about commit message body, we can use the `git show --pretty=format:%b ` command to extract solely the commit message body. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > update the logic in updateMergeClean bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 459: > 457: } > 458: } > 459: } I think this is doing the right thing, but the abstraction isn't right. If we were to ever implement this for HG, then we can't know what the output would look like here, and we can't assume it will be the same as for Git. The knowledge about how to interpret the output of Git needs to be encapsulated in `GitRepository`. Most of this method should move into a new method in `Repository`/`GitRepository`. Thinking some more about this, don't we have enough information in the `Commit` instance to figure this out? If the commit doesn't have any patches, then we should be good to go right? If so, we don't need any new method on `Repository`. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1500#discussion_r1164567279 From zsong at openjdk.org Wed Apr 12 20:28:50 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 12 Apr 2023 20:28:50 GMT Subject: RFR: 1852: Make it possible to disable backport PRs for repository [v2] In-Reply-To: References: Message-ID: > In this patch, PR bot has been added with the capability to control whether backport pr is allowed in specific repositories. > > By default, backport is enabled. > > However, if it is desired to disable backport in a repo, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "backport": false > } > } > } > } > > > If backport pr is disabled and the title of the pr matches the pattern of backport pr, the pr bot would reply a warning message to the user and prompt for the next steps. Zhao Song has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits: - fix a problem - fix problems - Merge branch 'master' into SKARA-1852 # Conflicts: # bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java # bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestBot.java # bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestBotBuilder.java # bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestBotFactory.java # bots/pr/src/test/java/org/openjdk/skara/bots/pr/CheckTests.java # bots/pr/src/test/java/org/openjdk/skara/bots/pr/PullRequestBotFactoryTest.java - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> - fix a problem - SKARA-1852 ------------- Changes: https://git.openjdk.org/skara/pull/1497/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1497&range=01 Stats: 84 lines in 6 files changed: 80 ins; 2 del; 2 mod Patch: https://git.openjdk.org/skara/pull/1497.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1497/head:pull/1497 PR: https://git.openjdk.org/skara/pull/1497 From erikj at openjdk.org Wed Apr 12 20:28:51 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 12 Apr 2023 20:28:51 GMT Subject: RFR: 1852: Make it possible to disable backport PRs for repository [v2] In-Reply-To: References: Message-ID: On Wed, 12 Apr 2023 20:25:36 GMT, Zhao Song wrote: >> In this patch, PR bot has been added with the capability to control whether backport pr is allowed in specific repositories. >> >> By default, backport is enabled. >> >> However, if it is desired to disable backport in a repo, the configuration can be added to the PR bot configuration as follows: >> >> { >> "pr": { >> "repositories": { >> "repo1": { >> "backport": false >> } >> } >> } >> } >> >> >> If backport pr is disabled and the title of the pr matches the pattern of backport pr, the pr bot would reply a warning message to the user and prompt for the next steps. > > Zhao Song has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits: > > - fix a problem > - fix problems > - Merge branch 'master' into SKARA-1852 > > # Conflicts: > # bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java > # bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestBot.java > # bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestBotBuilder.java > # bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestBotFactory.java > # bots/pr/src/test/java/org/openjdk/skara/bots/pr/CheckTests.java > # bots/pr/src/test/java/org/openjdk/skara/bots/pr/PullRequestBotFactoryTest.java > - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java > > Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> > - fix a problem > - SKARA-1852 bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 298: > 296: var backportDisabledText = "\n" + > 297: ":warning: @" + pr.author().username() + " backport PR is not allowed in this repository, please close this pr." + > 298: " If it was unintentional, please modify the title of this PR."; Suggestion: "? @" + pr.author().username() + " backports are not allowed in this repository." + " If it was unintentional, please modify the title of this pull request."; bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 305: > 303: } > 304: > 305: removeErrorComment(backportDisabledText, comments); No need to remove the comment. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1497#discussion_r1164549602 PR Review Comment: https://git.openjdk.org/skara/pull/1497#discussion_r1164549836 From zsong at openjdk.org Wed Apr 12 20:28:51 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 12 Apr 2023 20:28:51 GMT Subject: RFR: 1852: Make it possible to disable backport PRs for repository [v2] In-Reply-To: References: Message-ID: On Wed, 12 Apr 2023 19:22:34 GMT, Erik Joelsson wrote: >> Zhao Song has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits: >> >> - fix a problem >> - fix problems >> - Merge branch 'master' into SKARA-1852 >> >> # Conflicts: >> # bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java >> # bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestBot.java >> # bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestBotBuilder.java >> # bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestBotFactory.java >> # bots/pr/src/test/java/org/openjdk/skara/bots/pr/CheckTests.java >> # bots/pr/src/test/java/org/openjdk/skara/bots/pr/PullRequestBotFactoryTest.java >> - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java >> >> Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> >> - fix a problem >> - SKARA-1852 > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 305: > >> 303: } >> 304: >> 305: removeErrorComment(backportDisabledText, comments); > > No need to remove the comment. Will fix it ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1497#discussion_r1164551777 From zsong at openjdk.org Wed Apr 12 20:47:30 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 12 Apr 2023 20:47:30 GMT Subject: RFR: 1854: Add "clean" label for merge PRs that have no merge resolution [v3] In-Reply-To: References: Message-ID: > In this patch, PR bot would add clean label to Merge-style PRs if one of the following conditions is met. > > 1. There isn't a merge commit at HEAD. > To verify this condition, we can simply check the number of parents that the HEAD commit has. If the HEAD commit has one parent, it is not a merge commit. However, if it has two parents, then it is considered a merge commit. > > 2. The merge commit at HEAD is empty(has no merge resolutions) > To verify this condition, we should be able to tell the difference between an empty merge commit and a non-empty merge commit. > > Using `git show ` would help us differentiate between this two types of commits. > > (1) git show output for empty merge commit > > commit 9752b806edafbdc210db00f3099404cd8bd11edf > Merge: 982b5ad5d8b 99f8d05da93 > Author: Zhao Song > Date: Tue Apr 11 14:26:18 2023 -0700 > > Merge branch 'feature' > > > > (2) git show output for non-empty merge commit > > commit 242a0c07cf3204c662a2f1d55a2ca3e494f955fd (HEAD -> master) > Merge: af35791d093 0ebf3bd5fe1 > Author: Zhao Song > Date: Tue Apr 11 14:38:05 2023 -0700 > > Merge branch 'feature2' > > diff --cc test.java > index 7c736ab8f08,09647d12eda..a3c5725e39d > --- a/test.java > +++ b/test.java > @@@ -3,4 -3,4 +3,5 @@@ > aaaaa > +++++ > 11111 > +33333 > + 22222 > > > > We could find that the difference between the two is whether the commit message body is empty or not. > > Since we only care about commit message body, we can use the `git show --pretty=format:%b ` command to extract solely the commit message body. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: fix a problem ------------- Changes: - all: https://git.openjdk.org/skara/pull/1500/files - new: https://git.openjdk.org/skara/pull/1500/files/6a5602a7..7e1b5455 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1500&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1500&range=01-02 Stats: 27 lines in 4 files changed: 9 ins; 13 del; 5 mod Patch: https://git.openjdk.org/skara/pull/1500.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1500/head:pull/1500 PR: https://git.openjdk.org/skara/pull/1500 From erikj at openjdk.org Wed Apr 12 23:03:46 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 12 Apr 2023 23:03:46 GMT Subject: RFR: 1854: Add "clean" label for merge PRs that have no merge resolution [v3] In-Reply-To: References: Message-ID: On Wed, 12 Apr 2023 20:47:30 GMT, Zhao Song wrote: >> In this patch, PR bot would add clean label to Merge-style PRs if one of the following conditions is met. >> >> 1. There isn't a merge commit at HEAD. >> To verify this condition, we can simply check the number of parents that the HEAD commit has. If the HEAD commit has one parent, it is not a merge commit. However, if it has two parents, then it is considered a merge commit. >> >> 2. The merge commit at HEAD is empty(has no merge resolutions) >> To verify this condition, we should be able to tell the difference between an empty merge commit and a non-empty merge commit. >> >> Using `git show ` would help us differentiate between this two types of commits. >> >> (1) git show output for empty merge commit >> >> commit 9752b806edafbdc210db00f3099404cd8bd11edf >> Merge: 982b5ad5d8b 99f8d05da93 >> Author: Zhao Song >> Date: Tue Apr 11 14:26:18 2023 -0700 >> >> Merge branch 'feature' >> >> >> >> (2) git show output for non-empty merge commit >> >> commit 242a0c07cf3204c662a2f1d55a2ca3e494f955fd (HEAD -> master) >> Merge: af35791d093 0ebf3bd5fe1 >> Author: Zhao Song >> Date: Tue Apr 11 14:38:05 2023 -0700 >> >> Merge branch 'feature2' >> >> diff --cc test.java >> index 7c736ab8f08,09647d12eda..a3c5725e39d >> --- a/test.java >> +++ b/test.java >> @@@ -3,4 -3,4 +3,5 @@@ >> aaaaa >> +++++ >> 11111 >> +33333 >> + 22222 >> >> >> >> We could find that the difference between the two is whether the commit message body is empty or not. >> >> Since we only care about commit message body, we can use the `git show --pretty=format:%b ` command to extract solely the commit message body. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix a problem vcs/src/main/java/org/openjdk/skara/vcs/Repository.java line 186: > 184: } > 185: > 186: boolean isEmptyCommit(Hash hash); We should add a javadoc comment describing the expected behavior for this method, specifically for merge commits. vcs/src/main/java/org/openjdk/skara/vcs/git/GitRepository.java line 1733: > 1731: @Override > 1732: public boolean isEmptyCommit(Hash hash) { > 1733: try (var p = capture("git", "show", "--pretty=format:%b", hash.hex())) { I think we should be explicit with how we want merge diffs to be printed, even if the default is what we want. The option is `--diff-merges=dense-combined`. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1500#discussion_r1164744382 PR Review Comment: https://git.openjdk.org/skara/pull/1500#discussion_r1164743042 From zsong at openjdk.org Wed Apr 12 23:22:55 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 12 Apr 2023 23:22:55 GMT Subject: RFR: 1854: Add "clean" label for merge PRs that have no merge resolution [v3] In-Reply-To: References: Message-ID: <8oP1x1ncWRyyG2v4CpTbfk9KfXdvotryg3vAQPqZu6w=.8f045e1f-b43e-4065-9fee-55f9246a141d@github.com> On Wed, 12 Apr 2023 23:01:28 GMT, Erik Joelsson wrote: >> Zhao Song has updated the pull request incrementally with one additional commit since the last revision: >> >> fix a problem > > vcs/src/main/java/org/openjdk/skara/vcs/Repository.java line 186: > >> 184: } >> 185: >> 186: boolean isEmptyCommit(Hash hash); > > We should add a javadoc comment describing the expected behavior for this method, specifically for merge commits. Sure. But I think it also works for simple empty commit(not merge commit) > vcs/src/main/java/org/openjdk/skara/vcs/git/GitRepository.java line 1733: > >> 1731: @Override >> 1732: public boolean isEmptyCommit(Hash hash) { >> 1733: try (var p = capture("git", "show", "--pretty=format:%b", hash.hex())) { > > I think we should be explicit with how we want merge diffs to be printed, even if the default is what we want. The option is `--diff-merges=dense-combined`. Yes, it is a good idea. Will fix it. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1500#discussion_r1164752948 PR Review Comment: https://git.openjdk.org/skara/pull/1500#discussion_r1164752239 From zsong at openjdk.org Wed Apr 12 23:22:55 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 12 Apr 2023 23:22:55 GMT Subject: RFR: 1854: Add "clean" label for merge PRs that have no merge resolution [v3] In-Reply-To: <8oP1x1ncWRyyG2v4CpTbfk9KfXdvotryg3vAQPqZu6w=.8f045e1f-b43e-4065-9fee-55f9246a141d@github.com> References: <8oP1x1ncWRyyG2v4CpTbfk9KfXdvotryg3vAQPqZu6w=.8f045e1f-b43e-4065-9fee-55f9246a141d@github.com> Message-ID: On Wed, 12 Apr 2023 23:19:23 GMT, Zhao Song wrote: >> vcs/src/main/java/org/openjdk/skara/vcs/Repository.java line 186: >> >>> 184: } >>> 185: >>> 186: boolean isEmptyCommit(Hash hash); >> >> We should add a javadoc comment describing the expected behavior for this method, specifically for merge commits. > > Sure. But I think it also works for simple empty commit(not merge commit) At first, I name this method as `isEmptyMergeCommit` and later I thought it also works for simple empty commit, so I changed the method name to `isEmptyCommit` ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1500#discussion_r1164753601 From zsong at openjdk.org Wed Apr 12 23:26:16 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 12 Apr 2023 23:26:16 GMT Subject: RFR: 1854: Add "clean" label for merge PRs that have no merge resolution [v3] In-Reply-To: References: Message-ID: On Wed, 12 Apr 2023 23:01:28 GMT, Erik Joelsson wrote: >> Zhao Song has updated the pull request incrementally with one additional commit since the last revision: >> >> fix a problem > > vcs/src/main/java/org/openjdk/skara/vcs/Repository.java line 186: > >> 184: } >> 185: >> 186: boolean isEmptyCommit(Hash hash); > > We should add a javadoc comment describing the expected behavior for this method, specifically for merge commits. NVM, I misunderstood your comment ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1500#discussion_r1164755479 From zsong at openjdk.org Wed Apr 12 23:37:03 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 12 Apr 2023 23:37:03 GMT Subject: RFR: 1854: Add "clean" label for merge PRs that have no merge resolution [v4] In-Reply-To: References: Message-ID: > In this patch, PR bot would add clean label to Merge-style PRs if one of the following conditions is met. > > 1. There isn't a merge commit at HEAD. > To verify this condition, we can simply check the number of parents that the HEAD commit has. If the HEAD commit has one parent, it is not a merge commit. However, if it has two parents, then it is considered a merge commit. > > 2. The merge commit at HEAD is empty(has no merge resolutions) > To verify this condition, we should be able to tell the difference between an empty merge commit and a non-empty merge commit. > > Using `git show ` would help us differentiate between this two types of commits. > > (1) git show output for empty merge commit > > commit 9752b806edafbdc210db00f3099404cd8bd11edf > Merge: 982b5ad5d8b 99f8d05da93 > Author: Zhao Song > Date: Tue Apr 11 14:26:18 2023 -0700 > > Merge branch 'feature' > > > > (2) git show output for non-empty merge commit > > commit 242a0c07cf3204c662a2f1d55a2ca3e494f955fd (HEAD -> master) > Merge: af35791d093 0ebf3bd5fe1 > Author: Zhao Song > Date: Tue Apr 11 14:38:05 2023 -0700 > > Merge branch 'feature2' > > diff --cc test.java > index 7c736ab8f08,09647d12eda..a3c5725e39d > --- a/test.java > +++ b/test.java > @@@ -3,4 -3,4 +3,5 @@@ > aaaaa > +++++ > 11111 > +33333 > + 22222 > > > > We could find that the difference between the two is whether the commit message body is empty or not. > > Since we only care about commit message body, we can use the `git show --pretty=format:%b ` command to extract solely the commit message body. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: fix problems ------------- Changes: - all: https://git.openjdk.org/skara/pull/1500/files - new: https://git.openjdk.org/skara/pull/1500/files/7e1b5455..8cbbfc01 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1500&range=03 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1500&range=02-03 Stats: 5 lines in 2 files changed: 4 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1500.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1500/head:pull/1500 PR: https://git.openjdk.org/skara/pull/1500 From erikj at openjdk.org Wed Apr 12 23:40:32 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 12 Apr 2023 23:40:32 GMT Subject: RFR: 1854: Add "clean" label for merge PRs that have no merge resolution [v4] In-Reply-To: References: Message-ID: On Wed, 12 Apr 2023 23:37:03 GMT, Zhao Song wrote: >> In this patch, PR bot would add clean label to Merge-style PRs if one of the following conditions is met. >> >> 1. There isn't a merge commit at HEAD. >> To verify this condition, we can simply check the number of parents that the HEAD commit has. If the HEAD commit has one parent, it is not a merge commit. However, if it has two parents, then it is considered a merge commit. >> >> 2. The merge commit at HEAD is empty(has no merge resolutions) >> To verify this condition, we should be able to tell the difference between an empty merge commit and a non-empty merge commit. >> >> Using `git show ` would help us differentiate between this two types of commits. >> >> (1) git show output for empty merge commit >> >> commit 9752b806edafbdc210db00f3099404cd8bd11edf >> Merge: 982b5ad5d8b 99f8d05da93 >> Author: Zhao Song >> Date: Tue Apr 11 14:26:18 2023 -0700 >> >> Merge branch 'feature' >> >> >> >> (2) git show output for non-empty merge commit >> >> commit 242a0c07cf3204c662a2f1d55a2ca3e494f955fd (HEAD -> master) >> Merge: af35791d093 0ebf3bd5fe1 >> Author: Zhao Song >> Date: Tue Apr 11 14:38:05 2023 -0700 >> >> Merge branch 'feature2' >> >> diff --cc test.java >> index 7c736ab8f08,09647d12eda..a3c5725e39d >> --- a/test.java >> +++ b/test.java >> @@@ -3,4 -3,4 +3,5 @@@ >> aaaaa >> +++++ >> 11111 >> +33333 >> + 22222 >> >> >> >> We could find that the difference between the two is whether the commit message body is empty or not. >> >> Since we only care about commit message body, we can use the `git show --pretty=format:%b ` command to extract solely the commit message body. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix problems Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1500#pullrequestreview-1382272540 From zsong at openjdk.org Thu Apr 13 20:02:40 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 13 Apr 2023 20:02:40 GMT Subject: RFR: 1854: Add "clean" label for merge PRs that have no merge resolution [v4] In-Reply-To: References: Message-ID: On Wed, 12 Apr 2023 23:37:03 GMT, Zhao Song wrote: >> In this patch, PR bot would add clean label to Merge-style PRs if one of the following conditions is met. >> >> 1. There isn't a merge commit at HEAD. >> To verify this condition, we can simply check the number of parents that the HEAD commit has. If the HEAD commit has one parent, it is not a merge commit. However, if it has two parents, then it is considered a merge commit. >> >> 2. The merge commit at HEAD is empty(has no merge resolutions) >> To verify this condition, we should be able to tell the difference between an empty merge commit and a non-empty merge commit. >> >> Using `git show ` would help us differentiate between this two types of commits. >> >> (1) git show output for empty merge commit >> >> commit 9752b806edafbdc210db00f3099404cd8bd11edf >> Merge: 982b5ad5d8b 99f8d05da93 >> Author: Zhao Song >> Date: Tue Apr 11 14:26:18 2023 -0700 >> >> Merge branch 'feature' >> >> >> >> (2) git show output for non-empty merge commit >> >> commit 242a0c07cf3204c662a2f1d55a2ca3e494f955fd (HEAD -> master) >> Merge: af35791d093 0ebf3bd5fe1 >> Author: Zhao Song >> Date: Tue Apr 11 14:38:05 2023 -0700 >> >> Merge branch 'feature2' >> >> diff --cc test.java >> index 7c736ab8f08,09647d12eda..a3c5725e39d >> --- a/test.java >> +++ b/test.java >> @@@ -3,4 -3,4 +3,5 @@@ >> aaaaa >> +++++ >> 11111 >> +33333 >> + 22222 >> >> >> >> We could find that the difference between the two is whether the commit message body is empty or not. >> >> Since we only care about commit message body, we can use the `git show --pretty=format:%b ` command to extract solely the commit message body. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix problems Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1500#issuecomment-1507232864 From zsong at openjdk.org Thu Apr 13 20:02:41 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 13 Apr 2023 20:02:41 GMT Subject: Integrated: 1854: Add "clean" label for merge PRs that have no merge resolution In-Reply-To: References: Message-ID: On Tue, 11 Apr 2023 22:53:36 GMT, Zhao Song wrote: > In this patch, PR bot would add clean label to Merge-style PRs if one of the following conditions is met. > > 1. There isn't a merge commit at HEAD. > To verify this condition, we can simply check the number of parents that the HEAD commit has. If the HEAD commit has one parent, it is not a merge commit. However, if it has two parents, then it is considered a merge commit. > > 2. The merge commit at HEAD is empty(has no merge resolutions) > To verify this condition, we should be able to tell the difference between an empty merge commit and a non-empty merge commit. > > Using `git show ` would help us differentiate between this two types of commits. > > (1) git show output for empty merge commit > > commit 9752b806edafbdc210db00f3099404cd8bd11edf > Merge: 982b5ad5d8b 99f8d05da93 > Author: Zhao Song > Date: Tue Apr 11 14:26:18 2023 -0700 > > Merge branch 'feature' > > > > (2) git show output for non-empty merge commit > > commit 242a0c07cf3204c662a2f1d55a2ca3e494f955fd (HEAD -> master) > Merge: af35791d093 0ebf3bd5fe1 > Author: Zhao Song > Date: Tue Apr 11 14:38:05 2023 -0700 > > Merge branch 'feature2' > > diff --cc test.java > index 7c736ab8f08,09647d12eda..a3c5725e39d > --- a/test.java > +++ b/test.java > @@@ -3,4 -3,4 +3,5 @@@ > aaaaa > +++++ > 11111 > +33333 > + 22222 > > > > We could find that the difference between the two is whether the commit message body is empty or not. > > Since we only care about commit message body, we can use the `git show --pretty=format:%b ` command to extract solely the commit message body. This pull request has now been integrated. Changeset: aeedbc8f Author: Zhao Song URL: https://git.openjdk.org/skara/commit/aeedbc8f3abdbfa9cc9732d76731d1075f32c8fc Stats: 180 lines in 5 files changed: 177 ins; 0 del; 3 mod 1854: Add "clean" label for merge PRs that have no merge resolution Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1500 From zsong at openjdk.org Thu Apr 13 20:06:35 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 13 Apr 2023 20:06:35 GMT Subject: RFR: 1879: Make GitRepository#isEmptyCommit be compatible with old versions of Git Message-ID: In SKARA-1854, we introduced a method GitRepository#isEmptyCommit. In addition, the git show command includes the option '--diff-merges=dense-combined' in git 2.30.0. However, this option is not available in old versions of git. To ensure compatibility with old versions of Git, we should replace '--diff-merges=dense-combined' with the '--cc' option. References: [1]https://git-scm.com/docs/git-show/2.29.0 [2]https://git-scm.com/docs/git-show/2.30.0 ------------- Commit messages: - SKARA-1879 Changes: https://git.openjdk.org/skara/pull/1501/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1501&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1879 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1501.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1501/head:pull/1501 PR: https://git.openjdk.org/skara/pull/1501 From erikj at openjdk.org Thu Apr 13 20:06:35 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 13 Apr 2023 20:06:35 GMT Subject: RFR: 1879: Make GitRepository#isEmptyCommit be compatible with old versions of Git In-Reply-To: References: Message-ID: On Thu, 13 Apr 2023 17:32:47 GMT, Zhao Song wrote: > In SKARA-1854, we introduced a method GitRepository#isEmptyCommit. In addition, the git show command includes the option '--diff-merges=dense-combined' in git 2.30.0. However, this option is not available in old versions of git. To ensure compatibility with old versions of Git, we should replace '--diff-merges=dense-combined' with the '--cc' option. > > References: > [1]https://git-scm.com/docs/git-show/2.29.0 > [2]https://git-scm.com/docs/git-show/2.30.0 Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1501#pullrequestreview-1384083296 From zsong at openjdk.org Thu Apr 13 20:08:47 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 13 Apr 2023 20:08:47 GMT Subject: Integrated: 1879: Make GitRepository#isEmptyCommit be compatible with old versions of Git In-Reply-To: References: Message-ID: On Thu, 13 Apr 2023 17:32:47 GMT, Zhao Song wrote: > In SKARA-1854, we introduced a method GitRepository#isEmptyCommit. In addition, the git show command includes the option '--diff-merges=dense-combined' in git 2.30.0. However, this option is not available in old versions of git. To ensure compatibility with old versions of Git, we should replace '--diff-merges=dense-combined' with the '--cc' option. > > References: > [1]https://git-scm.com/docs/git-show/2.29.0 > [2]https://git-scm.com/docs/git-show/2.30.0 This pull request has now been integrated. Changeset: 80b3fc6a Author: Zhao Song URL: https://git.openjdk.org/skara/commit/80b3fc6a6ac1cf1b813d1bcd45ff81447f4f6bdb Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 1879: Make GitRepository#isEmptyCommit be compatible with old versions of Git Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1501 From zsong at openjdk.org Thu Apr 13 23:43:05 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 13 Apr 2023 23:43:05 GMT Subject: RFR: 1878: Improve argument check in SKARA CLI Message-ID: Currently, if a user misuses a command, in some cases, SKARA CLI crashes and throws a stack trace, which is bad and does not provide useful information to the user. After investigating, I found that in many places, we don't check whether an option is followed by an argument, and it would trigger some issues. In this patch, the program would always check the presence of an argument before attempting to retrieve it for an option. ------------- Commit messages: - SKARA-1878 Changes: https://git.openjdk.org/skara/pull/1502/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1502&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1878 Stats: 142 lines in 14 files changed: 44 ins; 49 del; 49 mod Patch: https://git.openjdk.org/skara/pull/1502.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1502/head:pull/1502 PR: https://git.openjdk.org/skara/pull/1502 From erikj at openjdk.org Fri Apr 14 12:50:57 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 14 Apr 2023 12:50:57 GMT Subject: RFR: 1878: Improve argument check in SKARA CLI In-Reply-To: References: Message-ID: On Thu, 13 Apr 2023 22:54:06 GMT, Zhao Song wrote: > Currently, if a user misuses a command, in some cases, SKARA CLI crashes and throws a stack trace, which is bad and does not provide useful information to the user. > > After investigating, I found that in many places, we don't check whether an option is followed by an argument, and it would trigger some issues. > > In this patch, the program would always check the presence of an argument before attempting to retrieve it for an option. Good fix overall. I see you updated copyright years in some files, please make sure all the files you have changed are updated. cli/src/main/java/org/openjdk/skara/cli/GitSync.java line 345: > 343: branches.add(branch.trim()); > 344: } > 345: } What happened to this part? ------------- PR Review: https://git.openjdk.org/skara/pull/1502#pullrequestreview-1385391787 PR Review Comment: https://git.openjdk.org/skara/pull/1502#discussion_r1166790630 From zsong at openjdk.org Fri Apr 14 16:10:17 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 14 Apr 2023 16:10:17 GMT Subject: RFR: 1878: Improve argument check in SKARA CLI In-Reply-To: References: Message-ID: On Fri, 14 Apr 2023 12:42:54 GMT, Erik Joelsson wrote: >> Currently, if a user misuses a command, in some cases, SKARA CLI crashes and throws a stack trace, which is bad and does not provide useful information to the user. >> >> After investigating, I found that in many places, we don't check whether an option is followed by an argument, and it would trigger some issues. >> >> In this patch, the program would always check the presence of an argument before attempting to retrieve it for an option. > > cli/src/main/java/org/openjdk/skara/cli/GitSync.java line 345: > >> 343: branches.add(branch.trim()); >> 344: } >> 345: } > > What happened to this part? Because we have a method GitSync#getOption in this method. The logic is as same as this. private String getOption(String name) throws IOException { var arg = ForgeUtils.getOption(name, arguments); if (arg != null) { return arg; } var lines = repo.config("sync." + name); return lines.size() == 1 ? lines.get(0) : null; } ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1502#discussion_r1167027778 From zsong at openjdk.org Fri Apr 14 16:14:46 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 14 Apr 2023 16:14:46 GMT Subject: RFR: 1878: Improve argument check in SKARA CLI [v2] In-Reply-To: References: Message-ID: > Currently, if a user misuses a command, in some cases, SKARA CLI crashes and throws a stack trace, which is bad and does not provide useful information to the user. > > After investigating, I found that in many places, we don't check whether an option is followed by an argument, and it would trigger some issues. > > In this patch, the program would always check the presence of an argument before attempting to retrieve it for an option. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: update copyright ------------- Changes: - all: https://git.openjdk.org/skara/pull/1502/files - new: https://git.openjdk.org/skara/pull/1502/files/23b21d54..91eee2f8 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1502&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1502&range=00-01 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/skara/pull/1502.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1502/head:pull/1502 PR: https://git.openjdk.org/skara/pull/1502 From erikj at openjdk.org Fri Apr 14 17:12:39 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 14 Apr 2023 17:12:39 GMT Subject: RFR: 1878: Improve argument check in SKARA CLI [v2] In-Reply-To: References: Message-ID: On Fri, 14 Apr 2023 16:14:46 GMT, Zhao Song wrote: >> Currently, if a user misuses a command, in some cases, SKARA CLI crashes and throws a stack trace, which is bad and does not provide useful information to the user. >> >> After investigating, I found that in many places, we don't check whether an option is followed by an argument, and it would trigger some issues. >> >> In this patch, the program would always check the presence of an argument before attempting to retrieve it for an option. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > update copyright Looks good! ------------- Marked as reviewed by erikj (Lead). PR Review: https://git.openjdk.org/skara/pull/1502#pullrequestreview-1385873867 From erikj at openjdk.org Fri Apr 14 17:12:40 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 14 Apr 2023 17:12:40 GMT Subject: RFR: 1878: Improve argument check in SKARA CLI [v2] In-Reply-To: References: Message-ID: On Fri, 14 Apr 2023 16:08:07 GMT, Zhao Song wrote: >> cli/src/main/java/org/openjdk/skara/cli/GitSync.java line 345: >> >>> 343: branches.add(branch.trim()); >>> 344: } >>> 345: } >> >> What happened to this part? > > Because we have a method GitSync#getOption in this class. The logic is as same as this. > > private String getOption(String name) throws IOException { > var arg = ForgeUtils.getOption(name, arguments); > if (arg != null) { > return arg; > } > var lines = repo.config("sync." + name); > return lines.size() == 1 ? lines.get(0) : null; > } Oh, right, I see now. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1502#discussion_r1167097344 From zsong at openjdk.org Mon Apr 17 18:29:21 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 17 Apr 2023 18:29:21 GMT Subject: RFR: 1878: Improve argument check in SKARA CLI [v2] In-Reply-To: References: Message-ID: On Fri, 14 Apr 2023 16:14:46 GMT, Zhao Song wrote: >> Currently, if a user misuses a command, in some cases, SKARA CLI crashes and throws a stack trace, which is bad and does not provide useful information to the user. >> >> After investigating, I found that in many places, we don't check whether an option is followed by an argument, and it would trigger some issues. >> >> In this patch, the program would always check the presence of an argument before attempting to retrieve it for an option. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > update copyright Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1502#issuecomment-1511876536 From zsong at openjdk.org Mon Apr 17 18:29:22 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 17 Apr 2023 18:29:22 GMT Subject: Integrated: 1878: Improve argument check in SKARA CLI In-Reply-To: References: Message-ID: On Thu, 13 Apr 2023 22:54:06 GMT, Zhao Song wrote: > Currently, if a user misuses a command, in some cases, SKARA CLI crashes and throws a stack trace, which is bad and does not provide useful information to the user. > > After investigating, I found that in many places, we don't check whether an option is followed by an argument, and it would trigger some issues. > > In this patch, the program would always check the presence of an argument before attempting to retrieve it for an option. This pull request has now been integrated. Changeset: e95942fa Author: Zhao Song URL: https://git.openjdk.org/skara/commit/e95942fa0909874462bbccf354533f83d7bc3aa9 Stats: 144 lines in 14 files changed: 44 ins; 49 del; 51 mod 1878: Improve argument check in SKARA CLI Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1502 From zsong at openjdk.org Tue Apr 18 00:05:23 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 18 Apr 2023 00:05:23 GMT Subject: RFR: 1855: Make it configurable which repositories merges should be allowed from Message-ID: In this patch, PR bot has been added with the capability to control which repositories can be the source for Merge-style pull requests. By default, all repositories are allowed. However, if it is desired to configure "allowed" repos, the configuration can be added to the PR bot configuration as follows: { "pr": { "repositories": { "repo1": { "mergeSources": [openjdk/repo2, openjdk/repo3] } } } } And the repo itself can always be the source of Merge-style pull requests. ------------- Commit messages: - fix a problem - add factory tests - SKARA-1855 Changes: https://git.openjdk.org/skara/pull/1503/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1503&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1855 Stats: 88 lines in 7 files changed: 83 ins; 0 del; 5 mod Patch: https://git.openjdk.org/skara/pull/1503.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1503/head:pull/1503 PR: https://git.openjdk.org/skara/pull/1503 From erikj at openjdk.org Tue Apr 18 15:51:24 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 18 Apr 2023 15:51:24 GMT Subject: RFR: 1855: Make it configurable which repositories merges should be allowed from In-Reply-To: References: Message-ID: On Mon, 17 Apr 2023 21:29:24 GMT, Zhao Song wrote: > In this patch, PR bot has been added with the capability to control which repositories can be the source for Merge-style pull requests. > > By default, all repositories are allowed. > > However, if it is desired to configure "allowed" repos, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "mergeSources": [openjdk/repo2, openjdk/repo3] > } > } > } > } > > > And the repo itself can always be the source of Merge-style pull requests. Looks good, just a minor nit. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 319: > 317: var mergeSourceInvalidText = "\n" + > 318: ":warning: @" + pr.author().username() + " " + repoName + > 319: " can not be source repo for Merge-style pull requests in this repository.\n" + Suggestion: " can not be source repo for merge-style pull requests in this repository.\n" + ------------- Marked as reviewed by erikj (Lead). PR Review: https://git.openjdk.org/skara/pull/1503#pullrequestreview-1390439424 PR Review Comment: https://git.openjdk.org/skara/pull/1503#discussion_r1170240357 From zsong at openjdk.org Tue Apr 18 16:04:04 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 18 Apr 2023 16:04:04 GMT Subject: RFR: 1855: Make it configurable which repositories merges should be allowed from [v2] In-Reply-To: References: Message-ID: > In this patch, PR bot has been added with the capability to control which repositories can be the source for Merge-style pull requests. > > By default, all repositories are allowed. > > However, if it is desired to configure "allowed" repos, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "mergeSources": [openjdk/repo2, openjdk/repo3] > } > } > } > } > > > And the repo itself can always be the source of Merge-style pull requests. Zhao Song has updated the pull request incrementally with two additional commits since the last revision: - fix test - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> ------------- Changes: - all: https://git.openjdk.org/skara/pull/1503/files - new: https://git.openjdk.org/skara/pull/1503/files/05b86921..e4e766b6 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1503&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1503&range=00-01 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/skara/pull/1503.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1503/head:pull/1503 PR: https://git.openjdk.org/skara/pull/1503 From zsong at openjdk.org Tue Apr 18 17:08:40 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 18 Apr 2023 17:08:40 GMT Subject: RFR: 1855: Make it configurable which repositories merges should be allowed from [v2] In-Reply-To: References: Message-ID: On Tue, 18 Apr 2023 16:04:04 GMT, Zhao Song wrote: >> In this patch, PR bot has been added with the capability to control which repositories can be the source for Merge-style pull requests. >> >> By default, all repositories are allowed. >> >> However, if it is desired to configure "allowed" repos, the configuration can be added to the PR bot configuration as follows: >> >> { >> "pr": { >> "repositories": { >> "repo1": { >> "mergeSources": [openjdk/repo2, openjdk/repo3] >> } >> } >> } >> } >> >> >> And the repo itself can always be the source of Merge-style pull requests. > > Zhao Song has updated the pull request incrementally with two additional commits since the last revision: > > - fix test > - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java > > Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1503#issuecomment-1513514125 From zsong at openjdk.org Tue Apr 18 17:08:40 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 18 Apr 2023 17:08:40 GMT Subject: Integrated: 1855: Make it configurable which repositories merges should be allowed from In-Reply-To: References: Message-ID: On Mon, 17 Apr 2023 21:29:24 GMT, Zhao Song wrote: > In this patch, PR bot has been added with the capability to control which repositories can be the source for Merge-style pull requests. > > By default, all repositories are allowed. > > However, if it is desired to configure "allowed" repos, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "mergeSources": [openjdk/repo2, openjdk/repo3] > } > } > } > } > > > And the repo itself can always be the source of Merge-style pull requests. This pull request has now been integrated. Changeset: f6b42b21 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/f6b42b21afb6003a840d090553bb1f686094309d Stats: 88 lines in 7 files changed: 83 ins; 0 del; 5 mod 1855: Make it configurable which repositories merges should be allowed from Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1503 From zsong at openjdk.org Wed Apr 19 20:28:26 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 19 Apr 2023 20:28:26 GMT Subject: RFR: 1885: Add method deleteDeployKeys to HostedRepository Message-ID: <_zcGMbfwr-4ofeBHAK7GsGqRov-uzHmG9FWX1jKLDxY=.2e88e64a-f9ae-4e18-a7b8-33deae20e492@github.com> The method deleteDeployKeys is designed to delete deploy keys from this repository. ------------- Commit messages: - fix import - SKARA-1885 Changes: https://git.openjdk.org/skara/pull/1505/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1505&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1885 Stats: 85 lines in 7 files changed: 80 ins; 0 del; 5 mod Patch: https://git.openjdk.org/skara/pull/1505.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1505/head:pull/1505 PR: https://git.openjdk.org/skara/pull/1505 From erikj at openjdk.org Wed Apr 19 21:27:29 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 19 Apr 2023 21:27:29 GMT Subject: RFR: 1885: Add method deleteDeployKeys to HostedRepository In-Reply-To: <_zcGMbfwr-4ofeBHAK7GsGqRov-uzHmG9FWX1jKLDxY=.2e88e64a-f9ae-4e18-a7b8-33deae20e492@github.com> References: <_zcGMbfwr-4ofeBHAK7GsGqRov-uzHmG9FWX1jKLDxY=.2e88e64a-f9ae-4e18-a7b8-33deae20e492@github.com> Message-ID: On Wed, 19 Apr 2023 19:58:03 GMT, Zhao Song wrote: > The method deleteDeployKeys is designed to delete deploy keys from this repository. forge/src/main/java/org/openjdk/skara/forge/HostedRepository.java line 217: > 215: * The return value is the count of deleted keys > 216: */ > 217: int deleteDeployKeys(int age); Instead of using int for age, please use a [Duration](https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html). ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1505#discussion_r1171867901 From zsong at openjdk.org Wed Apr 19 21:41:03 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 19 Apr 2023 21:41:03 GMT Subject: RFR: 1885: Add method deleteDeployKeys to HostedRepository In-Reply-To: References: <_zcGMbfwr-4ofeBHAK7GsGqRov-uzHmG9FWX1jKLDxY=.2e88e64a-f9ae-4e18-a7b8-33deae20e492@github.com> Message-ID: On Wed, 19 Apr 2023 21:22:28 GMT, Erik Joelsson wrote: >> The method deleteDeployKeys is designed to delete deploy keys from this repository. > > forge/src/main/java/org/openjdk/skara/forge/HostedRepository.java line 217: > >> 215: * The return value is the count of deleted keys >> 216: */ >> 217: int deleteDeployKeys(int age); > > Instead of using int for age, please use a [Duration](https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html). Sure ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1505#discussion_r1171879961 From zsong at openjdk.org Wed Apr 19 22:03:57 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 19 Apr 2023 22:03:57 GMT Subject: RFR: 1885: Add method deleteDeployKeys to HostedRepository [v2] In-Reply-To: <_zcGMbfwr-4ofeBHAK7GsGqRov-uzHmG9FWX1jKLDxY=.2e88e64a-f9ae-4e18-a7b8-33deae20e492@github.com> References: <_zcGMbfwr-4ofeBHAK7GsGqRov-uzHmG9FWX1jKLDxY=.2e88e64a-f9ae-4e18-a7b8-33deae20e492@github.com> Message-ID: > The method deleteDeployKeys is designed to delete deploy keys from this repository. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: use duration ------------- Changes: - all: https://git.openjdk.org/skara/pull/1505/files - new: https://git.openjdk.org/skara/pull/1505/files/ccd47c15..956b72a2 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1505&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1505&range=00-01 Stats: 18 lines in 7 files changed: 7 ins; 1 del; 10 mod Patch: https://git.openjdk.org/skara/pull/1505.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1505/head:pull/1505 PR: https://git.openjdk.org/skara/pull/1505 From erikj at openjdk.org Wed Apr 19 22:15:05 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 19 Apr 2023 22:15:05 GMT Subject: RFR: 1885: Add method deleteDeployKeys to HostedRepository [v2] In-Reply-To: References: <_zcGMbfwr-4ofeBHAK7GsGqRov-uzHmG9FWX1jKLDxY=.2e88e64a-f9ae-4e18-a7b8-33deae20e492@github.com> Message-ID: On Wed, 19 Apr 2023 22:03:57 GMT, Zhao Song wrote: >> The method deleteDeployKeys is designed to delete deploy keys from this repository. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > use duration forge/src/main/java/org/openjdk/skara/forge/HostedRepository.java line 216: > 214: * The return value is the count of deleted keys > 215: */ > 216: int deleteDeployKeys(Duration duration); Should probably call the parameter `age`. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1505#discussion_r1171901604 From zsong at openjdk.org Wed Apr 19 22:17:48 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 19 Apr 2023 22:17:48 GMT Subject: RFR: 1885: Add method deleteDeployKeys to HostedRepository [v2] In-Reply-To: References: <_zcGMbfwr-4ofeBHAK7GsGqRov-uzHmG9FWX1jKLDxY=.2e88e64a-f9ae-4e18-a7b8-33deae20e492@github.com> Message-ID: On Wed, 19 Apr 2023 22:12:46 GMT, Erik Joelsson wrote: >> Zhao Song has updated the pull request incrementally with one additional commit since the last revision: >> >> use duration > > forge/src/main/java/org/openjdk/skara/forge/HostedRepository.java line 216: > >> 214: * The return value is the count of deleted keys >> 215: */ >> 216: int deleteDeployKeys(Duration duration); > > Should probably call the parameter `age`. Ok, will fix it soon ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1505#discussion_r1171903387 From erikj at openjdk.org Wed Apr 19 22:17:48 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 19 Apr 2023 22:17:48 GMT Subject: RFR: 1885: Add method deleteDeployKeys to HostedRepository [v2] In-Reply-To: References: <_zcGMbfwr-4ofeBHAK7GsGqRov-uzHmG9FWX1jKLDxY=.2e88e64a-f9ae-4e18-a7b8-33deae20e492@github.com> Message-ID: <1L61ddgaks1SVrihURSMd6m64sk_Dm34PeLwk1U9GO4=.48209008-ce63-4690-b188-366c5b8a810d@github.com> On Wed, 19 Apr 2023 22:03:57 GMT, Zhao Song wrote: >> The method deleteDeployKeys is designed to delete deploy keys from this repository. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > use duration forge/src/main/java/org/openjdk/skara/forge/gitlab/GitLabRepository.java line 837: > 835: .stream() > 836: .filter(key -> ZonedDateTime.parse(key.get("created_at").asString()) > 837: .isBefore(ZonedDateTime.now().minusSeconds(duration.toSeconds()))) No need to convert to seconds when using `Duration`. It implements `TemporalAmount` so you can just: Suggestion: .isBefore(ZonedDateTime.now().minus(duration))) ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1505#discussion_r1171902836 From zsong at openjdk.org Wed Apr 19 22:24:49 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 19 Apr 2023 22:24:49 GMT Subject: RFR: 1885: Add method deleteDeployKeys to HostedRepository [v3] In-Reply-To: <_zcGMbfwr-4ofeBHAK7GsGqRov-uzHmG9FWX1jKLDxY=.2e88e64a-f9ae-4e18-a7b8-33deae20e492@github.com> References: <_zcGMbfwr-4ofeBHAK7GsGqRov-uzHmG9FWX1jKLDxY=.2e88e64a-f9ae-4e18-a7b8-33deae20e492@github.com> Message-ID: > The method deleteDeployKeys is designed to delete deploy keys from this repository. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: fix problems ------------- Changes: - all: https://git.openjdk.org/skara/pull/1505/files - new: https://git.openjdk.org/skara/pull/1505/files/956b72a2..824afe26 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1505&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1505&range=01-02 Stats: 8 lines in 5 files changed: 0 ins; 0 del; 8 mod Patch: https://git.openjdk.org/skara/pull/1505.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1505/head:pull/1505 PR: https://git.openjdk.org/skara/pull/1505 From zsong at openjdk.org Wed Apr 19 22:24:49 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 19 Apr 2023 22:24:49 GMT Subject: RFR: 1885: Add method deleteDeployKeys to HostedRepository [v2] In-Reply-To: <1L61ddgaks1SVrihURSMd6m64sk_Dm34PeLwk1U9GO4=.48209008-ce63-4690-b188-366c5b8a810d@github.com> References: <_zcGMbfwr-4ofeBHAK7GsGqRov-uzHmG9FWX1jKLDxY=.2e88e64a-f9ae-4e18-a7b8-33deae20e492@github.com> <1L61ddgaks1SVrihURSMd6m64sk_Dm34PeLwk1U9GO4=.48209008-ce63-4690-b188-366c5b8a810d@github.com> Message-ID: On Wed, 19 Apr 2023 22:14:47 GMT, Erik Joelsson wrote: >> Zhao Song has updated the pull request incrementally with one additional commit since the last revision: >> >> use duration > > forge/src/main/java/org/openjdk/skara/forge/gitlab/GitLabRepository.java line 837: > >> 835: .stream() >> 836: .filter(key -> ZonedDateTime.parse(key.get("created_at").asString()) >> 837: .isBefore(ZonedDateTime.now().minusSeconds(duration.toSeconds()))) > > No need to convert to seconds when using `Duration`. It implements `TemporalAmount` so you can just: > Suggestion: > > .isBefore(ZonedDateTime.now().minus(duration))) Good to know. Will fix it too. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1505#discussion_r1171905485 From erikj at openjdk.org Wed Apr 19 22:44:07 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 19 Apr 2023 22:44:07 GMT Subject: RFR: 1885: Add method deleteDeployKeys to HostedRepository [v3] In-Reply-To: References: <_zcGMbfwr-4ofeBHAK7GsGqRov-uzHmG9FWX1jKLDxY=.2e88e64a-f9ae-4e18-a7b8-33deae20e492@github.com> Message-ID: On Wed, 19 Apr 2023 22:24:49 GMT, Zhao Song wrote: >> The method deleteDeployKeys is designed to delete deploy keys from this repository. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix problems Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1505#pullrequestreview-1392975989 From zsong at openjdk.org Thu Apr 20 20:43:30 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 20 Apr 2023 20:43:30 GMT Subject: RFR: 1886: Only configure CSRIssueBot for issuetrackers where we have CSR configured Message-ID: As Erik said in the issue, now the PullRequestBotFactory creates a CSRIssueBot for every IssueTracker configured. It is unnecessary and would trigger some errors. In this patch, PullRequestBotFactory only creates a CSRIssueBot for the IssueTracker which is associated with any CSR enabled repository. ------------- Commit messages: - SKARA-1886 Changes: https://git.openjdk.org/skara/pull/1506/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1506&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1886 Stats: 74 lines in 2 files changed: 37 ins; 10 del; 27 mod Patch: https://git.openjdk.org/skara/pull/1506.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1506/head:pull/1506 PR: https://git.openjdk.org/skara/pull/1506 From erikj at openjdk.org Thu Apr 20 21:30:27 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 20 Apr 2023 21:30:27 GMT Subject: RFR: 1886: Only configure CSRIssueBot for issuetrackers where we have CSR configured In-Reply-To: References: Message-ID: On Thu, 20 Apr 2023 20:18:59 GMT, Zhao Song wrote: > As Erik said in the issue, now the PullRequestBotFactory creates a CSRIssueBot for every IssueTracker configured. It is unnecessary and would trigger some errors. > > In this patch, PullRequestBotFactory only creates a CSRIssueBot for the IssueTracker which is associated with any CSR enabled repository. Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1506#pullrequestreview-1394790510 From zsong at openjdk.org Fri Apr 21 16:22:09 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 21 Apr 2023 16:22:09 GMT Subject: RFR: 1885: Add method deleteDeployKeys to HostedRepository [v3] In-Reply-To: References: <_zcGMbfwr-4ofeBHAK7GsGqRov-uzHmG9FWX1jKLDxY=.2e88e64a-f9ae-4e18-a7b8-33deae20e492@github.com> Message-ID: On Wed, 19 Apr 2023 22:24:49 GMT, Zhao Song wrote: >> The method deleteDeployKeys is designed to delete deploy keys from this repository. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix problems Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1505#issuecomment-1518060566 From zsong at openjdk.org Fri Apr 21 16:22:09 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 21 Apr 2023 16:22:09 GMT Subject: Integrated: 1885: Add method deleteDeployKeys to HostedRepository In-Reply-To: <_zcGMbfwr-4ofeBHAK7GsGqRov-uzHmG9FWX1jKLDxY=.2e88e64a-f9ae-4e18-a7b8-33deae20e492@github.com> References: <_zcGMbfwr-4ofeBHAK7GsGqRov-uzHmG9FWX1jKLDxY=.2e88e64a-f9ae-4e18-a7b8-33deae20e492@github.com> Message-ID: On Wed, 19 Apr 2023 19:58:03 GMT, Zhao Song wrote: > The method deleteDeployKeys is designed to delete deploy keys from this repository. This pull request has now been integrated. Changeset: 9d5db557 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/9d5db557cef6ad54dfdc4ae4320e9f976252ebee Stats: 91 lines in 7 files changed: 86 ins; 0 del; 5 mod 1885: Add method deleteDeployKeys to HostedRepository Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1505 From zsong at openjdk.org Fri Apr 21 16:22:33 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 21 Apr 2023 16:22:33 GMT Subject: RFR: 1886: Only configure CSRIssueBot for issuetrackers where we have CSR configured In-Reply-To: References: Message-ID: On Thu, 20 Apr 2023 20:18:59 GMT, Zhao Song wrote: > As Erik said in the issue, now the PullRequestBotFactory creates a CSRIssueBot for every IssueTracker configured. It is unnecessary and would trigger some errors. > > In this patch, PullRequestBotFactory only creates a CSRIssueBot for the IssueTracker which is associated with any CSR enabled repository. Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1506#issuecomment-1518060745 From zsong at openjdk.org Fri Apr 21 16:22:33 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 21 Apr 2023 16:22:33 GMT Subject: Integrated: 1886: Only configure CSRIssueBot for issuetrackers where we have CSR configured In-Reply-To: References: Message-ID: On Thu, 20 Apr 2023 20:18:59 GMT, Zhao Song wrote: > As Erik said in the issue, now the PullRequestBotFactory creates a CSRIssueBot for every IssueTracker configured. It is unnecessary and would trigger some errors. > > In this patch, PullRequestBotFactory only creates a CSRIssueBot for the IssueTracker which is associated with any CSR enabled repository. This pull request has now been integrated. Changeset: 15fee6fe Author: Zhao Song URL: https://git.openjdk.org/skara/commit/15fee6fe63566d2ee64f38bf21f304bcd461dc4c Stats: 74 lines in 2 files changed: 37 ins; 10 del; 27 mod 1886: Only configure CSRIssueBot for issuetrackers where we have CSR configured Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1506 From zsong at openjdk.org Mon Apr 24 21:51:11 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 24 Apr 2023 21:51:11 GMT Subject: RFR: 1873: Possible notification race with tags Message-ID: As Erik said in the issue description, "If a new commit is integrated into a repository branch and quickly tagged, the notifier may miss updating the "Resolved In Build" field in the issue associated with that commit. This happens if the same RepositoryWorkItem instance handles both the tag and the commit, because it will handle the tag first, before a suitable backport has been created". To solve this issue, we need to rearrange the order of handles of the tags and commits. I checked the logic in the two methods(**handleTags** and **handleRef**) and I couldn't find any problem would be introduced due to this change. But I could not guarantee that no problem would be found later. ------------- Commit messages: - SKARA-1873 Changes: https://git.openjdk.org/skara/pull/1507/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1507&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1873 Stats: 85 lines in 2 files changed: 79 ins; 4 del; 2 mod Patch: https://git.openjdk.org/skara/pull/1507.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1507/head:pull/1507 PR: https://git.openjdk.org/skara/pull/1507 From erikj at openjdk.org Mon Apr 24 22:54:25 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 24 Apr 2023 22:54:25 GMT Subject: RFR: 1873: Possible notification race with tags In-Reply-To: References: Message-ID: On Mon, 24 Apr 2023 21:27:47 GMT, Zhao Song wrote: > As Erik said in the issue description, "If a new commit is integrated into a repository branch and quickly tagged, the notifier may miss updating the "Resolved In Build" field in the issue associated with that commit. This happens if the same RepositoryWorkItem instance handles both the tag and the commit, because it will handle the tag first, before a suitable backport has been created". > > To solve this issue, we need to rearrange the order of handles of the tags and commits. > > I checked the logic in the two methods(**handleTags** and **handleRef**) and I couldn't find any problem would be introduced due to this change. But I could not guarantee that no problem would be found later. Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1507#pullrequestreview-1398904393 From erikj at openjdk.org Tue Apr 25 19:54:47 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 25 Apr 2023 19:54:47 GMT Subject: RFR: 1892: Handle jfx cpu versions Message-ID: The JdkVersion parser needs to handle versions on the form "jfx-cpu" and "jfxXXu-cpu". I chose to just accept any prefix string consisting of lower case letters. ------------- Commit messages: - Limit *-cpu to just lower case letters as prefix - Accept any prefix on modern version strings - SKARA-1892 Changes: https://git.openjdk.org/skara/pull/1509/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1509&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1892 Stats: 15 lines in 2 files changed: 10 ins; 1 del; 4 mod Patch: https://git.openjdk.org/skara/pull/1509.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1509/head:pull/1509 PR: https://git.openjdk.org/skara/pull/1509 From kcr at openjdk.org Tue Apr 25 20:07:44 2023 From: kcr at openjdk.org (Kevin Rushforth) Date: Tue, 25 Apr 2023 20:07:44 GMT Subject: RFR: 1892: Handle jfx cpu versions In-Reply-To: References: Message-ID: On Tue, 25 Apr 2023 19:50:57 GMT, Erik Joelsson wrote: > The JdkVersion parser needs to handle versions on the form "jfx-cpu" and "jfxXXu-cpu". I chose to just accept any prefix string consisting of lower case letters. Will this correctly consume pool values? For example, `20u-cpu` will consume `20-pool` (as expected). Will `jfx20u-cpu` consume `jfx20-pool` records? ------------- PR Comment: https://git.openjdk.org/skara/pull/1509#issuecomment-1522349448 From kcr at openjdk.org Tue Apr 25 20:27:44 2023 From: kcr at openjdk.org (Kevin Rushforth) Date: Tue, 25 Apr 2023 20:27:44 GMT Subject: RFR: 1892: Handle jfx cpu versions In-Reply-To: References: Message-ID: <3Cy49kSnbqcVjPDfKWyCcqvAaXDQwBpxDXrnFiGbpI0=.1b5d7e75-0add-4c37-9a91-0b2211d9941d@github.com> On Tue, 25 Apr 2023 20:05:36 GMT, Kevin Rushforth wrote: > Will this correctly consume pool values? For example, `20u-cpu` will consume `20-pool` (as expected). Will `jfx20u-cpu` consume `jfx20-pool` records? Answering my own question, it turns out that, no, `20u-cpu` will _not_ consume `20-pool`, so `jfx20u-cpu` doesn't need to either. ------------- PR Comment: https://git.openjdk.org/skara/pull/1509#issuecomment-1522370991 From zsong at openjdk.org Tue Apr 25 20:56:22 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 25 Apr 2023 20:56:22 GMT Subject: RFR: 1890: Add method getExpiredDeployKeys Message-ID: <8JBUbYhw6_S7MKOwm0opCEUNapohdbmJHXEw3Gx_vv8=.526a45e7-b15b-42ff-ae52-5e712f60f5c0@github.com> Add a new method called getExpiredDeployKeys in HostedRepository ------------- Commit messages: - SKARA-1890 Changes: https://git.openjdk.org/skara/pull/1508/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1508&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1890 Stats: 93 lines in 7 files changed: 89 ins; 0 del; 4 mod Patch: https://git.openjdk.org/skara/pull/1508.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1508/head:pull/1508 PR: https://git.openjdk.org/skara/pull/1508 From kcr at openjdk.org Tue Apr 25 20:59:02 2023 From: kcr at openjdk.org (Kevin Rushforth) Date: Tue, 25 Apr 2023 20:59:02 GMT Subject: RFR: 1892: Handle jfx cpu versions In-Reply-To: References: Message-ID: <5O_gTgPzH5DvvaA5B-rxsfy_Fr_2OuW0DSsNR8J7mvk=.434923c2-03cd-45a5-88cb-5a0cefab39f6@github.com> On Tue, 25 Apr 2023 19:50:57 GMT, Erik Joelsson wrote: > The JdkVersion parser needs to handle versions on the form "jfx-cpu" and "jfxXXu-cpu". I chose to just accept any prefix string consisting of lower case letters. Looks good. ------------- Marked as reviewed by kcr (Reviewer). PR Review: https://git.openjdk.org/skara/pull/1509#pullrequestreview-1400739200 From erikj at openjdk.org Tue Apr 25 21:52:08 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 25 Apr 2023 21:52:08 GMT Subject: RFR: 1892: Handle jfx cpu versions [v2] In-Reply-To: References: Message-ID: > The JdkVersion parser needs to handle versions on the form "jfx-cpu" and "jfxXXu-cpu". I chose to just accept any prefix string consisting of lower case letters. Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: Fix pool record consumption for Xu-cpu versions ------------- Changes: - all: https://git.openjdk.org/skara/pull/1509/files - new: https://git.openjdk.org/skara/pull/1509/files/bc43df18..2316061f Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1509&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1509&range=00-01 Stats: 15 lines in 2 files changed: 13 ins; 0 del; 2 mod Patch: https://git.openjdk.org/skara/pull/1509.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1509/head:pull/1509 PR: https://git.openjdk.org/skara/pull/1509 From erikj at openjdk.org Tue Apr 25 21:52:10 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 25 Apr 2023 21:52:10 GMT Subject: RFR: 1892: Handle jfx cpu versions In-Reply-To: References: Message-ID: On Tue, 25 Apr 2023 19:50:57 GMT, Erik Joelsson wrote: > The JdkVersion parser needs to handle versions on the form "jfx-cpu" and "jfxXXu-cpu". I chose to just accept any prefix string consisting of lower case letters. I found a way to also deal with pool record consumption for these kinds of versions. ------------- PR Comment: https://git.openjdk.org/skara/pull/1509#issuecomment-1522463180 From erikj at openjdk.org Tue Apr 25 22:16:57 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 25 Apr 2023 22:16:57 GMT Subject: RFR: 1890: Add method getExpiredDeployKeys In-Reply-To: <8JBUbYhw6_S7MKOwm0opCEUNapohdbmJHXEw3Gx_vv8=.526a45e7-b15b-42ff-ae52-5e712f60f5c0@github.com> References: <8JBUbYhw6_S7MKOwm0opCEUNapohdbmJHXEw3Gx_vv8=.526a45e7-b15b-42ff-ae52-5e712f60f5c0@github.com> Message-ID: <7Q524yX-0daUgj8O4lYtFFEFbbU_D8HqAVPkYzyaWmY=.dc6a21a2-985f-480b-95e2-08d9c68f0ba4@github.com> On Tue, 25 Apr 2023 19:01:25 GMT, Zhao Song wrote: > Add a new method called getExpiredDeployKeys in HostedRepository I'm not sure about the "Expired" part of the method name. In the forge, the keys aren't expired, we are just searching for keys older than a certain duration. Also note that the prefix 'get' isn't used much in Skara code. I would suggest `HostedRepository::deployKeyTitles`. ------------- PR Comment: https://git.openjdk.org/skara/pull/1508#issuecomment-1522489614 From erikj at openjdk.org Tue Apr 25 22:19:24 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 25 Apr 2023 22:19:24 GMT Subject: Integrated: 1892: Handle jfx cpu versions In-Reply-To: References: Message-ID: On Tue, 25 Apr 2023 19:50:57 GMT, Erik Joelsson wrote: > The JdkVersion parser needs to handle versions on the form "jfx-cpu" and "jfxXXu-cpu". I chose to just accept any prefix string consisting of lower case letters. This pull request has now been integrated. Changeset: f46fa412 Author: Erik Joelsson URL: https://git.openjdk.org/skara/commit/f46fa41221fd06ec6b52a0cbc6001c286d15b2e3 Stats: 30 lines in 4 files changed: 23 ins; 1 del; 6 mod 1892: Handle jfx cpu versions Reviewed-by: kcr ------------- PR: https://git.openjdk.org/skara/pull/1509 From zsong at openjdk.org Tue Apr 25 22:19:24 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 25 Apr 2023 22:19:24 GMT Subject: RFR: 1890: Add method getExpiredDeployKeys In-Reply-To: <7Q524yX-0daUgj8O4lYtFFEFbbU_D8HqAVPkYzyaWmY=.dc6a21a2-985f-480b-95e2-08d9c68f0ba4@github.com> References: <8JBUbYhw6_S7MKOwm0opCEUNapohdbmJHXEw3Gx_vv8=.526a45e7-b15b-42ff-ae52-5e712f60f5c0@github.com> <7Q524yX-0daUgj8O4lYtFFEFbbU_D8HqAVPkYzyaWmY=.dc6a21a2-985f-480b-95e2-08d9c68f0ba4@github.com> Message-ID: On Tue, 25 Apr 2023 22:14:50 GMT, Erik Joelsson wrote: > I'm not sure about the "Expired" part of the method name. In the forge, the keys aren't expired, we are just searching for keys older than a certain duration. Also note that the prefix 'get' isn't used much in Skara code. I would suggest `HostedRepository::deployKeyTitles`. Yes, makes sense. I will change the name of this method. Thx ------------- PR Comment: https://git.openjdk.org/skara/pull/1508#issuecomment-1522491507 From zsong at openjdk.org Tue Apr 25 22:25:56 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 25 Apr 2023 22:25:56 GMT Subject: RFR: 1890: Add method getExpiredDeployKeys [v2] In-Reply-To: <8JBUbYhw6_S7MKOwm0opCEUNapohdbmJHXEw3Gx_vv8=.526a45e7-b15b-42ff-ae52-5e712f60f5c0@github.com> References: <8JBUbYhw6_S7MKOwm0opCEUNapohdbmJHXEw3Gx_vv8=.526a45e7-b15b-42ff-ae52-5e712f60f5c0@github.com> Message-ID: > Add a new method called getExpiredDeployKeys in HostedRepository Zhao Song has updated the pull request incrementally with one additional commit since the last revision: update method name ------------- Changes: - all: https://git.openjdk.org/skara/pull/1508/files - new: https://git.openjdk.org/skara/pull/1508/files/50099540..b4acf2ac Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1508&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1508&range=00-01 Stats: 7 lines in 7 files changed: 0 ins; 0 del; 7 mod Patch: https://git.openjdk.org/skara/pull/1508.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1508/head:pull/1508 PR: https://git.openjdk.org/skara/pull/1508 From erikj at openjdk.org Tue Apr 25 22:48:46 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 25 Apr 2023 22:48:46 GMT Subject: RFR: 1890: Add method getExpiredDeployKeys [v2] In-Reply-To: References: <8JBUbYhw6_S7MKOwm0opCEUNapohdbmJHXEw3Gx_vv8=.526a45e7-b15b-42ff-ae52-5e712f60f5c0@github.com> Message-ID: On Tue, 25 Apr 2023 22:25:56 GMT, Zhao Song wrote: >> Add a new method called getExpiredDeployKeys in HostedRepository > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > update method name Maybe also update the bug title? I would recommend not mentioning the exact method name in the title, but instead describing the new API. Something like "Add API to get deploy keys for a repository". forge/src/test/java/org/openjdk/skara/forge/github/GitHubRestApiTests.java line 273: > 271: > 272: @Test > 273: void testGetExpiredDeployKeys() { Update test name? ------------- PR Review: https://git.openjdk.org/skara/pull/1508#pullrequestreview-1400865122 PR Review Comment: https://git.openjdk.org/skara/pull/1508#discussion_r1177136067 From zsong at openjdk.org Tue Apr 25 22:55:31 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 25 Apr 2023 22:55:31 GMT Subject: RFR: 1890: Add method getExpiredDeployKeys [v3] In-Reply-To: <8JBUbYhw6_S7MKOwm0opCEUNapohdbmJHXEw3Gx_vv8=.526a45e7-b15b-42ff-ae52-5e712f60f5c0@github.com> References: <8JBUbYhw6_S7MKOwm0opCEUNapohdbmJHXEw3Gx_vv8=.526a45e7-b15b-42ff-ae52-5e712f60f5c0@github.com> Message-ID: > Add a new method called getExpiredDeployKeys in HostedRepository Zhao Song has updated the pull request incrementally with one additional commit since the last revision: update tests name ------------- Changes: - all: https://git.openjdk.org/skara/pull/1508/files - new: https://git.openjdk.org/skara/pull/1508/files/b4acf2ac..7b4f36d9 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1508&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1508&range=01-02 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/skara/pull/1508.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1508/head:pull/1508 PR: https://git.openjdk.org/skara/pull/1508 From zsong at openjdk.org Tue Apr 25 22:55:31 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 25 Apr 2023 22:55:31 GMT Subject: RFR: 1890: Add method getExpiredDeployKeys [v2] In-Reply-To: References: <8JBUbYhw6_S7MKOwm0opCEUNapohdbmJHXEw3Gx_vv8=.526a45e7-b15b-42ff-ae52-5e712f60f5c0@github.com> Message-ID: On Tue, 25 Apr 2023 22:45:06 GMT, Erik Joelsson wrote: >> Zhao Song has updated the pull request incrementally with one additional commit since the last revision: >> >> update method name > > forge/src/test/java/org/openjdk/skara/forge/github/GitHubRestApiTests.java line 273: > >> 271: >> 272: @Test >> 273: void testGetExpiredDeployKeys() { > > Update test name? Will fix it, thanks for catching it! ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1508#discussion_r1177138511 From zsong at openjdk.org Wed Apr 26 15:39:53 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 26 Apr 2023 15:39:53 GMT Subject: Integrated: 1873: Possible notification race with tags In-Reply-To: References: Message-ID: On Mon, 24 Apr 2023 21:27:47 GMT, Zhao Song wrote: > As Erik said in the issue description, "If a new commit is integrated into a repository branch and quickly tagged, the notifier may miss updating the "Resolved In Build" field in the issue associated with that commit. This happens if the same RepositoryWorkItem instance handles both the tag and the commit, because it will handle the tag first, before a suitable backport has been created". > > To solve this issue, we need to rearrange the order of handles of the tags and commits. > > I checked the logic in the two methods(**handleTags** and **handleRef**) and I couldn't find any problem would be introduced due to this change. But I could not guarantee that no problem would be found later. This pull request has now been integrated. Changeset: e51b2df0 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/e51b2df0b42d344b6121316c4ee5fdfdbb325f12 Stats: 85 lines in 2 files changed: 79 ins; 4 del; 2 mod 1873: Possible notification race with tags Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1507 From zsong at openjdk.org Wed Apr 26 20:30:39 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 26 Apr 2023 20:30:39 GMT Subject: RFR: 1860: Make it possible to configure PR bot to jcheck all commits in "Merge PR" Message-ID: <3T6g0vCkk0i-ioLyLqVGeWSsltHSE9XMWMsJgL-U0Dg=.45437eee-3237-4192-aac4-407b7196c41e@github.com> In this patch, PR bot has been added with the capability to control whether jcheck every commit in a merge PR. By default, jcheckMerge is enabled. However, if it is desired to enable jcheckMerge in a repo, the configuration can be added to the PR bot configuration as follows: { "pr": { "repositories": { "repo1": { "jcheckMerge": true } } } } If jcheckMerge is true, then the pr bot would jcheck all the commits in the merge PR and if any jcheck doesn't pass, the error message will be treated as Integration blocker. ------------- Commit messages: - SKARA-1860 Changes: https://git.openjdk.org/skara/pull/1510/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1510&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1860 Stats: 130 lines in 8 files changed: 112 ins; 5 del; 13 mod Patch: https://git.openjdk.org/skara/pull/1510.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1510/head:pull/1510 PR: https://git.openjdk.org/skara/pull/1510 From erikj at openjdk.org Wed Apr 26 22:17:47 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 26 Apr 2023 22:17:47 GMT Subject: RFR: 1860: Make it possible to configure PR bot to jcheck all commits in "Merge PR" In-Reply-To: <3T6g0vCkk0i-ioLyLqVGeWSsltHSE9XMWMsJgL-U0Dg=.45437eee-3237-4192-aac4-407b7196c41e@github.com> References: <3T6g0vCkk0i-ioLyLqVGeWSsltHSE9XMWMsJgL-U0Dg=.45437eee-3237-4192-aac4-407b7196c41e@github.com> Message-ID: On Wed, 26 Apr 2023 20:19:16 GMT, Zhao Song wrote: > In this patch, PR bot has been added with the capability to control whether jcheck every commit in a merge PR. > > By default, jcheckMerge is enabled. > > However, if it is desired to enable jcheckMerge in a repo, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "jcheckMerge": true > } > } > } > } > > If jcheckMerge is true, then the pr bot would jcheck all the commits in the merge PR and if any jcheck doesn't pass, the error message will be treated as Integration blocker. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1159: > 1157: mergeJCheckMessage.addAll(visitor.messages().stream() > 1158: .map(StringBuilder::new) > 1159: .map(e -> e.append(" (failed when running jcheck with commit " + hash.hex() + ")")) Suggestion: .map(e -> e.append(" (in commit " + hash.hex() + ")")) bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1162: > 1160: .map(StringBuilder::toString) > 1161: .toList()); > 1162: } catch (Exception e) { I think instead of catching Exception here, let the outer try-catch take it as that will trigger a retry and a suitable message to be printed. bots/pr/src/test/java/org/openjdk/skara/bots/pr/MergeTests.java line 1784: > 1782: TestBotRunner.runPeriodicItems(mergeBot); > 1783: > 1784: // The bot should reply with an ok message This looks like the opposite of "ok". ? ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1510#discussion_r1178444514 PR Review Comment: https://git.openjdk.org/skara/pull/1510#discussion_r1178440472 PR Review Comment: https://git.openjdk.org/skara/pull/1510#discussion_r1178443228 From zsong at openjdk.org Wed Apr 26 22:25:18 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 26 Apr 2023 22:25:18 GMT Subject: RFR: 1860: Make it possible to configure PR bot to jcheck all commits in "Merge PR" [v2] In-Reply-To: <3T6g0vCkk0i-ioLyLqVGeWSsltHSE9XMWMsJgL-U0Dg=.45437eee-3237-4192-aac4-407b7196c41e@github.com> References: <3T6g0vCkk0i-ioLyLqVGeWSsltHSE9XMWMsJgL-U0Dg=.45437eee-3237-4192-aac4-407b7196c41e@github.com> Message-ID: > In this patch, PR bot has been added with the capability to control whether jcheck every commit in a merge PR. > > By default, jcheckMerge is enabled. > > However, if it is desired to enable jcheckMerge in a repo, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "jcheckMerge": true > } > } > } > } > > If jcheckMerge is true, then the pr bot would jcheck all the commits in the merge PR and if any jcheck doesn't pass, the error message will be treated as Integration blocker. 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/CheckRun.java Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> ------------- Changes: - all: https://git.openjdk.org/skara/pull/1510/files - new: https://git.openjdk.org/skara/pull/1510/files/fce92cab..0a436875 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1510&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1510&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1510.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1510/head:pull/1510 PR: https://git.openjdk.org/skara/pull/1510 From zsong at openjdk.org Wed Apr 26 22:25:18 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 26 Apr 2023 22:25:18 GMT Subject: RFR: 1860: Make it possible to configure PR bot to jcheck all commits in "Merge PR" [v2] In-Reply-To: References: <3T6g0vCkk0i-ioLyLqVGeWSsltHSE9XMWMsJgL-U0Dg=.45437eee-3237-4192-aac4-407b7196c41e@github.com> Message-ID: On Wed, 26 Apr 2023 22:06:47 GMT, Erik Joelsson wrote: >> 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/CheckRun.java >> >> Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> > > bots/pr/src/test/java/org/openjdk/skara/bots/pr/MergeTests.java line 1784: > >> 1782: TestBotRunner.runPeriodicItems(mergeBot); >> 1783: >> 1784: // The bot should reply with an ok message > > This looks like the opposite of "ok". ? Will fix it! ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1510#discussion_r1178451379 From zsong at openjdk.org Wed Apr 26 22:29:58 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 26 Apr 2023 22:29:58 GMT Subject: RFR: 1860: Make it possible to configure PR bot to jcheck all commits in "Merge PR" [v2] In-Reply-To: References: <3T6g0vCkk0i-ioLyLqVGeWSsltHSE9XMWMsJgL-U0Dg=.45437eee-3237-4192-aac4-407b7196c41e@github.com> Message-ID: On Wed, 26 Apr 2023 22:02:51 GMT, Erik Joelsson wrote: >> 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/CheckRun.java >> >> Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1162: > >> 1160: .map(StringBuilder::toString) >> 1161: .toList()); >> 1162: } catch (Exception e) { > > I think instead of catching Exception here, let the outer try-catch take it as that will trigger a retry and a suitable message to be printed. Ah, right. And I will also remove the try catch when running "second jcheck". ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1510#discussion_r1178455002 From erikj at openjdk.org Wed Apr 26 22:42:37 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 26 Apr 2023 22:42:37 GMT Subject: RFR: 1860: Make it possible to configure PR bot to jcheck all commits in "Merge PR" [v2] In-Reply-To: References: <3T6g0vCkk0i-ioLyLqVGeWSsltHSE9XMWMsJgL-U0Dg=.45437eee-3237-4192-aac4-407b7196c41e@github.com> Message-ID: <_uUKoX5ZWeeFUkgL82DcXl6c9Y2pfu5uY95gRP84QbE=.d690f3b4-e94a-4e44-82b4-74c70ff09bae@github.com> On Wed, 26 Apr 2023 22:27:44 GMT, Zhao Song wrote: >> bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1162: >> >>> 1160: .map(StringBuilder::toString) >>> 1161: .toList()); >>> 1162: } catch (Exception e) { >> >> I think instead of catching Exception here, let the outer try-catch take it as that will trigger a retry and a suitable message to be printed. > > Ah, right. And I will also remove the try catch when running "second jcheck". Good, do that please. For the second jcheck, there may be a usecase for printing the exception, because the user has made edits to .jcheck/conf. On the other hand, I don't think we should ever print `e.getMessage()` on a caught `Exception` instance to the user unless we know exactly what would have thrown it. It's enough that it gets logged for now. If jcheck throws exceptions that the user needs to see, then we need to fix jcheck to present that as a valid failure instead. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1510#discussion_r1178461797 From zsong at openjdk.org Wed Apr 26 23:43:42 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 26 Apr 2023 23:43:42 GMT Subject: RFR: 1860: Make it possible to configure PR bot to jcheck all commits in "Merge PR" [v3] In-Reply-To: <3T6g0vCkk0i-ioLyLqVGeWSsltHSE9XMWMsJgL-U0Dg=.45437eee-3237-4192-aac4-407b7196c41e@github.com> References: <3T6g0vCkk0i-ioLyLqVGeWSsltHSE9XMWMsJgL-U0Dg=.45437eee-3237-4192-aac4-407b7196c41e@github.com> Message-ID: > In this patch, PR bot has been added with the capability to control whether jcheck every commit in a merge PR. > > By default, jcheckMerge is enabled. > > However, if it is desired to enable jcheckMerge in a repo, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "jcheckMerge": true > } > } > } > } > > If jcheckMerge is true, then the pr bot would jcheck all the commits in the merge PR and if any jcheck doesn't pass, the error message will be treated as Integration blocker. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: remove try catch when running jchecks ------------- Changes: - all: https://git.openjdk.org/skara/pull/1510/files - new: https://git.openjdk.org/skara/pull/1510/files/0a436875..39288068 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1510&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1510&range=01-02 Stats: 115 lines in 3 files changed: 69 ins; 13 del; 33 mod Patch: https://git.openjdk.org/skara/pull/1510.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1510/head:pull/1510 PR: https://git.openjdk.org/skara/pull/1510 From zsong at openjdk.org Wed Apr 26 23:44:07 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 26 Apr 2023 23:44:07 GMT Subject: RFR: 1860: Make it possible to configure PR bot to jcheck all commits in "Merge PR" [v3] In-Reply-To: References: <3T6g0vCkk0i-ioLyLqVGeWSsltHSE9XMWMsJgL-U0Dg=.45437eee-3237-4192-aac4-407b7196c41e@github.com> Message-ID: On Wed, 26 Apr 2023 23:43:42 GMT, Zhao Song wrote: >> In this patch, PR bot has been added with the capability to control whether jcheck every commit in a merge PR. >> >> By default, jcheckMerge is enabled. >> >> However, if it is desired to enable jcheckMerge in a repo, the configuration can be added to the PR bot configuration as follows: >> >> { >> "pr": { >> "repositories": { >> "repo1": { >> "jcheckMerge": true >> } >> } >> } >> } >> >> If jcheckMerge is true, then the pr bot would jcheck all the commits in the merge PR and if any jcheck doesn't pass, the error message will be treated as Integration blocker. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > remove try catch when running jchecks bots/pr/src/test/java/org/openjdk/skara/bots/pr/CheckTests.java line 1353: > 1351: > 1352: @Test > 1353: void invalidUpdatedJCheckConf(TestInfo testInfo) throws IOException { Now, this test duplicates `testRunJcheckTwiceWithBadConfiguration`, but I don't think it would hurt to keep it. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1510#discussion_r1178493031 From erikj at openjdk.org Thu Apr 27 18:05:30 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 27 Apr 2023 18:05:30 GMT Subject: RFR: 1860: Make it possible to configure PR bot to jcheck all commits in "Merge PR" [v3] In-Reply-To: References: <3T6g0vCkk0i-ioLyLqVGeWSsltHSE9XMWMsJgL-U0Dg=.45437eee-3237-4192-aac4-407b7196c41e@github.com> Message-ID: On Wed, 26 Apr 2023 23:43:42 GMT, Zhao Song wrote: >> In this patch, PR bot has been added with the capability to control whether jcheck every commit in a merge PR. >> >> By default, jcheckMerge is enabled. >> >> However, if it is desired to enable jcheckMerge in a repo, the configuration can be added to the PR bot configuration as follows: >> >> { >> "pr": { >> "repositories": { >> "repo1": { >> "jcheckMerge": true >> } >> } >> } >> } >> >> If jcheckMerge is true, then the pr bot would jcheck all the commits in the merge PR and if any jcheck doesn't pass, the error message will be treated as Integration blocker. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > remove try catch when running jchecks Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1510#pullrequestreview-1404604881 From zsong at openjdk.org Thu Apr 27 18:13:23 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 27 Apr 2023 18:13:23 GMT Subject: RFR: 1860: Make it possible to configure PR bot to jcheck all commits in "Merge PR" [v3] In-Reply-To: References: <3T6g0vCkk0i-ioLyLqVGeWSsltHSE9XMWMsJgL-U0Dg=.45437eee-3237-4192-aac4-407b7196c41e@github.com> Message-ID: <63kILdbc1BxUOJ9AZC5jdGSnX_pzQy7fY48V8ZifjtM=.6f58d0e9-a195-4d47-b186-2eb9415d7717@github.com> On Wed, 26 Apr 2023 23:43:42 GMT, Zhao Song wrote: >> In this patch, PR bot has been added with the capability to control whether jcheck every commit in a merge PR. >> >> By default, jcheckMerge is enabled. >> >> However, if it is desired to enable jcheckMerge in a repo, the configuration can be added to the PR bot configuration as follows: >> >> { >> "pr": { >> "repositories": { >> "repo1": { >> "jcheckMerge": true >> } >> } >> } >> } >> >> If jcheckMerge is true, then the pr bot would jcheck all the commits in the merge PR and if any jcheck doesn't pass, the error message will be treated as Integration blocker. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > remove try catch when running jchecks Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1510#issuecomment-1526119832 From zsong at openjdk.org Thu Apr 27 18:13:24 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 27 Apr 2023 18:13:24 GMT Subject: Integrated: 1860: Make it possible to configure PR bot to jcheck all commits in "Merge PR" In-Reply-To: <3T6g0vCkk0i-ioLyLqVGeWSsltHSE9XMWMsJgL-U0Dg=.45437eee-3237-4192-aac4-407b7196c41e@github.com> References: <3T6g0vCkk0i-ioLyLqVGeWSsltHSE9XMWMsJgL-U0Dg=.45437eee-3237-4192-aac4-407b7196c41e@github.com> Message-ID: On Wed, 26 Apr 2023 20:19:16 GMT, Zhao Song wrote: > In this patch, PR bot has been added with the capability to control whether jcheck every commit in a merge PR. > > By default, jcheckMerge is enabled. > > However, if it is desired to enable jcheckMerge in a repo, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "jcheckMerge": true > } > } > } > } > > If jcheckMerge is true, then the pr bot would jcheck all the commits in the merge PR and if any jcheck doesn't pass, the error message will be treated as Integration blocker. This pull request has now been integrated. Changeset: f704353b Author: Zhao Song URL: https://git.openjdk.org/skara/commit/f704353b9787eb2aa60ff642a89df17779f25cca Stats: 222 lines in 9 files changed: 176 ins; 13 del; 33 mod 1860: Make it possible to configure PR bot to jcheck all commits in "Merge PR" Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1510 From zsong at openjdk.org Thu Apr 27 23:38:38 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 27 Apr 2023 23:38:38 GMT Subject: RFR: 1734: Reduce disk usage in pr bot [v2] In-Reply-To: References: Message-ID: > As Erik mentioned in the issue, currently, pr bot would create multiple repository clones in different sub directory in the scratch directory which resulting in significant disk space wastage within the container. > > In this patch, the repository clones will be stored in a single directory at `scratch-x/pr/repos/repoName`, allowing different types of `WorkItems` to reuse this space. Zhao Song has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: - fix import - fix import - Merge branch 'master' into SKARA-1734 # Conflicts: # bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRCommand.java - add some comments - introduce ScratchArea - SKARA-1734 ------------- Changes: - all: https://git.openjdk.org/skara/pull/1491/files - new: https://git.openjdk.org/skara/pull/1491/files/1c309904..970effcc Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1491&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1491&range=00-01 Stats: 4683 lines in 87 files changed: 2600 ins; 1742 del; 341 mod Patch: https://git.openjdk.org/skara/pull/1491.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1491/head:pull/1491 PR: https://git.openjdk.org/skara/pull/1491 From erikj at openjdk.org Fri Apr 28 13:45:36 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 28 Apr 2023 13:45:36 GMT Subject: RFR: 1734: Reduce disk usage in pr bot [v2] In-Reply-To: References: Message-ID: On Thu, 27 Apr 2023 23:38:38 GMT, Zhao Song wrote: >> As Erik mentioned in the issue, currently, pr bot would create multiple repository clones in different sub directory in the scratch directory which resulting in significant disk space wastage within the container. >> >> In this patch, the repository clones will be stored in a single directory at `scratch-x/pr/repos/repoName`, allowing different types of `WorkItems` to reuse this space. > > Zhao Song has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: > > - fix import > - fix import > - Merge branch 'master' into SKARA-1734 > > # Conflicts: > # bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRCommand.java > - add some comments > - introduce ScratchArea > - SKARA-1734 Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1491#pullrequestreview-1405978179 From zsong at openjdk.org Fri Apr 28 15:54:07 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 28 Apr 2023 15:54:07 GMT Subject: RFR: 1734: Reduce disk usage in pr bot [v2] In-Reply-To: References: Message-ID: On Thu, 27 Apr 2023 23:38:38 GMT, Zhao Song wrote: >> As Erik mentioned in the issue, currently, pr bot would create multiple repository clones in different sub directory in the scratch directory which resulting in significant disk space wastage within the container. >> >> In this patch, the repository clones will be stored in a single directory at `scratch-x/pr/repos/repoName`, allowing different types of `WorkItems` to reuse this space. > > Zhao Song has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: > > - fix import > - fix import > - Merge branch 'master' into SKARA-1734 > > # Conflicts: > # bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRCommand.java > - add some comments > - introduce ScratchArea > - SKARA-1734 Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1491#issuecomment-1527762624 From zsong at openjdk.org Fri Apr 28 15:54:07 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 28 Apr 2023 15:54:07 GMT Subject: Integrated: 1734: Reduce disk usage in pr bot In-Reply-To: References: Message-ID: On Thu, 23 Mar 2023 18:56:01 GMT, Zhao Song wrote: > As Erik mentioned in the issue, currently, pr bot would create multiple repository clones in different sub directory in the scratch directory which resulting in significant disk space wastage within the container. > > In this patch, the repository clones will be stored in a single directory at `scratch-x/pr/repos/repoName`, allowing different types of `WorkItems` to reuse this space. This pull request has now been integrated. Changeset: c91bf6a5 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/c91bf6a524a8c111e93ffb7f788349cf2914526b Stats: 253 lines in 23 files changed: 166 ins; 18 del; 69 mod 1734: Reduce disk usage in pr bot Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1491