merge queue: embarking main (5d8fa9b) and #1281 together#1309
Closed
mergify[bot] wants to merge 3 commits intomainfrom
Closed
merge queue: embarking main (5d8fa9b) and #1281 together#1309mergify[bot] wants to merge 3 commits intomainfrom
mergify[bot] wants to merge 3 commits intomainfrom
Conversation
…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
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.
🎉 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
defaultfor merge:depends-on = Mergifyio/mergify-cli#1307[⛓️ ci(renovate): group cargo / github-actions updates and enable lockFileMaintenance #1307]title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:#approved-reviews-by>=2author = dependabot[bot]author = mergify-ci-botauthor = renovate[bot]body ~= (?ms:.{48,})#changes-requested-reviews-by = 0#review-requested = 0#review-threads-unresolved = 0check-success=ci-gateRequired conditions to stay in the queue:
base=maindepends-on = Mergifyio/mergify-cli#1307[⛓️ ci(renovate): group cargo / github-actions updates and enable lockFileMaintenance #1307]label!=manual mergetitle ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:#approved-reviews-by>=2author = dependabot[bot]author = mergify-ci-botauthor = renovate[bot]body ~= (?ms:.{48,})#changes-requested-reviews-by = 0#review-requested = 0#review-threads-unresolved = 0check-success=ci-gate