Repository navigation
feat(audit): record the branch name alongside the X-NetBox-Branch schema_id (#172) - #213
Merged
Merged
Conversation
…ema_id (#172) Branch resolvers may now return a ResolvedBranch(name, schema_id) defined in nsc/http, so the client learns the human name without importing nsc/branching. Once resolved, every audit entry carries a top-level `branch` key (also under audit_redaction: full). Unbranched lines omit the key and keep their previous shape. Claude-Session: https://claude.ai/code/session_01RD8NgCVtp3yYFd6NSZpbUb
5 tasks done
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.
Summary
ResolvedBranch(name, schema_id)(defined innsc/http, so the client learns the human-readable name without importingnsc/branching).branchkey with the branch name next to theX-NetBox-Branchschema_id header. This also applies underaudit_redaction: full.docs/guides/audit-log.md,docs/guides/branching.md. CHANGELOG entry under Unreleased.Closes #172
Test plan
tests/http/test_audit.py,tests/http/test_client_branch.pyandtests/cli/test_branch_commands.py(branch key present when branched, absent on main, kept under full redaction)just test: 1664 passed, 1 skippedjust lint: ruff, ruff format and mypy --strict all cleanhttps://claude.ai/code/session_01RD8NgCVtp3yYFd6NSZpbUb