Skip to content

fix(gitlab): map WorkInProgress to IsDraft in MR converter#8982

Open
mfrancisc wants to merge 1 commit into
apache:mainfrom
mfrancisc:upstream/fix-gitlab-isdraft
Open

fix(gitlab): map WorkInProgress to IsDraft in MR converter#8982
mfrancisc wants to merge 1 commit into
apache:mainfrom
mfrancisc:upstream/fix-gitlab-isdraft

Conversation

@mfrancisc

@mfrancisc mfrancisc commented Jul 8, 2026

Copy link
Copy Markdown

Summary

WorkInProgress was extracted from the GitLab API and stored in _tool_gitlab_merge_requests but never forwarded to code.PullRequest.IsDraft during conversion. Draft/WIP MRs were indistinguishable from non-draft MRs at the domain layer.

Changes

  • Add IsDraft: gitlabMr.WorkInProgress to the MR converter struct
  • Update e2e snapshot: MRs 145012495 and 158698019 now have is_draft=1

Note

GitLab deprecated work_in_progress in favor of draft (API v4, GitLab 14.0+), but still returns it for backward compatibility. This fix uses the existing extracted field — adding support for the newer draft field is a separate concern.

WorkInProgress was extracted from the GitLab API and stored in
_tool_gitlab_merge_requests but never forwarded to code.PullRequest.IsDraft
during conversion. Draft/WIP MRs were indistinguishable from non-draft MRs
at the domain layer.
- Add IsDraft: gitlabMr.WorkInProgress to the converter struct
- Update e2e snapshot: MRs 145012495 and 158698019 now have is_draft=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant