Skip to content

Conversation

@zubron
Copy link
Contributor

@zubron zubron commented Oct 29, 2025

Closes #9157

Change Description

Background

The generated README.md for sample repositories hardcoded the default branch as main. 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 main as 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 lakeFS locally with a repository using a custom default branch:

  1. Created a test repository (test-custom-branch) with custom-branch as the default branch name (instead of main)
  2. Generated the sample README.md for this repository
  3. Verified that all references to the branch name were correctly updated throughout the README

Screenshots of the fix

Repository configuration showing custom default branch name:
repo-branch-configuration

README intro correctly references custom-branch:
readme-intro-branch-name

The note states that the tutorial's screenshot images still show main.

CLI examples use the correct branch name:
readme-cli-example

Query examples use the correct branch name:
readme-query-example

The generated README.md for sample repositories hardcoded the
default branch as main. 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.

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 `main` as the default branch so various documentation lines
and image alt-texts have been updated to reflect this.

Closes #9157
@zubron zubron added the bug Something isn't working label Oct 29, 2025
Copy link
Contributor

@itaigilo itaigilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff @zubron , congrats for your first lakeFS PR!

Basically this LGTM,
But blocking with two meta-comments:

  1. Please add testing details. This well might be something like "I ran lakeFS locally, created a new repo with a non-main default branch, and verified that 'main' doesn't appear in the created README". Or providing a screenshot of such README with a different default branch name.
  2. Note that a include/exclude-changelog label is required. I personally think it's changelog worthy, but I'm not sure.

Anyway, looking good!

@zubron zubron added the include-changelog PR description should be included in next release changelog label Oct 30, 2025
@zubron
Copy link
Contributor Author

zubron commented Oct 30, 2025

@itaigilo Thanks for the review! You're right, I should have included those details. I've updated the description with how I tested it locally, and added a selection of screenshots to show how the correct branch name is being used and that the images are correctly linked. I agree on including it in the changelog as it is fixing a user facing bug, so I've added that label.

Hopefully that addresses all your concerns, but please let me know if there's anything else I can do to improve it :)

@zubron zubron requested a review from itaigilo October 30, 2025 20:44
Copy link
Contributor

@itaigilo itaigilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 😎

Congrats -
Feel free to squash-and-merge.

@zubron zubron merged commit eaea4f4 into master Oct 31, 2025
44 of 46 checks passed
@zubron zubron deleted the fix/broken-links-in-sample-repo-with-custom-branch-9157 branch October 31, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working include-changelog PR description should be included in next release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Sample repository README.md links broken on non-main default branch

2 participants