openshift / openshift/ci-chat-bot
Mergeable PR said as needing to be rebased
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 46
- Forks
- 118
- Avg merge
- 21h 40m
- Merged PRs (30d)
- 8
Description
It looks like there is a bug with the usage of the Mergeable flag here: https://github.com/openshift/ci-chat-bot/blob/9dac707eae449c29f3872773fcb7ce298b2cdd36/manager.go#L945-L947
This value can not only be true or false, but also null, cf https://docs.github.com/en/rest/reference/pulls#get-a-pull-request, when github is refreshing this flag. And it happens to us quite often that a PR is said needing rebase although it's actually mergeable; repeating the cluster-bot command several times in a row would ultimately make it work.
So, would it be possible to either have a small retry mechanism when Mergeable is null, or alternatively, allow to build on non-mergeable PRs ?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in manager.go at lines 945-947 and inspect how the GitHub Pull Request Mergeable value is handled. Check the linked GitHub API documentation for the null state and review nearby tests or command flow if present. Done means the bot no longer incorrectly requires a rebase when GitHub is still refreshing mergeability, using one of the approaches proposed in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100