RFR: 279: Optionally only update project-specific issues
Erik Helin
ehelin at openjdk.java.net
Fri Feb 14 14:58:52 UTC 2020
On Fri, 14 Feb 2020 11:37:44 GMT, Robin Westberg <rwestberg at openjdk.org> wrote:
> Hi all,
>
> Please review this change that allows the issue notifier to only update issues when the commit originates from a matching PR. This can be used for projects that merge commits from/to different branches, but only want to be notified about the original commit resulting from a PR integration.
>
> Best regards,
> Robin
bots/notify/src/main/java/org/openjdk/skara/bots/notify/IssueUpdater.java line 266:
> 265: .filter(pr -> pr.targetRef().equals(branch.name()))
> 266: .collect(Collectors.toList());
> 267: if (pullRequests.size() == 0) {
Use [Stream.count](https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/util/stream/Stream.html#count()) here instead of materializing the list? You would have to change the following `if` to `if (count == 0L) {`.
-------------
PR: https://git.openjdk.java.net/skara/pull/439
More information about the skara-dev
mailing list