-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Implement PullRequest MergeableState field #1763
Labels
Type: Feature
New feature or request
Comments
nhaarman
pushed a commit
to Label305/AutoRebase
that referenced
this issue
Dec 17, 2020
Based on octokit/octokit.net#1763 the 'blocked' state represents "Blocked by a failing/missing required status check". Since there are no conflicts at this point, a rebase is possible and might even be able to fix the status checks.
ryanmoran
pushed a commit
to paketo-buildpacks/github-config
that referenced
this issue
Jan 14, 2021
As outline in an [issue on octokit](octokit/octokit.net#1763), the `unstable` state is defined as "Failing/pending commit status that is not part of the required status checks. Merging is allowed." Running the "Auto Merge" workflow itself induces an `unstable` state as it is a pending check that is not part of the required status checks. This is different than the `blocked` state which is induced by running one of the required status checks. Either way, a merge will only be possible if all of the required checks have passed and so it should be safe to allow the "Auto Merge" workflow to attempt to merge the PR given an `unstable` state.
2 tasks
sophiewigmore
pushed a commit
to paketo-buildpacks/github-config
that referenced
this issue
Jan 14, 2021
As outline in an [issue on octokit](octokit/octokit.net#1763), the `unstable` state is defined as "Failing/pending commit status that is not part of the required status checks. Merging is allowed." Running the "Auto Merge" workflow itself induces an `unstable` state as it is a pending check that is not part of the required status checks. This is different than the `blocked` state which is induced by running one of the required status checks. Either way, a merge will only be possible if all of the required checks have passed and so it should be safe to allow the "Auto Merge" workflow to attempt to merge the PR given an `unstable` state.
ryanmoran
pushed a commit
to paketo-buildpacks/full-builder
that referenced
this issue
Jan 21, 2021
As outline in an [issue on octokit](octokit/octokit.net#1763), the `unstable` state is defined as "Failing/pending commit status that is not part of the required status checks. Merging is allowed." Running the "Auto Merge" workflow itself induces an `unstable` state as it is a pending check that is not part of the required status checks. This is different than the `blocked` state which is induced by running one of the required status checks. Either way, a merge will only be possible if all of the required checks have passed and so it should be safe to allow the "Auto Merge" workflow to attempt to merge the PR given an `unstable` state.
2 tasks
ryanmoran
pushed a commit
to paketo-buildpacks/base-builder
that referenced
this issue
Jan 21, 2021
As outline in an [issue on octokit](octokit/octokit.net#1763), the `unstable` state is defined as "Failing/pending commit status that is not part of the required status checks. Merging is allowed." Running the "Auto Merge" workflow itself induces an `unstable` state as it is a pending check that is not part of the required status checks. This is different than the `blocked` state which is induced by running one of the required status checks. Either way, a merge will only be possible if all of the required checks have passed and so it should be safe to allow the "Auto Merge" workflow to attempt to merge the PR given an `unstable` state.
2 tasks
ryanmoran
pushed a commit
to paketo-buildpacks/tiny-builder
that referenced
this issue
Jan 21, 2021
As outline in an [issue on octokit](octokit/octokit.net#1763), the `unstable` state is defined as "Failing/pending commit status that is not part of the required status checks. Merging is allowed." Running the "Auto Merge" workflow itself induces an `unstable` state as it is a pending check that is not part of the required status checks. This is different than the `blocked` state which is induced by running one of the required status checks. Either way, a merge will only be possible if all of the required checks have passed and so it should be safe to allow the "Auto Merge" workflow to attempt to merge the PR given an `unstable` state.
2 tasks
nickfloyd
added
Type: Feature
New feature or request
and removed
category: feature
labels
Oct 27, 2022
bluedev41
added a commit
to bluedev41/AutoRebase
that referenced
this issue
Dec 22, 2022
Based on octokit/octokit.net#1763 the 'blocked' state represents "Blocked by a failing/missing required status check". Since there are no conflicts at this point, a rebase is possible and might even be able to fix the status checks.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is currently an undocumented field (likely to be added to docs in the future) but provides very useful information about whether a PR can be merged or not, and what the reasons preventing merge actually are.
This field should be implemented as a new
Enum
class, using our standardParameter()
property to map to the api string values. In thePullRequest
class it will be wrapped by ourStringEnum<T>
wrapper to guard against the addition of more values upstream. It most likely will need to be declared nullable, as it probably isn't returned inGetAll
responses, that only return a subset ofPullRequest
fieldsThe following values are possible
dirty
: Merge conflict. Merging will be blockedunknown
: Mergeability was not checked yet. Merging will be blockedblocked
: Blocked by a failing/missing required status check.behind
: Head branch is behind the base branch. Only if required status checks is enabled but loose policy is not. Merging will be blocked.unstable
: Failing/pending commit status that is not part of the required status checks. Merging is allowed (yellow box).has_hooks
: GitHub Enterprise only, if a repo has custom pre-receive hooks. Merging is allowed (green box).clean
: No conflicts, everything good. Merging is allowed (green box).Some references:
octokit/octokit.rb#626
google/go-github#820 (comment)
https://platform.github.community/t/documentation-about-mergeable-state/4259
The text was updated successfully, but these errors were encountered: