RFR: 2292: Improve the labels of Review/Commit links for backport branches [v2]

Zhao Song zsong at openjdk.org
Mon Jul 8 17:25:06 UTC 2024


On Mon, 8 Jul 2024 09:40:38 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> Zhao Song has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   review comment
>
> bots/notify/src/main/java/org/openjdk/skara/bots/notify/PullRequestWorkItem.java line 290:
> 
>> 288:             }
>> 289:             var storedTargetBranch = storedState.get().targetBranch();
>> 290:             if (storedTargetBranch == null || !storedTargetBranch.equals(state.targetBranch())) {
> 
> I think we need to flip this check. If `storedTargetBranch` is null and we for some reason get a null from `state.targetBranch()`, then this will keep notifying even though there is no change. If we instead flip it to
> 
> state.targetBranch() != null && !state.targetBranch().equals(storedTargetBranch)
> 
> then we will only notify if the updated branch is not null. It may never be needed, but it's a bit more defensive against unexpected data being returned from the forge.

Yes, it's a good point. Thanks!

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

PR Review Comment: https://git.openjdk.org/skara/pull/1671#discussion_r1669012822


More information about the skara-dev mailing list