Fix broken links in sample repos with custom default branch #9619
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 #9157
Change Description
Background
The generated
README.mdfor sample repositories hardcoded the default branch asmain. This meant that if a user specified a custom default branch name, the image asset links would be broken and tutorial commands would be incorrect.Bug Fix
This change introduces a new config field for the templater to use the specified default branch and updates the README.md template to use this new field. The existing screenshots still use
mainas the default branch so various documentation lines and image alt-texts have been updated to reflect this.Testing Details
I verified this fix by running
lakeFSlocally with a repository using a custom default branch:test-custom-branch) withcustom-branchas the default branch name (instead ofmain)Screenshots of the fix
Repository configuration showing custom default branch name:

README intro correctly references

custom-branch:The note states that the tutorial's screenshot images still show
main.CLI examples use the correct branch name:

Query examples use the correct branch name:
