RFR: 1133: Source branch for /backport PRs is outdated [v2]
Erik Joelsson
erikj at openjdk.java.net
Fri Aug 27 19:55:12 UTC 2021
On Tue, 24 Aug 2021 18:07:18 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> As mentioned in the JBS bug report for this bug, [SKARA-1080](https://bugs.openjdk.java.net/browse/SKARA-1080), which was fixed by PR #1188, was only a partial fix of the problem where the `/backport` command creates the local branch for the PR based off a stale copy of the target branch. The solution is to fetch the target branch from the target repo and base the patch off of that branch.
>>
>> I didn't add any new tests for this case, so I'll file a follow-up issue.
>
> Kevin Rushforth has updated the pull request incrementally with one additional commit since the last revision:
>
> empty commit to trigger GitHub Actions
Good catch! Looks good, but can be cleaned up a little bit.
bots/pr/src/main/java/org/openjdk/skara/bots/pr/BackportCommand.java line 127:
> 125: .materialize(targetRepo, localRepoDir);
> 126: var fetchHead = localRepo.fetch(bot.repo().url(), hash.hex(), false);
> 127: localRepo.checkout(targetBranch);
I think this line can be removed.
-------------
PR: https://git.openjdk.java.net/skara/pull/1209
More information about the skara-dev
mailing list