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

Add a test case for setting the default branch when creating a repo #62

Open
dinosk opened this issue Oct 2, 2020 · 0 comments
Open
Labels
good first issue Good for newcomers

Comments

@dinosk
Copy link
Contributor

dinosk commented Oct 2, 2020

Stemming from comment #61 (comment)

To ensure that setting the default branch of a repo at creation time is functional, it should be covered in a test case in the integration tests. Creating a github repo belonging to a user with the default branch set to deploy for example, can be done with:

repo, err := c.OrgRepositories().Create(ctx, repoRef, gitprovider.RepositoryInfo{
			Description: gitprovider.StringVar("foo"),
			DefaultBranch: gitprovider.StringVar("deploy")
		}, &gitprovider.RepositoryCreateOptions{
			AutoInit:        gitprovider.BoolVar(true),
			LicenseTemplate: gitprovider.LicenseTemplateVar(gitprovider.LicenseTemplateApache2),
		})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant