Skip to content

merge queue: embarking main (5d8fa9b) and #1281 together#1309

Closed
mergify[bot] wants to merge 3 commits intomainfrom
mergify/merge-queue/2e64beb369
Closed

merge queue: embarking main (5d8fa9b) and #1281 together#1309
mergify[bot] wants to merge 3 commits intomainfrom
mergify/merge-queue/2e64beb369

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Apr 28, 2026

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

Branch main (5d8fa9b) and #1281 are embarked together for merge.

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

jd and others added 3 commits April 28, 2026 08:48
…eMaintenance

The Rust workspace is growing fast — 5 crates already, more landing as
the port progresses. Without grouping, every minor/patch bump from
crates.io produces its own PR; with two managers (`cargo` and
`github-actions`) on a stack of stacked PRs that quickly drowns review.

- Group `cargo` minor/patch updates into a single weekly PR.
- Group `github-actions` minor/patch updates the same way.
- Enable `lockFileMaintenance` for `Cargo.lock` (Monday morning) so
  indirect dep drift doesn't accumulate between explicit Cargo.toml
  changes.

Major bumps still get their own PR (default behaviour kept) so they
stay easy to triage individually.

Change-Id: I7506fae52e2c6bfb2c12af80391b1eb07a9b93f0
….2b)

Adds the HTTP client every ported command uses. Wraps ``reqwest``
with the invariants the design requires:

- Bearer-token auth injected when the token is non-empty; skipped
  otherwise so GitHub's anonymous public-repo reads still work.
- Tenacity-style retry on 5xx and transient network errors: 3
  attempts, exponential backoff starting at 1s. 4xx responses are
  never retried — those are caller errors and retrying would mask
  bugs.
- Typed error mapping: HTTP failures become either
  ``CliError::GitHubApi`` or ``CliError::MergifyApi`` based on the
  ``ApiFlavor`` passed at construction, so ``exit_code()`` routes
  to ``GITHUB_API_ERROR`` (5) or ``MERGIFY_API_ERROR`` (6)
  automatically.
- Per-request timeout of 30s.
- ``RetryPolicy`` is public so tests can skip the wall-clock
  backoff with ``initial_backoff = 0``.

Also extends ``CliError`` with the two new API variants and
updates the ``exit_code()`` mapping + unit tests.

Command crates MUST NOT import ``reqwest`` directly — the only
HTTP surface is ``HttpClient::get`` and ``HttpClient::post``.

6 new tests cover: happy-path GET, empty-token behavior, POST
with JSON body, retry on 5xx then success, exhausted retries
mapping to ``MergifyApi``, 4xx not retried and mapping to
``GitHubApi``. All use ``wiremock`` for hermetic local HTTP.

Next sub-phase (1.2c / 1.2d) adds colored/spinner affordances and
the ``GitOps`` trait only when the first ported command needs
them; this PR is the minimum ``config validate`` requires.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Change-Id: I9c66057cc53acd0098f43086352ca9a9bf5aa7b0
@mergify mergify Bot deployed to Mergify Merge Protections April 28, 2026 09:00 Active
@mergify mergify Bot closed this Apr 28, 2026
@mergify mergify Bot deleted the mergify/merge-queue/2e64beb369 branch April 28, 2026 09:07
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