Default branch is not default

We have an issue where “develop” is set as the default branch in our repo’s settings, but whenever a PR is first created, it’s not actually set as the default branch. Instead, it always initially sets the branch to “master”, even though we can see here in the drop-down that “develop” is labeled as “default”:

Does anyone know why it’s not respecting the default “develop” branch by actually setting new PRs to that branch?

This causes large issues for us because if we don’t notice and approve a PR to master, it triggers a GitHub action which releases everything in “develop” to “master”.


Hi @ps-rleemon :wave:

Is this a public repository? If, so please link it here for further investigation.
Also, did this repo start with “master” as the default and then “develop” was made the default?

1 Like

No, unfortunately, it is not a public repo.
Yes, the repo started with “master” as default and “develop” was later added and made the default.

1 Like

I haven’t seen this specific problem before. I will run some tests and see if I can surface what’s happening here.

1 Like

When you go to View all branches from the branch dropdown, what do you see?
Is master still listed ?

Also, could you please list the steps taken to change the default branch name?
I’m trying to reproduce this and your process will help a great deal.

1 Like
  1. Yes, master is still listed.

  2. We go to our repo > click “Settings” > “Branches” > click the left/right arrow icon and set branch

However, I actually noticed this issue is not occurring when we create a PR directly with GitHub.
I should have realized earlier that this is only occurring when we create a PR via Looker, which auto-generates the PR’s commits and sets branch to master instead of develop. Therefore, I think this may be an issue with Looker, as opposed to GitHub.

Sorry for the confusion!

I have created a post on Looker’s community forums and will report back the solution, if there is one: Default GitHub branch is not set by default | Looker Community

1 Like

Thanks for the follow up! Glad we were able to drill down into the problem a bit more. This will be beneficial to others.

1 Like