Skip to content

Commit

Permalink
Merge pull request #445 from jenkins-x/dirty-github
Browse files Browse the repository at this point in the history
fix: add github api value for conflict
  • Loading branch information
jenkins-x-bot committed May 17, 2024
2 parents 94c4fe1 + 66ad2cc commit ded4738
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions scm/driver/github/testdata/webhooks/pr_closed.json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"State": "closed",
"Closed": true,
"Merged": false,
"MergeableState": "conflicting",
"Author": {
"ID": 817538,
"Login": "bradrydzewski",
Expand Down
1 change: 1 addition & 0 deletions scm/driver/github/testdata/webhooks/pr_edited.json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"State": "open",
"Closed": false,
"Merged": false,
"MergeableState": "conflicting",
"Author": {
"ID": 817538,
"Login": "bradrydzewski",
Expand Down
1 change: 1 addition & 0 deletions scm/driver/github/testdata/webhooks/pr_labeled.json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"State": "open",
"Closed": false,
"Merged": false,
"MergeableState": "conflicting",
"Author": {
"ID": 817538,
"Login": "bradrydzewski",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"State": "open",
"Closed": false,
"Merged": false,
"MergeableState": "conflicting",
"Author": {
"ID": 817538,
"Login": "bradrydzewski",
Expand Down
2 changes: 1 addition & 1 deletion scm/pr.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func ToMergeableState(text string) MergeableState {
switch strings.ToLower(text) {
case "clean", "mergeable", "can_be_merged":
return MergeableStateMergeable
case "conflict", "conflicting", "cannot_be_merged":
case "dirty", "conflict", "conflicting", "cannot_be_merged":
return MergeableStateConflicting
default:
return MergeableStateUnknown
Expand Down

0 comments on commit ded4738

Please sign in to comment.