Integrated: 1188: The pr/NNNN branches are not always deleted when a PR is closed
Guoxiong Li
gli at openjdk.java.net
Mon Nov 22 17:17:45 UTC 2021
On Sun, 21 Nov 2021 14:56:30 GMT, Guoxiong Li <gli at openjdk.org> wrote:
> Hi all,
>
> When a PR is ready for reviewing, the label `rfr` will be added and skara will create the branch `pr/NNNN` for it.
> If we convert the PR back to draft, the label `rfr` would be removed and the branch `pr/NNNN` won't be deleted.
> Then we close the PR, **the bot won't deleted the branch**.
>
> The reason is that the following code checks the label `rfr` or `integrated` to decide whether the bot should remove the branch.
>
>
> private boolean isOfInterest(PullRequest pr) {
> var labels = new HashSet<>(pr.labelNames());
> if (!(labels.contains("rfr") || labels.contains("integrated"))) {
> log.fine("PR is not yet ready - needs either 'rfr' or 'integrated' label");
> return false;
> }
> // ignore......
> }
>
>
> To solve this issue, this patch adds one situation about the branch existing or not. And the corresponding test is added.
>
> Thanks for taking the time to review.
>
> Best Regards,
> -- Guoxiong
This pull request has now been integrated.
Changeset: e951b64e
Author: Guoxiong Li <gli at openjdk.org>
Committer: Erik Joelsson <erikj at openjdk.org>
URL: https://git.openjdk.java.net/skara/commit/e951b64e020941414866d292c81594e42e43243a
Stats: 61 lines in 2 files changed: 58 ins; 0 del; 3 mod
1188: The pr/NNNN branches are not always deleted when a PR is closed
Reviewed-by: erikj
-------------
PR: https://git.openjdk.java.net/skara/pull/1242
More information about the skara-dev
mailing list