Detect unmergeable status of PRs
Bors should track the mergeable status of PRs.
- [x] Track mergeability status: https://github.com/rust-lang/bors/pull/219
- [ ] Implement some refresh mechanism to update the status from GitHub
Planning on working on this, so I'm adding this here for reference.
- Detects an unmergeable PR via use of the
mergeableproperty from GitHub - Triggers mergeability checks on push events to base branch, PR updates and PR base branch change
- Blame detection
- Captures PR number from commit message e.g. "#12345" is extracted from "Merge of pull request #12345 from user/branch"
- If cannot find PR number, uses commit SHA
- Sends message (three variants)
- ":umbrella: The latest upstream changes (presumably #12345) made this pull request unmergeable"
- ":umbrella: The latest upstream changes (presumably abcd1234) made this pull request unmergeable"
- ":umbrella: The latest upstream changes made this pull request unmergeable."
Bors
- Will implement the same as Homu essentially
- However, since then the mergeable_state property was introduced to the API in 2018 so we could make use of it for more detailed error messages
Hm, given that we expect bors to be limited to mostly rust-lang/rust -- should the impl of this go to triagebot instead? In fact, maybe that impl already exists (https://forge.rust-lang.org/triagebot/merge-conflicts.html)?
Oh, interesting. I suppose that rust-lang/rust doesn't enable the triagebot functionality because it uses bors anyway, which already does that.
We don't need to implement the comments in bors then, but bors should still know if a PR is mergeable or not. At least to display it in the queue website.