Skip to content

merge queue: embarking main (e67be06) and #1438 together#1463

Closed
mergify[bot] wants to merge 3 commits into
mainfrom
mergify/merge-queue/fa2c3de3a1
Closed

merge queue: embarking main (e67be06) and #1438 together#1463
mergify[bot] wants to merge 3 commits into
mainfrom
mergify/merge-queue/fa2c3de3a1

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented May 26, 2026

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

Branch main (e67be06) and #1438 are embarked together for merge.

This pull request has been created by Mergify to speculatively check the mergeability of #1438.
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: e67be06c5f88b7c11acd6aca857e9e741b5735c8
previous_failed_batches: []
pull_requests:
  - number: 1438
    scopes: []
scopes: []
...

jd and others added 3 commits May 22, 2026 16:40
Round-trip the three remaining freeze mutations:

- `freeze create` — `POST /v1/repos/<r>/scheduled_freeze` with
  the Python `CreateScheduledFreezePayload` shape: `start`/`end`
  always present (null for open-ended emergency freezes),
  `matching_conditions`/`exclude_conditions` keys omitted when
  the user passed no `-c`/`-e` flags. When `--timezone` is left
  off, falls back to `iana-time-zone::get_timezone()` — same
  role as Python's `tzlocal.get_localzone_name()`.
- `freeze update` — `PATCH /v1/repos/<r>/scheduled_freeze/<id>`
  with skip-if-none on every field so PATCH semantics work
  correctly: a flag the user didn't pass doesn't touch the
  stored field.
- `freeze delete` — `POST /v1/repos/<r>/scheduled_freeze/<id>/delete`
  with `delete_reason` in the body only when supplied (the API
  requires it for active freezes; the CLI lets the server
  reject a missing reason rather than pre-validating).

Adds `Client::patch` on the core HTTP client, a shared
`mergify-freeze::common` module (wire-format struct, naive-DT
parser, system-timezone detection, per-freeze human printer
used by `create` and `update`), and `iana-time-zone` as a new
dependency. The Python implementation of each command is left
in place but no longer reachable via the binary, since clap now
dispatches the whole freeze group natively.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Change-Id: I653dbf47080f439f8c3500a7a526e46d707fc639
A grab-bag of small DRY wins surfaced by the post-port review:

- Add `Output::emit_json_value(&serde_json::Value)` to
  `mergify-core`. The `--json` passthrough commands (`queue status`,
  `queue show`, `freeze list`) all carried byte-identical
  `emit_json` private helpers that pretty-printed a value to either
  the JSON or the human sink. Centralize once.
- Drop the `enabled_fg` wrapper in `queue show`: its body was
  exactly what `Theme::fg` already does, so call `theme.fg(...)`
  directly. Saves a helper + 13 call-site rewrites of the same
  redundant indirection.
- Drop spurious `response.field.clone()` calls in `queue pause`,
  `config validate`, and `config simulate`. The closures handed to
  `Output::emit` borrow from the outer `&Response` parameter; the
  trait method doesn't require `'static`, so the clones were
  defensive noise.

No behavior change. All workspace tests still pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Change-Id: Ied32eef956ebd71a03005530cc394612afd46e5d
@mergify mergify Bot deployed to Mergify Merge Protections May 26, 2026 15:35 Active
@mergify mergify Bot temporarily deployed to func-tests-live May 26, 2026 15:35 Inactive
@mergify mergify Bot closed this May 26, 2026
@mergify mergify Bot deleted the mergify/merge-queue/fa2c3de3a1 branch May 26, 2026 15:51
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