Repository navigation
fix(branching): ignore profile sticky branch when --url targets another server (#171) - #185
Merged
Merged
Conversation
… another server (#171) resolve_branch_selection applied the profile's branch even when --url or NSC_URL pointed at a different NetBox, failing with not_found there. The profile branch is now dropped when the URL override differs from the profile URL (normalised; trailing slash and host case ignored). --branch and NSC_BRANCH still apply. Reuses _select_base_profile instead of duplicating the profile lookup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 23, 2026
…ile branch is ignored Review follow-ups for #171: nsc branch use / create --use wrote or cleared the profile's sticky branch while --url/NSC_URL targeted another server. They now fail with a config error before any write. When the profile branch is dropped because of a URL override, a one-line stderr notice says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Adversarial review addressed. Fixed: |
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.
Closes #171
resolve_branch_selectiondrops the profile'sbranch:when--url/NSC_URLdiffers from the profile URL. Both are normalised withHttpUrl, so a trailing slash or a different host case still counts as the same server.--branchandNSC_BRANCHstill apply._select_base_profile.branching.md,managing-profiles.md) and the CHANGELOG are updated.Tests: new cases in
tests/cli/test_runtime_branch.py(different server via flag and env, same server in three spellings, explicit branch with an override). Full suite: 1572 passed. Manual check:nsc --url <other> branch currentreportssource: null.🤖 Generated with Claude Code