fix(stack): derive repository from git remote when --repository is not provided#1123
Merged
mergify[bot] merged 1 commit intomainfrom Apr 10, 2026
Conversation
Contributor
Author
Contributor
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 🤖 Continuous IntegrationWonderful, this rule succeeded.
🟢 👀 Review RequirementsWonderful, this rule succeeded.
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 ReviewsWonderful, this rule succeeded.
🟢 📕 PR descriptionWonderful, this rule succeeded.
|
e3e2952 to
7b916b5
Compare
There was a problem hiding this comment.
Pull request overview
Fixes mergify stack checkout crashing when --repository is omitted by deriving owner/repo from the configured git remote URL (aligned with how stack list / stack push resolve the repository).
Changes:
- Make
--repositoryoptional instack checkoutand fall back to parsingremote.<trunk-remote>.url. - Add tests covering: no stacked PRs, deriving repository from remote, and honoring an explicit
--repository.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
mergify_cli/stack/cli.py |
Updates checkout CLI handler to derive user/repo from git remote when --repository is not provided. |
mergify_cli/tests/stack/test_checkout.py |
Adds new async tests for checkout behavior and repository resolution paths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7b916b5 to
5d97975
Compare
jd
previously approved these changes
Apr 10, 2026
…t provided The `stack checkout` command crashed with `AttributeError: 'NoneType' object has no attribute 'split'` when `--repository` was omitted, because the option had no default. Now falls back to resolving the user/repo from the git remote URL, consistent with `stack list` and `stack push`. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Change-Id: Ia877c5731f169267d4285b8f5997f802f44298c9
5d97975 to
fe99c6c
Compare
kozlek
approved these changes
Apr 10, 2026
remyduthu
approved these changes
Apr 10, 2026
Contributor
Merge Queue Status
This pull request spent 2 minutes 28 seconds in the queue, including 1 minute 55 seconds running CI. Required conditions to merge
|
36 tasks
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.
The
stack checkoutcommand crashed withAttributeError: 'NoneType' object has no attribute 'split'when
--repositorywas omitted, because the option had no default. Now falls back to resolvingthe user/repo from the git remote URL, consistent with
stack listandstack push.Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com