Skip to content

merge queue: embarking main (29718f3) and #1435 together#1451

Closed
mergify[bot] wants to merge 4 commits into
mainfrom
mergify/merge-queue/5e09c4bdff
Closed

merge queue: embarking main (29718f3) and #1435 together#1451
mergify[bot] wants to merge 4 commits into
mainfrom
mergify/merge-queue/5e09c4bdff

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented May 20, 2026

🎉 This pull request has been checked successfully and will be merged soon. 🎉

Branch main (29718f3) and #1435 are embarked together for merge.

This pull request has been created by Mergify to speculatively check the mergeability of #1435.
You don't need to do anything. Mergify will close this pull request automatically when it is complete.

Required conditions of queue rule default for merge:

Required conditions to stay in the queue:

---
checking_base_sha: 29718f3e5e17e013c010e0a716f96b4a76c0f645
previous_failed_batches: []
pull_requests:
  - number: 1435
    scopes: []
scopes: []
...

jd and others added 4 commits May 20, 2026 11:04
Replaces ``mergify_cli/tests/queue/test_skill.py`` with a Rust
integration test in ``crates/mergify-cli/tests/skill_references.rs``.

The test validates two artifacts with no Python in the picture:

- The ``skills/mergify-merge-queue/SKILL.md`` Markdown file
  (frontmatter shape, required sections).
- The Rust binary's ``--list-native-commands`` output (every
  ``mergify queue <cmd>`` reference in the skill must resolve to
  a native command).

Keeping the test in pytest meant carrying Python plumbing for a
language-agnostic concern. The Rust port:

- spawns the binary via ``CARGO_BIN_EXE_mergify`` (the artifact
  ``cargo test`` just built), so the test always exercises the
  current code rather than whatever ``mergify`` happens to be on
  ``PATH``;
- reads the skill file via ``CARGO_MANIFEST_DIR``-relative
  resolution, so it's robust to the cwd;
- adds two dev-deps to ``mergify-cli`` (``regex`` for the
  frontmatter / reference patterns, ``serde_yaml_ng`` for
  frontmatter parsing — already used by ``mergify-ci``).

The ``mergify_cli/tests/queue/`` directory had no other content,
so it goes away entirely; the Python ``yaml`` dev-dep stays in
place for now (still used elsewhere).

4 tests, same coverage as before:

- ``skill_content_is_readable``
- ``skill_has_valid_frontmatter``
- ``skill_has_required_sections``
- ``skill_references_valid_commands``

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Change-Id: I7eb5e3849dcb4219341be78173717ecd137f2d08
Pin the URL + auth + JSON-array shape of `freeze list --json`
against the real Mergify API before the upcoming Python → Rust
port. The Python `list_cmd` returns the inner
`scheduled_freezes` array verbatim, so the test asserts that
the `--json` output parses as a JSON array — same contract we
want preserved across both ends of the port.

Uses `live_admin_token` because scheduled-freeze endpoints sit
under the queue-management family and the CI-scoped token is
rejected with 403.

Group-level options (`--token` / `--api-url` / `--repository`)
come before the subcommand — Click requires it on the Python
side, clap accepts both orders.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Change-Id: I51b653702c10e184daff5f450f1edc4f3c581433
`mergify freeze list` is now handled by the Rust binary: a
single `GET /v1/repos/<repo>/scheduled_freeze` with `--json`
passthrough of the inner `scheduled_freezes` array or a
human-readable table (ID / Reason / Start / End / Conditions /
Status). The active-vs-scheduled flag is best-effort against
UTC `now` — same approximation as Python's `_is_active`, with
the same wrong-timezone caveat.

New crate `mergify-freeze` mirrors the per-group layout used by
`mergify-queue` and `mergify-ci`. Wired into the CLI via a new
`freeze` clap group with global `--token` / `--api-url` /
`--repository` options.

Non-ported subcommands (`create` / `update` / `delete`) continue
to fall through to the Python shim — they are not in
`NATIVE_COMMANDS`, so `looks_native` rejects them and the
fallback path runs unchanged. CRUD ports follow.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Change-Id: I40ca436a13dde8b5d725ef2fc023d35f7b66340e
@mergify mergify Bot deployed to Mergify Merge Protections May 20, 2026 16:44 Active
@mergify mergify Bot temporarily deployed to func-tests-live May 20, 2026 16:44 Inactive
@mergify mergify Bot closed this May 20, 2026
@mergify mergify Bot deleted the mergify/merge-queue/5e09c4bdff branch May 20, 2026 17:00
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.

1 participant