RFR: notify: store resulting commit in PullRequestState
rwestberg at openjdk.java.net
Fri Jun 5 13:50:08 UTC 2020
On Fri, 5 Jun 2020 12:04:10 GMT, Erik Helin <ehelin at openjdk.org> wrote:
> Hi all,
> please review this patch that the resulting (integrated) commit from a PR in the `PullRequestState`. This data will be
> used in future patches for more easier handling of notifications. Note that all data in the `Storage` might not have
> the `"commit"` field. If that is the case, then the code will lazily populate the `"commit"` field. Testing:
> - [x] `make test` on Linux x64
Looks good, but may need to add an extra configuration field.
bots/notify/src/main/java/org/openjdk/skara/bots/notify/PullRequestWorkItem.java line 179:
> 178: var issues = parseIssues();
> 179: var commit = resultingCommitHashFor(pr, pr.repository().forge().currentUser());
> 180: var state = new PullRequestState(pr, issues, commit);
The notifier bot may not be running with the same credentials as the commit bot, so this is possibly the wrong user to
look for. The other bots (mlbridge, pr) takes a username from the configuration to use for matching comment poster ids.
Marked as reviewed by rwestberg (Reviewer).
More information about the skara-dev