RFR: 218: Enforce check on approval of CSRs

Robin Westberg rwestberg at openjdk.java.net
Wed Jan 29 07:32:56 UTC 2020


On Tue, 28 Jan 2020 13:28:45 GMT, Erik Helin <ehelin at openjdk.org> wrote:

> Hi all,
> 
> please review this patch that adds a CSR bot. The CSR bot allows a reviewer to
> issue the command `/csr` in a pull request comment. Once issued, the PR cannot
> be integrated until the CSR for the issue associated with the PR is in state
> "Closed" and "Approved". A reviewer can cancel this requirement by issuing the
> command `/csr unneeded` in a pull request comment.
> 
> Testing:
> - Added a bunch of new unit tests for the `/csr` command and the CSR bot
> - `sh gradlew test` passes on Linux x64
> 
> Thanks,
> Erik

Looks good, mostly have some spelling suggestions. ��

bots/pr/src/main/java/org/openjdk/skara/bots/pr/CommandWorkItem.java line 98:

> 97:     private void processCommand(PullRequest pr, CensusInstance censusInstance, Path scratchPath, String command, Comment comment, List<Comment> allComments) {
> 98:         System.out.println("processing command " + command);
> 99:         var writer = new StringWriter();

Revert?

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

> 42:         writer.println("has indicated that a " +
> 43:                       "[compatability and specification](https://wiki.openjdk.java.net/display/csr/Main) (CSR) request " +
> 44:                       "is needed for this pull request.");

Suggestion:

                      "[compatibility and specification](https://wiki.openjdk.java.net/display/csr/Main) (CSR) request " +

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

> 133:     public String description() {
> 134:         return "require a compatability and specification request (CSR) for this pull request";
> 135:     }

Suggestion:

        return "require a compatibility and specification request (CSR) for this pull request";

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

> 75:             assertLastCommentContains(pr, "has indicated that a " +
> 76:                                           "[compatability and specification](https://wiki.openjdk.java.net/display/csr/Main) (CSR) request " +
> 77:                                           "is needed for this pull request.");

Suggestion:

                                          "[compatibility and specification](https://wiki.openjdk.java.net/display/csr/Main) (CSR) request " +

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

> 167:             assertLastCommentContains(pr, "has indicated that a " +
> 168:                                           "[compatability and specification](https://wiki.openjdk.java.net/display/csr/Main) " +
> 169:                                           "(CSR) request is needed for this pull request.");

Suggestion:

                                          "[compatibility and specification](https://wiki.openjdk.java.net/display/csr/Main) " +

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

> 280:             assertLastCommentContains(pr, "has indicated that a " +
> 281:                                           "[compatability and specification](https://wiki.openjdk.java.net/display/csr/Main) " +
> 282:                                           "(CSR) request is needed for this pull request.");

Suggestion:

                                          "[compatibility and specification](https://wiki.openjdk.java.net/display/csr/Main) " +

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

> 322:             assertLastCommentContains(pr, "has indicated that a " +
> 323:                                           "[compatability and specification](https://wiki.openjdk.java.net/display/csr/Main) (CSR) request " +
> 324:                                           "is needed for this pull request.");

Suggestion:

                                          "[compatibility and specification](https://wiki.openjdk.java.net/display/csr/Main) (CSR) request " +

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

Marked as reviewed by rwestberg (Reviewer).

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


More information about the skara-dev mailing list