feat(ci): read queue-info metadata from the git note (CI-agnostic)#1600
Merged
Conversation
Contributor
Merge Protections🟢 All 5 merge protections satisfied — ready to merge. |
8ef9de2 to
2694939
Compare
Member
Author
Revision history
|
2694939 to
f6db5e2
Compare
jd
previously requested changes
Jun 16, 2026
`mergify ci queue-info` read the merge-queue batch metadata from the GitHub PR body — via the GHA event payload (no-arg) and a GitHub API fetch by PR URL. Both are GitHub-specific and need a token. The engine publishes the same TrainInfo YAML as a git note under `refs/notes/mergify/<mq_branch>` on the MQ branch head commit, precisely so CI providers can read it with plain git and no token. Make queue-info read only that note for the current HEAD, dropping the PR-body and PR-URL paths entirely. It now works in any CI (GitHub Actions, GitLab, CircleCI, Jenkins, ...), takes no arguments and needs no token. - Emit the note's full payload verbatim as JSON, parsed into a generic value rather than a fixed struct, so every engine field (top-level and per-PR `scopes`, and anything added later) shows up without a CLI change. - Enumerate `refs/notes/mergify/*` and return the note attached to HEAD instead of deriving the branch name, so it works under a detached HEAD (how most non-GitHub CIs check out a revision) with no CI-specific env. - Share the note read + git plumbing via `mergify-ci/src/git.rs` (`read_note`, `succeeds`, `capture`); `git_refs::real_notes_reader` reads the same note and pulls just `checking_base_sha`. Drop the now-unused `queue_metadata::detect` and the dead `parse_notes_payload`. Fixes MRGFY-7664 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Change-Id: I85e65ea0f9d97f2b02efcbf7b5354d0fe911363c
f6db5e2 to
3305031
Compare
jd
approved these changes
Jun 16, 2026
JulianMaurin
approved these changes
Jun 16, 2026
Contributor
|
Queued — the merge queue status continues in this comment ↓. |
Contributor
Merge Queue Status
This pull request spent 8 minutes 30 seconds in the queue, including 7 minutes 52 seconds running CI. Required conditions to merge
|
36 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mergify ci queue-inforead the merge-queue batch metadata from theGitHub PR body — via the GHA event payload (no-arg) and a GitHub API
fetch by PR URL. Both are GitHub-specific and need a token.
The engine publishes the same TrainInfo YAML as a git note under
refs/notes/mergify/<mq_branch>on the MQ branch head commit, preciselyso CI providers can read it with plain git and no token. Make queue-info
read only that note for the current HEAD, dropping the PR-body and
PR-URL paths entirely. It now works in any CI (GitHub Actions, GitLab,
CircleCI, Jenkins, ...), takes no arguments and needs no token.
value rather than a fixed struct, so every engine field (top-level and
per-PR
scopes, and anything added later) shows up without a CLIchange.
refs/notes/mergify/*and return the note attached to HEADinstead of deriving the branch name, so it works under a detached HEAD
(how most non-GitHub CIs check out a revision) with no CI-specific env.
mergify-ci/src/git.rs(
read_note,succeeds,capture);git_refs::real_notes_readerreads the same note and pulls just
checking_base_sha. Drop thenow-unused
queue_metadata::detectand the deadparse_notes_payload.Fixes MRGFY-7664
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com