Skip to content

Detect unmergeable status of PRs #218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 2 tasks
Kobzol opened this issue Mar 7, 2025 · 3 comments · Fixed by #247
Closed
1 of 2 tasks

Detect unmergeable status of PRs #218

Kobzol opened this issue Mar 7, 2025 · 3 comments · Fixed by #247

Comments

@Kobzol
Copy link
Contributor

Kobzol commented Mar 7, 2025

Bors should track the mergeable status of PRs.

@Sakib25800
Copy link
Contributor

Sakib25800 commented Mar 7, 2025

Planning on working on this, so I'm adding this here for reference.

Homu

  1. Detects an unmergeable PR via use of the mergeable property from GitHub
  2. Triggers mergeability checks on push events to base branch, PR updates and PR base branch change
  3. 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
  4. 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

@Mark-Simulacrum
Copy link
Member

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)?

@Kobzol
Copy link
Contributor Author

Kobzol commented Mar 9, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants