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

Add PullRequest.MergeableState field #820

Merged
merged 1 commit into from
Dec 29, 2017

Conversation

ains
Copy link
Contributor

@ains ains commented Dec 29, 2017

This isn't a well documented field but it's present in API responses and mentioned here
octokit/octokit.rb#626

@googlebot googlebot added the cla: yes Indication that the PR author has signed a Google Contributor License Agreement. label Dec 29, 2017
@gmlewis
Copy link
Collaborator

gmlewis commented Dec 29, 2017

Thank you, @ains. I have a couple questions for you.

According to the documentation here: https://developer.github.com/v3/pulls/#get-a-single-pull-request
the mergeable field ought to be sufficient, and mergeable_state is nowhere to be found (in the docs) but you say you have seen it in responses.

Have you tried using the mergeable field to see if it satisfies your needs?

If you have tried it, but it doesn't work, then I think we need to contact support@github.com and ask for clarification regarding these two fields (one documented, one not).
If this is the case, can you please provide a JSON response showing both the mergeable and mergeable_state fields and show how mergeable is not sufficient? This will help the GitHub support team figure out what is going on.

Thanks again!

@ains
Copy link
Contributor Author

ains commented Dec 29, 2017

No problem @gmlewis

You can find a bit more context on the field mergeable_state in this issue octokit/octokit.rb#626,

and in this thread on the github platform forum (where they are planning to document it)
https://platform.github.community/t/documentation-about-mergeable-state/4259

Unfortunately mergeable doesn't satisfy the needs we have, if a PR can cleanly merge into a branch but fails a check (set when protecting that branch) mergeable is still true however mergeable_state will be blocked, indicating it actually shouldn't be merged.

@gmlewis
Copy link
Collaborator

gmlewis commented Dec 29, 2017

Ah, thank you for the forum link, @ains! That is sufficient for me.
LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indication that the PR author has signed a Google Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants