RFR: 1817: 'WIP merge requests' renamed to 'draft merge requests' in GitLab

Guoxiong Li gli at openjdk.org
Tue Feb 14 09:07:58 UTC 2023


On Tue, 14 Feb 2023 09:02:57 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

>> forge/src/main/java/org/openjdk/skara/forge/gitlab/GitLabRepository.java line 117:
>> 
>>> 115:                         .body("source_branch", sourceRef)
>>> 116:                         .body("target_branch", targetRef)
>>> 117:                         .body("title", (draft ? "Draft: " : "") + title)
>> 
>> During my test, I was surprised that when `draft` is true, the title will be "Draft: " without the real title. Seems like priority of operators is a little weird. `+` is greater than `?:`.
>
> I think `?:` has one of the lowest precedents in C-like languages. If you think of it more like an "if" construct, it kind of make sense. But nicely spotted, anyway!

Nice found.

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

PR: https://git.openjdk.org/skara/pull/1472


More information about the skara-dev mailing list