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

Change default branch in github integration tests to main #61

Merged
merged 1 commit into from
Oct 2, 2020

Conversation

dinosk
Copy link
Contributor

@dinosk dinosk commented Oct 2, 2020

The default branch in newly created github repos has been renamed from master to main. This change corrects the validation of repos in github integration tests.
When the branch name changes in other providers the value in gitprovider/types_repository.go can be updated too as per the related comments.

@codecov-commenter
Copy link

Codecov Report

Merging #61 into master will increase coverage by 0.23%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #61      +/-   ##
==========================================
+ Coverage   58.89%   59.13%   +0.23%     
==========================================
  Files          38       38              
  Lines        1708     1708              
==========================================
+ Hits         1006     1010       +4     
+ Misses        574      569       -5     
- Partials      128      129       +1     
Impacted Files Coverage Δ
github/githubclient.go 32.81% <0.00%> (ø)
github/client_repositories_org.go 63.26% <0.00%> (+8.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 563ef5c...3e2893a. Read the comment docs.

Copy link
Collaborator

@yiannistri yiannistri left a comment

Choose a reason for hiding this comment

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

👍

@dinosk dinosk merged commit f49ece3 into master Oct 2, 2020
@dinosk dinosk deleted the rename-default-branch-to-main branch October 2, 2020 10:27
@stefanprodan
Copy link
Member

The library should be able to create a branch even if it doesn't match the default. In GOTK we have users that want to create repos with a deploy branch in addition to main/master.

@dinosk
Copy link
Contributor Author

dinosk commented Oct 2, 2020

Yes, this is currently possible by setting the optional default branch for the repo in the gitprovider.RepositoryInfo struct, when calling OrgRepositories().Create().

It is not covered by the integration tests though, added ticket #62 for this.

@stefanprodan
Copy link
Member

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants