Skip to content

Display our own message when CI checks are not green for enqueuing PR#2449

Closed
Urgau wants to merge 1 commit into
rust-lang:masterfrom
Urgau:merge-custom-required-status-msg
Closed

Display our own message when CI checks are not green for enqueuing PR#2449
Urgau wants to merge 1 commit into
rust-lang:masterfrom
Urgau:merge-custom-required-status-msg

Conversation

@Urgau

@Urgau Urgau commented Jul 1, 2026

Copy link
Copy Markdown
Member

This PR adds a small logic to detect and display our own message when CI checks are not green when trying to enqueue PR (rustbot merge command).

All mandatory CI checks must be green before this PR can enter the merge queue.

Please wait for all checks to pass, and if necessary resolve any failures, then retry the command.

Unfortunately GitHub doesn't give us any code or information about the failure it-self other than the error message it-self, so we have to do some matching on them, let's hope those error messages don't change too often.

cc @samueltardieu

@Urgau Urgau requested a review from Kobzol July 1, 2026 21:23
@Kobzol

Kobzol commented Jul 1, 2026

Copy link
Copy Markdown
Member

Shouldn't it be possible to use "Merge when ready" using the GraphQL call? That sounds much more practical than displaying an error message and forcing the user to wait.

@Urgau

Urgau commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

Seems like it would be possible with enablePullRequestAutoMerge ("Enable the default auto-merge on a pull request"), but do we want to do that? Is auto-merge status reset when a new push has been made?

@Kobzol

Kobzol commented Jul 1, 2026

Copy link
Copy Markdown
Member

I don't think so, I remember that I sometimes enable it on bors and then push a few times until CI passes. That might be preventable by requiring a review of the most recently pushed commit though. It just seems nicer to do what the UI could already do for you, rather than forcing the user to retry, which is an annoyance (same in bors, where we would someday like to automate the "r=me once CI is green" workflow).

@Urgau

Urgau commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

I'm fine changing it, if @samueltardieu agrees.

@samueltardieu

Copy link
Copy Markdown
Member

Do we get a webhook when CI fails? Would it be possible to disable auto-merge then? That could be good in general, both in the context of rustbot merge and in the context of a manual auto-merge.

@Urgau

Urgau commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

We probably get one, but I don't think that's necessary, as GitHub disable auto-merge when new changes are pushed by a non-member.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request#about-auto-merge

@Urgau

Urgau commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

Continuing in #2450

@Urgau Urgau closed this Jul 2, 2026
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 this pull request may close these issues.

3 participants