Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support Gitlab Draft mode field #442

Merged
merged 1 commit into from
May 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
support Gitlab Draft mode field
  • Loading branch information
squeedee committed May 3, 2024
commit 2b63082f51e7516ad896626c4aa01c47d4ba66e7
3 changes: 2 additions & 1 deletion scm/driver/gitlab/pr.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ type pr struct {
Labels []*string `json:"labels"`
Link string `json:"web_url"`
WIP bool `json:"work_in_progress"`
Draft bool `json:"draft"`
Author user `json:"author"`
MergeStatus string `json:"merge_status"`
SourceBranch string `json:"source_branch"`
Expand Down Expand Up @@ -411,7 +412,7 @@ func (s *pullService) convertPullRequest(ctx context.Context, from *pr) (*scm.Pu
Source: from.SourceBranch,
Target: from.TargetBranch,
Link: from.Link,
Draft: from.WIP,
Draft: from.WIP || from.Draft,
Closed: from.State != "opened",
Merged: from.State == "merged",
Mergeable: scm.ToMergeableState(from.MergeStatus) == scm.MergeableStateMergeable,
Expand Down