RFR: forge: support commit comments

Robin Westberg rwestberg at openjdk.java.net
Fri Jun 5 08:37:48 UTC 2020


On Thu, 4 Jun 2020 16:08:33 GMT, Erik Helin <ehelin at openjdk.org> wrote:

> Hi all,
> 
> please review this patch that adds the possibility to add a comment on a particular commit to `HostedRepository` via
> the method `addCommitComment`. To start out with I've only added support for adding a general comment about a whole
> commit, not a comment for a particular line in a commit.   The comments for a commit can also be listed with the method
> `commitComments`.
> Testing:
> - Not that much, later patches will build upon the APIs introduced in this patch
> 
> Thanks,
> Erik

Looks good in general, just had a comment regarding simplifying the API slightly.

forge/src/main/java/org/openjdk/skara/forge/CommitComment.java line 2:

> 1: /*
> 2:  * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
> 3:  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

2020!

forge/src/main/java/org/openjdk/skara/forge/CommitComment.java line 65:

> 64:      */
> 65:     public Optional<Integer> position() {
> 66:         return position == -1 ? Optional.empty() : Optional.of(position);

Perhaps drop this one? The other API's only expose a line number

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

Marked as reviewed by rwestberg (Reviewer).

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


More information about the skara-dev mailing list