Skip to content

Commit

Permalink
fix: flanky force_remove_source_branch type
Browse files Browse the repository at this point in the history
Gitlab MergeRequestHook have unstable json type for
this property. https://gitlab.com/gitlab-org/gitlab/-/issues/15647

closes jenkins-x#300
  • Loading branch information
nekator committed Oct 14, 2022
1 parent 3499e7d commit 02d2980
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"merge_commit_sha": null,
"merge_error": null,
"merge_params": {
"force_remove_source_branch": false
"force_remove_source_branch": "0"
},
"merge_status": "can_be_merged",
"merge_user_id": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"merge_commit_sha": null,
"merge_error": null,
"merge_params": {
"force_remove_source_branch": false
"force_remove_source_branch": "0"
},
"merge_status": "unchecked",
"merge_user_id": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"merge_commit_sha": null,
"merge_error": null,
"merge_params": {
"force_remove_source_branch": false
"force_remove_source_branch": "0"
},
"merge_status": "can_be_merged",
"merge_user_id": null,
Expand Down
4 changes: 2 additions & 2 deletions scm/driver/gitlab/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ type (
MergeCommitSha string `json:"merge_commit_sha"`
MergeError interface{} `json:"merge_error"`
MergeParams struct {
ForceRemoveSourceBranch bool `json:"force_remove_source_branch"`
ForceRemoveSourceBranch interface{} `json:"force_remove_source_branch"`
} `json:"merge_params"`
MergeStatus string `json:"merge_status"`
MergeUserID interface{} `json:"merge_user_id"`
Expand Down Expand Up @@ -698,7 +698,7 @@ type (
MergeCommitSha string `json:"merge_commit_sha"`
MergeError interface{} `json:"merge_error"`
MergeParams struct {
ForceRemoveSourceBranch bool `json:"force_remove_source_branch"`
ForceRemoveSourceBranch interface{} `json:"force_remove_source_branch"`
} `json:"merge_params"`
MergeStatus string `json:"merge_status"`
MergeUserID interface{} `json:"merge_user_id"`
Expand Down

0 comments on commit 02d2980

Please sign in to comment.