Let groovy know whether github hasn't checked the mergeability of a pull request#128
Let groovy know whether github hasn't checked the mergeability of a pull request#128ha5la wants to merge 2 commits intojenkinsci:masterfrom
Conversation
The mergeable flag can be null while github hasn't yet decided if the PR is mergeable or not. See https://github.com/eclipse-egit/egit-github/blob/a30aa361f65d5ccbaca1aedd12651ff2636a3ed9/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/PullRequest.java#L98-L99 See https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#get-a-pull-request
isMergeable()|
It's true that In my testing, So the With that, I think that simply reflecting this fact by changing Most of the code written till this stage is either or One can easily see that adding a possibility of I would suggest, in case the |
The mergeable flag can be
nullwhile github hasn't yet decided if the PR is mergeable or not.See https://github.com/eclipse-egit/egit-github/blob/a30aa361f65d5ccbaca1aedd12651ff2636a3ed9/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/PullRequest.java#L98-L99
See https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#get-a-pull-request
Testing done
I tested this manually on a local jenkins instance. I couldn't make github return a response with missing
mergeableflag but I made sure that my change doesn't break the normal workflow when the flag is present with a value of true or false.I also added an integration test that runs automatically.
Submitter checklist