Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default branch of synchronized repository is wrong when source has master as default branch #65

Open
pc-ahrens opened this issue Dec 21, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request stale

Comments

@pc-ahrens
Copy link

pc-ahrens commented Dec 21, 2022

When synchronizing a repository with default branch master to GitHub Enterprise Server, the default branch is wrongly set the first branch in the list of available branches after synchronization.

Repositories with default branch main do have the correct default branch after synchronization.

Ideally, the actions-sync should be able to handle any case. Otherwise we will need to adjust the default branch after synchronization.

@ajaykn ajaykn self-assigned this Jan 4, 2023
@ajaykn ajaykn added the bug Something isn't working label Jan 4, 2023
@ajaykn
Copy link
Contributor

ajaykn commented Jan 4, 2023

Thanks @pc-ahrens for reaching out.
This is intended behaviour currently.

When we are syncing the repo for first time that doesn't exists in enterprise instance, we create repo by default with main branch if exists. If not, it picks up the first one from existing branches.

So in this case, we need to set/change the default branch manually as a one time operation.

We have added this to our backlog and will priortize if there are more customers expecting this.

@ajaykn ajaykn added enhancement New feature or request and removed bug Something isn't working labels Jan 4, 2023
@AdrianDsg
Copy link
Contributor

I'd be very grateful if @ajaykn could share a short update on this. Has there been any news since January 2023?

@hepcat72
Copy link

hepcat72 commented Apr 1, 2024

How do you manually set a default branch? Super-linter in my case is selecting master, but we use main, so it craps out saying the default branch doesn't exist.

Copy link

github-actions bot commented May 2, 2024

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

4 participants