-
Notifications
You must be signed in to change notification settings - Fork 149
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
Fix wrong way to check unmergeable pull request #2278
Conversation
A Kapetanios build has just been triggered to run docker operations for the following
|
The Kapetanios build to run docker operations for the following 1. dockers/actions-plan-preview - failureAn image named actions-plan-preview:1.1.1-80f4f64 was procuded for reviewing and testing. There is no test to run inside this directory. |
dockers/actions-plan-preview/main.go
Outdated
@@ -77,7 +77,7 @@ func main() { | |||
return | |||
} | |||
|
|||
if !event.PRMergeable { | |||
if event.PRMergeable != nil && *event.PRMergaeable == false { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if event.PRMergeable != nil && *event.PRMergaeable == false { | |
if event.PRMergeable != nil && !*event.PRMergaeable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compared to !*
, I think the current one is clearer. Only me. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, what I can say is I would like to omit == bool
since it is redundant to me, but get your point of the current method is more clear than that. So, it's up to you 🙆♀️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is. I would respect your feeling.
A Kapetanios build has just been triggered to run docker operations for the following
|
The Kapetanios build to run docker operations for the following 1. dockers/actions-plan-preview - failureAn image named actions-plan-preview:1.1.1-902101a was procuded for reviewing and testing. There is no test to run inside this directory. |
A Kapetanios build has just been triggered to run docker operations for the following
|
The Kapetanios build to run docker operations for the following 1. dockers/actions-plan-preview - successAn image named actions-plan-preview:1.1.1-53b1434 was procuded for reviewing and testing. There is no test to run inside this directory. |
/lgtm |
/approve |
What this PR does / why we need it:
The
mergeable
field will be nil while GitHub is running a job to check the mergeability.Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: