Skip to content

Commit

Permalink
feat: force add default branch name on create project func
Browse files Browse the repository at this point in the history
Co-authored-by: Rizky Eko Putra <[email protected]>
  • Loading branch information
rizkyekoputra committed May 31, 2023
1 parent 6de177d commit b55cf09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/gitlab/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ func (p *project) CreateMinimalMRApproval(id NameOrId, minimalApproval int) (*gl
return project, err
}

func (p *project) CreateProject(name string, parentID int, visibility gl.VisibilityValue) (*gl.Project, error) {
func (p *project) CreateProject(name string, parentID int, visibility gl.VisibilityValue, defaultBranch string) (*gl.Project, error) {
initializeWithReadme := true
project, _, err := p.client.Projects.CreateProject(&gl.CreateProjectOptions{
Name: &name,
NamespaceID: &parentID,
Path: nil,
Visibility: gl.Visibility(visibility),
InitializeWithReadme: &initializeWithReadme,
DefaultBranch: &defaultBranch,
})
return project, err
}
Expand Down

0 comments on commit b55cf09

Please sign in to comment.