RFR: git-pr: add csr sub-command

Jorn Vernee jvernee at openjdk.java.net
Thu Jul 9 13:50:17 UTC 2020


On Thu, 9 Jul 2020 13:37:55 GMT, Erik Helin <ehelin at openjdk.org> wrote:

> Hi all,
> 
> please review this patch that adds the `git pr csr` sub-command that corresponds to the
> [`/csr`](https://wiki.openjdk.java.net/display/SKARA/Pull+Request+Commands#PullRequestCommands-/csr) pull request
> command. A contributor who prefers the command-line can now state that a pull request requires a
> [CSR](https://wiki.openjdk.java.net/display/csr) by running `git pr csr --needed`.  Testing:
> - [x] Manual testing on Linux x64
> 
> Thanks,
> Erik

Marked as reviewed by jvernee (Reviewer).

bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRCommand.java line 37:

> 36:     private static void showHelp(PrintWriter writer) {
> 37:         writer.println("usage: `/csr [needed|unneeded]`, requires that the issue the pull request links to an
> approved [CSR](https://wiki.openjdk.java.net/display/csr/Main) request."); 38:     }

Looks like a pre-existing typo:
Suggestion:

        writer.println("usage: `/csr [needed|unneeded]`, requires that the issue the pull request links to, links to an
        approved [CSR](https://wiki.openjdk.java.net/display/csr/Main) request.");

bots/pr/src/test/java/org/openjdk/skara/bots/pr/CSRTests.java line 253:

> 252:             assertLastCommentContains(pr, "usage: `/csr [needed|unneeded]`, requires that the issue the pull
> request links " + 253:                                           "to an approved
> [CSR](https://wiki.openjdk.java.net/display/csr/Main) request."); 254:
> assertFalse(pr.labels().contains("csr"));

Same here
Suggestion:

            assertLastCommentContains(pr, "usage: `/csr [needed|unneeded]`, requires that the issue the pull request links " +
                                          "to, links to an approved [CSR](https://wiki.openjdk.java.net/display/csr/Main) request.");

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

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


More information about the skara-dev mailing list