RFR: 1076: Not possible to use 'Backport <sha>' if original bug doesn't have public sha

Kevin Rushforth kcr at openjdk.java.net
Fri Jun 11 18:56:23 UTC 2021


On Fri, 11 Jun 2021 18:02:28 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> This patch adds a new way of declaring a pull requests to be a backport for situations where the original hash of the original change is not known or available. Technically such a PR should already work without the backport label, but it will display a warning about the issue not being open. By being able to declare a backport, that warning will be eliminated, which should make the user experience smoother and hopefully help avoid mistakes.
> 
> To use the new feature, you create a PR with a title "Backport <issueid>" instead of "Backport <hash>". Once this goes live, I will update the Skara wiki documentation.

Looks good.

bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 302:

> 300:             }
> 301: 
> 302:             // Check for a title on the form Backport <issueid>

Minor: "'of' the form ..."?

bots/pr/src/test/java/org/openjdk/skara/bots/pr/BackportTests.java line 1458:

> 1456:             assertEquals(List.of(), message.contributors());
> 1457:             assertEquals(List.of(), message.summaries());
> 1458:             assertEquals(List.of(), message.additional());

It might be good to also check that the commit message does not contain "Backport of", or is this covered by checking that `message.additional()` is empty?

-------------

Marked as reviewed by kcr (Reviewer).

PR: https://git.openjdk.java.net/skara/pull/1186


More information about the skara-dev mailing list