Conversation
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🔴 👀 Review RequirementsThis rule is failing.
🔴 🔎 ReviewsThis rule is failing.
🟢 🤖 Continuous IntegrationWonderful, this rule succeeded.
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 📕 PR descriptionWonderful, this rule succeeded.
|
🧪 CI InsightsHere's what we observed from your CI run for 389e2f9. 🟢 All jobs passed!But CI Insights is watching 👀 |
572ba4a to
e5d5b20
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new mergify freeze command group to manage scheduled merge freezes via the Mergify API, along with a dedicated API wrapper and CLI tests.
Changes:
- Introduces
freezeCLI group withlist,create,update, anddeletesubcommands, including table/JSON output. - Adds
mergify_cli.freeze.apiclient functions for the scheduled freeze endpoints. - Adds a comprehensive
respx-based CLI test suite for the new command group.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
mergify_cli/freeze/cli.py |
Implements the freeze click command group, formatting/output, and default token/repo detection. |
mergify_cli/freeze/api.py |
Adds async API calls for list/create/update/delete scheduled freezes. |
mergify_cli/cli.py |
Registers the new freeze command group in the top-level CLI. |
mergify_cli/tests/freeze/test_cli.py |
Adds CLI tests covering list/create/update/delete flows and error paths. |
mergify_cli/tests/freeze/__init__.py |
Adds package marker for freeze tests. |
mergify_cli/freeze/__init__.py |
Adds package marker for freeze module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e5d5b20 to
097f802
Compare
097f802 to
9ee9a71
Compare
Add `mergify freeze` command group with list, create, update, and delete subcommands for managing scheduled merge freezes. Supports both Mergify application keys and GitHub tokens for authentication, auto-detects repository from git remote, and provides both table and JSON output. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Change-Id: I414d168066f7b5070e75520bdcbb8189d694ad72 Claude-Session-Id: 77d8be2d-854a-4d80-ac2d-4489fa50e31d
9ee9a71 to
389e2f9
Compare
There was a problem hiding this comment.
No error handling on API responses
The API functions (list_freezes, create_freeze, etc.) call .json() on responses without checking status codes first. The check_for_status event hook on the HTTP client will raise on 4xx/5xx, but only after
aread() — if the hook fails to trigger or the client is used differently, you'd get silent failures. This is consistent with the existing codebase pattern though, so it's acceptable.
There was a problem hiding this comment.
Acknowledged — this follows the existing codebase pattern where check_for_status on the HTTP client event hook handles error responses.
| required=True, | ||
| help="Matching condition (repeatable, e.g. -c 'base=main')", | ||
| ) | ||
| @click.option( |
There was a problem hiding this comment.
Users shouldn't need to re-specify every field just to change the end time ?
There was a problem hiding this comment.
Agreed this would be a better UX. The update API currently requires all fields (it's a full replacement, not a partial patch). We should change the API to support partial updates first, then update the CLI to match.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 8 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add
mergify freezecommand group with list, create, update, and deletesubcommands for managing scheduled merge freezes. Supports both Mergify
application keys and GitHub tokens for authentication, auto-detects
repository from git remote, and provides both table and JSON output.
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com