Skip to content

Commit

Permalink
Merge pull request #442 from squeedee/add-draft-configuration
Browse files Browse the repository at this point in the history
support Gitlab Draft mode field
  • Loading branch information
jenkins-x-bot committed May 3, 2024
2 parents f38a325 + 2b63082 commit 9706973
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 9706973

Please sign in to comment.