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

Magnus Ihse Bursie ihse at openjdk.org
Tue Feb 14 09:07:58 UTC 2023

On Tue, 14 Feb 2023 00:11:21 GMT, Zhao Song <zsong at openjdk.org> wrote:

>> Since 'WIP' is deprecated in GitLab, we need to update methods related with 'WIP'.
> 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!


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

More information about the skara-dev mailing list