Bug in support for non-master default branches for repos
e-m-albright opened this issue · 2 comments
Hello! My team has made the decision to move our tools away from using master
, instead opting for main
as the new default branch pattern.
When I run knowledge_repo add ...
I get an error message that stems from the following code flow in updating the self.config
of one of the repo objects.
- Set the default published branch to "master"
- Read the config of the repository for updated values using the git_read method
- Break, as the git reader requires a valid
published_branch
value and is currently looking formaster
before it can set it to the repo's config override here in the reader - The issue is raised as a git.GitError and suppressed, where I'm seeing a different issue later as the
repo
object isNone
Thanks for any support here!
I'll try my hand at a pull request as I can
Hi Evan, Thanks for filing this issue. I'm a bit short on bandwidth at the moment, so might not be able to help debug, but if you do get to submit a PR let's definitely merge it! :)
Hey! I tried a few things and landed on this PR #571
I also considered that for your for_uri
factory method you might want to pass in args
entirely as it seems like the knowledge_branch
arg could be useful here to the constructor in replacing the master
reference, but it felt like it wasn't a terribly clean fix.