refactor: introduce branch page hierarchy for integration targets#22
Merged
Conversation
- Add TestEnsureBranchPage class (3 tests) - Update TestPreprocessPage: branch_page parenting, no prefix on titles - Update TestIntegrationPrefix: verify branch page hierarchy - Add confluence_int_token to integration test settings
Replace branch-name prefix on page titles with an intermediate
'Branch: {branch-name}' grouping page. Top-level integration pages
now parent to the branch page instead of the integration root.
- Add _ensure_branch_page() function
- Wire branch_page into run_sync() and _preprocess_page()
- Remove prefix application from titles and parent titles
BREAKING CHANGE: integration page titles no longer carry branch prefix
- Update page hierarchy section with new structure diagram - Remove branch prefix from prod/int table - Add CHANGELOG entries for branch page and breaking change
str.format() raises KeyError on literal curly braces in user-provided
templates (e.g. '--preface-markdown "Use {curly} braces"'). Switch to
manual .replace() chain that only substitutes known placeholders.
…/no_postface argparse store_true always sets the attribute; getattr with default is misleading.
- Rename test_no_prefix_applied_to_title_on_int → test_no_prefix_applied_to_title_when_branch_page_present - Add test_top_level_falls_back_to_homepage_without_roots
Merge duplicate ### Changed sections, move --no-preface/--no-postface and other new features to ### Added.
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
Replaces the branch-name prefix on integration page titles with an intermediate Branch: {branch-name} grouping page. Content pages now have clean titles under a dedicated branch node.
Breaking Changes
branch-name -prefix. Consumers bookmarking old-style titles will need to update.Changes
gitfluence/confluence.py— Add_ensure_branch_page(), wire intorun_sync(), remove prefix logic from_preprocess_page()gitfluence/template.py— Switch fromstr.format()to.replace()to avoidKeyErroron literal braces in user templatesgitfluence/__main__.py— Replacegetattr(args, "no_preface", False)with directargs.no_prefacetests/— AddTestEnsureBranchPage, updateTestPreprocessPageandTestIntegrationPrefixfor new hierarchy, add literal-braces and homepage-fallback testsREADME.md— Document new page hierarchy with diagramCHANGELOG.md— Fix duplicate headings, add breaking change and feature entriesNew Hierarchy (Integration)
Tests
73 tests pass, all pre-commit hooks green.