RFR: 1995: The logic for getting repository name and branch name in the backport pr command is inconsistent
Zhao Song
zsong at openjdk.org
Thu Aug 17 16:01:00 UTC 2023
On Thu, 17 Aug 2023 15:18:54 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
>> In the backport pull request command, the process of getting the repository name and branch name differs between cancelling a backport request and creating a backport request.
>>
>> In this patch, I made the logic consistent.
>
> bots/pr/src/main/java/org/openjdk/skara/bots/pr/BackportCommand.java line 185:
>
>> 183: }
>> 184:
>> 185: private Branch getTargetBranch(String targetBranchName, HostedRepository targetRepo, PrintWriter reply) {
>
> I don't like how the string `"master"` is now repeated in three places. Could we move that check back here? We could add the parts index as a parameter to this method and supply the full array.
Sure. It's a good idea.
-------------
PR Review Comment: https://git.openjdk.org/skara/pull/1545#discussion_r1297431458
More information about the skara-dev
mailing list