You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in a PR I have a pending status check. and the repo settings have branch protection with the setting: "Require status checks to pass before merging", and the status check in question is listed.
I have a test with the following code:
def isMergeable = false
isMergeable = pullRequest.mergeable
echo "mergeability: ${isMergeable} should be false..."
sleep (5)
isMergeable = pullRequest.mergeable
echo "mergeability: ${isMergeable} should be false..."
sleep (5)
pullRequest.createStatus(status: 'success', context: 'pr examination', description: 'examination successful', targetUrl: "${env.JOB_URL}")
isMergeable = pullRequest.mergeable
echo "mergeability: ${isMergeable} true if change immediate... since I just set the status as success immediately prior"
sleep (5)
isMergeable = pullRequest.mergeable
echo "mergeability: ${isMergeable} after 5 second delay since setting, really should be true here..."
.... yet it's always 'true'. I even made sure the repo settings had the configuration for "Enforce all configured restrictions for administrators."
I had a window up to the github UI that I was refreshing after I made a small change to the branch and pushed to github. The PR instantly went to having they merge button greyed out as soon as it received the push, and stayed grey as I spammed the refresh button on my browser, and immediately went to mergeable (in the UI) only when the createStatus command was executed in the code above.
But pullRequest.mergeable appears to always be true, even though the github UI is saying that the PR is not mergeable until I set that statusCheck to success. Any ideas?
The text was updated successfully, but these errors were encountered:
learning more about how this works -- I suspect that this only takes into consideration if there is a git conflict. But if anything that prevents a PR from being merged (reviewers, required status checks, etc) are currently active for a PR.... isMergeable is still true.
Would love to see a solution somehow to really know "is it mergeable".
in a PR I have a pending status check. and the repo settings have branch protection with the setting: "Require status checks to pass before merging", and the status check in question is listed.
I have a test with the following code:
.... yet it's always 'true'. I even made sure the repo settings had the configuration for "Enforce all configured restrictions for administrators."
I had a window up to the github UI that I was refreshing after I made a small change to the branch and pushed to github. The PR instantly went to having they merge button greyed out as soon as it received the push, and stayed grey as I spammed the refresh button on my browser, and immediately went to mergeable (in the UI) only when the createStatus command was executed in the code above.
But pullRequest.mergeable appears to always be true, even though the github UI is saying that the PR is not mergeable until I set that statusCheck to success. Any ideas?
The text was updated successfully, but these errors were encountered: