RFR: 1539: Allow dots in merge PR branch name

Kevin Rushforth kcr at openjdk.org
Thu Aug 11 14:02:35 UTC 2022


On Thu, 11 Aug 2022 13:51:02 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> This patch makes it possible to create merge style PRs based on branches with periods `.` in the branch name. We quite commonly put periods in branch names as we like to base branches on version strings.
> 
> Modified an existing test to cover this case.

I left a question about the fix to the pattern string.

forge/src/main/java/org/openjdk/skara/forge/PullRequestUtils.java line 42:

> 40:     }
> 41: 
> 42:     private final static Pattern mergeSourcePattern = Pattern.compile("^Merge ([-/.\\w:+]+)$");

This will match any character, which may not be what you intend. Shouldn't that be `\.` instead of just `.`?

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

PR: https://git.openjdk.org/skara/pull/1355


More information about the skara-dev mailing list