Skip to content

Commit 2b63082

Browse files
author
Rasheed Abdul-Aziz
committed
support Gitlab Draft mode field
1 parent 1e8a189 commit 2b63082

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scm/driver/gitlab/pr.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ type pr struct {
307307
Labels []*string `json:"labels"`
308308
Link string `json:"web_url"`
309309
WIP bool `json:"work_in_progress"`
310+
Draft bool `json:"draft"`
310311
Author user `json:"author"`
311312
MergeStatus string `json:"merge_status"`
312313
SourceBranch string `json:"source_branch"`
@@ -411,7 +412,7 @@ func (s *pullService) convertPullRequest(ctx context.Context, from *pr) (*scm.Pu
411412
Source: from.SourceBranch,
412413
Target: from.TargetBranch,
413414
Link: from.Link,
414-
Draft: from.WIP,
415+
Draft: from.WIP || from.Draft,
415416
Closed: from.State != "opened",
416417
Merged: from.State == "merged",
417418
Mergeable: scm.ToMergeableState(from.MergeStatus) == scm.MergeableStateMergeable,

0 commit comments

Comments
 (0)