Skip to content
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

Merged
merged 3 commits into from
Jul 20, 2021

Conversation

nghialv
Copy link
Member

@nghialv nghialv commented Jul 20, 2021

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?:

NONE

@pipecd-bot
Copy link
Collaborator

DOCKER

A Kapetanios build has just been triggered to run docker operations for the following 1 directory.
Their results will be reported back after the build is completed.

  1. dockers/actions-plan-preview

@pipecd-bot
Copy link
Collaborator

DOCKER

The Kapetanios build to run docker operations for the following 1 directory has been completed.

1. dockers/actions-plan-preview - failure

An image named actions-plan-preview:1.1.1-80f4f64 was procuded for reviewing and testing.
By merging this PR, an image named actions-plan-preview:1.1.1 will be pushed to the container registry.

There is no test to run inside this directory.

@@ -77,7 +77,7 @@ func main() {
return
}

if !event.PRMergeable {
if event.PRMergeable != nil && *event.PRMergaeable == false {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if event.PRMergeable != nil && *event.PRMergaeable == false {
if event.PRMergeable != nil && !*event.PRMergaeable {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member Author

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. 😄

Copy link
Member

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 🙆‍♀️

Copy link
Member

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.

@pipecd-bot
Copy link
Collaborator

DOCKER

A Kapetanios build has just been triggered to run docker operations for the following 1 directory.
Their results will be reported back after the build is completed.

  1. dockers/actions-plan-preview

@pipecd-bot
Copy link
Collaborator

DOCKER

The Kapetanios build to run docker operations for the following 1 directory has been completed.

1. dockers/actions-plan-preview - failure

An image named actions-plan-preview:1.1.1-902101a was procuded for reviewing and testing.
By merging this PR, an image named actions-plan-preview:1.1.1 will be pushed to the container registry.

There is no test to run inside this directory.

@pipecd-bot
Copy link
Collaborator

DOCKER

A Kapetanios build has just been triggered to run docker operations for the following 1 directory.
Their results will be reported back after the build is completed.

  1. dockers/actions-plan-preview

@pipecd-bot
Copy link
Collaborator

DOCKER

The Kapetanios build to run docker operations for the following 1 directory has been completed.

1. dockers/actions-plan-preview - success

An image named actions-plan-preview:1.1.1-53b1434 was procuded for reviewing and testing.
By merging this PR, an image named actions-plan-preview:1.1.1 will be pushed to the container registry.

There is no test to run inside this directory.

@khanhtc1202
Copy link
Member

/lgtm

@nakabonne
Copy link
Member

/approve

@pipecd-bot
Copy link
Collaborator

APPROVE

This pull request is APPROVED by nakabonne.

Approvers can cancel the approval by writing /approve cancel in a comment. Any additional commits also will change this pull request to be not-approved.

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 31.75%. This pull request does not change code coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants