RFR: 574: git-info should use info from commit notifications [v3]

Erik Helin ehelin at openjdk.java.net
Mon Feb 15 18:11:19 UTC 2021

On Mon, 15 Feb 2021 12:58:47 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

>> git-info should use info from commit notifications to get the link to the review, not JBS (since not all PR have issues)
>> This required refactoring to move the hosted repo logic from cli/pr/Utils.java to where it can be accessed by all CLI tools. After some deliberating, I left a bunch of trivial wrappers in cli/pr/Utils.java -- otherwise this change would have touched *all* the files in cli/pr.
>> Testing: ad hoc testing of "git info" on some arbitrary Skara commits.
> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
>   Add test for reviewUrl parsing

forge/src/main/java/org/openjdk/skara/forge/HostedRepository.java line 103:

> 101:          */
> 102: 
> 103:         var pattern = Pattern.compile("### Review[^]]*]\\((.*)\\)");

Do you need to use `Pattern.DOTALL` here? As in `Pattern.compile("### Review[^]]*]\((.*)\)", Pattern.DOTALL);` ? I'm thinking about the `.*` handling `\n`.


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

More information about the skara-dev mailing list