Open johlju opened 6 years ago
This is actually a very useful and practical feature that this app must have, thanks
Fir reference, from GitHub support:
You could use our GraphQL API to fetch a pull request and it's
mergeStateStatus
as well as itsmergeable
attribute: https://developer.github.com/v4/object/pullrequest/
mergeable
is a field with the return type ofMergeableState
, andMergeableState
is an enum type. If it has a value ofCONFLICTING
, this would indicate the pull request cannot be merged due to merge conflicts: https://developer.github.com/v4/enum/mergeablestate/#conflictingIf the pull request has a mergeable value of CONFLICTING, you could check the mergeStateStatus to get more detailed information about the current pull request merge state status: https://developer.github.com/v4/enum/mergestatestatus/
Detection of merge conflicts should be an opt-in, so it should be separate from statuses, maybe this should be a repo wide setting instead. See https://github.com/z0al/probot-review-me/issues/4#issuecomment-417237137 for example when it should be opt-in.
Maybe it more accurate to have this setting
detectMergeConflicts: yes
when:
continuous-integration/travis-ci/pr: success
wip: success
If detectMergeConflicts
is set to yes/true then that will always override any other status under when
.
If detectMergeConflicts is set to yes/true then that will always override any other status under when.
What do you mean by that?
I was thinking of the followings (but now this won't work when we introduce multi-rules):
If detectMergeConflicts
is set to true
If detectMergeConflicts
is set to false
Just continue to work the way it does right now.
Yes, it was like that I meant.
I'm still not sure how that would work with multi-rules!
Ah, with multi-rules, do you mean when issue #1 is resolved? I updated my suggest config in https://github.com/z0al/probot-review-me/issues/1#issuecomment-394665843 for a proposal how it could be.
It would be nice if a PR has merge conflicts, that could be detected as a "context" as well.
Though, would work if there was another app that detected this and added another status check that this app could be detected.