Skip to content

feat(ci): read queue-info metadata from the git note (CI-agnostic)#1600

Merged
mergify[bot] merged 1 commit into
mainfrom
devs/sileht/queue-info-from-git-notes/read-queue-info-metadata-git-notes-ci-agnostic--85e65ea0
Jun 16, 2026
Merged

feat(ci): read queue-info metadata from the git note (CI-agnostic)#1600
mergify[bot] merged 1 commit into
mainfrom
devs/sileht/queue-info-from-git-notes/read-queue-info-metadata-git-notes-ci-agnostic--85e65ea0

Conversation

@sileht

@sileht sileht commented Jun 15, 2026

Copy link
Copy Markdown
Member

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

Copilot AI review requested due to automatic review settings June 15, 2026 21:56
@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 15, 2026 21:56 Failure
@sileht sileht temporarily deployed to func-tests-live June 15, 2026 21:56 — with GitHub Actions Inactive

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@mergify

mergify Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 5 merge protections satisfied — ready to merge.

@mergify mergify Bot requested a review from a team June 15, 2026 22:03
@sileht sileht changed the title feat(ci): read queue-info metadata from git notes (CI-agnostic) feat(ci): read queue-info metadata from the git note (CI-agnostic) Jun 16, 2026
@sileht sileht force-pushed the devs/sileht/queue-info-from-git-notes/read-queue-info-metadata-git-notes-ci-agnostic--85e65ea0 branch from 8ef9de2 to 2694939 Compare June 16, 2026 07:28
@sileht

sileht commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

Revision history

# Type Changes Reason Date
1 initial 8ef9de2 2026-06-16 07:28 UTC
2 content 8ef9de2 → 2694939 (raw) 2026-06-16 07:28 UTC
3 content 2694939 → f6db5e2 (raw) 2026-06-16 08:18 UTC
4 content f6db5e2 → 3305031 (raw) 2026-06-16 12:27 UTC

@sileht sileht temporarily deployed to func-tests-live June 16, 2026 07:28 — with GitHub Actions Inactive
@sileht sileht temporarily deployed to func-tests-live June 16, 2026 07:28 — with GitHub Actions Inactive
@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 16, 2026 07:28 Failure
@sileht sileht marked this pull request as ready for review June 16, 2026 07:54
@sileht sileht marked this pull request as draft June 16, 2026 08:02
@sileht sileht force-pushed the devs/sileht/queue-info-from-git-notes/read-queue-info-metadata-git-notes-ci-agnostic--85e65ea0 branch from 2694939 to f6db5e2 Compare June 16, 2026 08:18
@sileht sileht temporarily deployed to func-tests-live June 16, 2026 08:18 — with GitHub Actions Inactive
@sileht sileht temporarily deployed to func-tests-live June 16, 2026 08:18 — with GitHub Actions Inactive
@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 16, 2026 08:18 Failure
@jd jd marked this pull request as ready for review June 16, 2026 11:15
jd
jd previously requested changes Jun 16, 2026
Comment thread skills/mergify-ci/SKILL.md Outdated
`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
@sileht sileht force-pushed the devs/sileht/queue-info-from-git-notes/read-queue-info-metadata-git-notes-ci-agnostic--85e65ea0 branch from f6db5e2 to 3305031 Compare June 16, 2026 12:27
@sileht sileht temporarily deployed to func-tests-live June 16, 2026 12:27 — with GitHub Actions Inactive
@mergify mergify Bot dismissed jd’s stale review June 16, 2026 12:27

Pull request has been modified.

@mergify mergify Bot deployed to Mergify Merge Protections June 16, 2026 12:27 Active
@mergify mergify Bot requested a review from a team June 16, 2026 12:35
@mergify mergify Bot requested a review from a team June 16, 2026 13:37
@mergify

mergify Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@mergify

mergify Bot commented Jun 16, 2026

Copy link
Copy Markdown
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

mergify Bot added a commit that referenced this pull request Jun 16, 2026
@mergify mergify Bot added the queued label Jun 16, 2026
@mergify mergify Bot merged commit 2bbbbb2 into main Jun 16, 2026
18 checks passed
@mergify mergify Bot deleted the devs/sileht/queue-info-from-git-notes/read-queue-info-metadata-git-notes-ci-agnostic--85e65ea0 branch June 16, 2026 14:03
@mergify mergify Bot removed the queued label Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants