This used to work, but a change in the last couple months seems to have broken this for us.
We have some Jenkins Pipeline code that does some automatic PR creation + merging for specific use cases. Initially when creating the PR, GitHub isn't always immediately able to act on it, so we would check if it were mergeable before actually attempting to merge:
GHPullRequest pull = repo.createPullRequest("Release $version", "master", "production", body)
while(!pull.getMergeable()) {
echo "PR not yet mergeable, retrying..."
}
pull.merge("Merged & released via [${env.BUILD_NUMBER}](${env.BUILD_URL})", pull.getHead().getSha())
Now however, pull.getMergeable() never returns true if it returns false the first time it is called (which is basically every time), so it just sits in that loop, retrying.
Again, this only broke after we recently updated all of our plugins on our Jenkins instance, so it seems a recent change is causing this but I've been unable to identify what it might be in the recent history.
This used to work, but a change in the last couple months seems to have broken this for us.
We have some Jenkins Pipeline code that does some automatic PR creation + merging for specific use cases. Initially when creating the PR, GitHub isn't always immediately able to act on it, so we would check if it were mergeable before actually attempting to merge:
Now however, pull.getMergeable() never returns true if it returns false the first time it is called (which is basically every time), so it just sits in that loop, retrying.
Again, this only broke after we recently updated all of our plugins on our Jenkins instance, so it seems a recent change is causing this but I've been unable to identify what it might be in the recent history.