@@ -46,21 +46,21 @@ func (handler *branchesHandler) setup() error {
4646 return
4747 }
4848
49- proj , _ , err := handler .glClient .Projects .GetProject (handler .repourl .projectID , & gitlab.GetProjectOptions {})
49+ proj , _ , err := handler .glClient .Projects .GetProject (handler .repourl .project , & gitlab.GetProjectOptions {})
5050 if err != nil {
5151 handler .errSetup = fmt .Errorf ("requirest for project failed with error %w" , err )
5252 return
5353 }
5454
55- branch , _ , err := handler .glClient .Branches .GetBranch (handler .repourl .projectID , proj .DefaultBranch )
55+ branch , _ , err := handler .glClient .Branches .GetBranch (handler .repourl .project , proj .DefaultBranch )
5656 if err != nil {
5757 handler .errSetup = fmt .Errorf ("request for default branch failed with error %w" , err )
5858 return
5959 }
6060
6161 if branch .Protected {
6262 protectedBranch , resp , err := handler .glClient .ProtectedBranches .GetProtectedBranch (
63- handler .repourl .projectID , branch .Name )
63+ handler .repourl .project , branch .Name )
6464 if err != nil && resp .StatusCode != 403 {
6565 handler .errSetup = fmt .Errorf ("request for protected branch failed with error %w" , err )
6666 return
@@ -70,13 +70,13 @@ func (handler *branchesHandler) setup() error {
7070 }
7171
7272 projectStatusChecks , resp , err := handler .glClient .ExternalStatusChecks .ListProjectStatusChecks (
73- handler .repourl .projectID , & gitlab.ListOptions {})
73+ handler .repourl .project , & gitlab.ListOptions {})
7474 if err != nil && resp .StatusCode != 404 {
7575 handler .errSetup = fmt .Errorf ("request for external status checks failed with error %w" , err )
7676 return
7777 }
7878
79- projectApprovalRule , resp , err := handler .glClient .Projects .GetApprovalConfiguration (handler .repourl .projectID )
79+ projectApprovalRule , resp , err := handler .glClient .Projects .GetApprovalConfiguration (handler .repourl .project )
8080 if err != nil && resp .StatusCode != 404 {
8181 handler .errSetup = fmt .Errorf ("request for project approval rule failed with %w" , err )
8282 return
@@ -105,24 +105,24 @@ func (handler *branchesHandler) getDefaultBranch() (*clients.BranchRef, error) {
105105}
106106
107107func (handler * branchesHandler ) getBranch (branch string ) (* clients.BranchRef , error ) {
108- bran , _ , err := handler .glClient .Branches .GetBranch (handler .repourl .projectID , branch )
108+ bran , _ , err := handler .glClient .Branches .GetBranch (handler .repourl .project , branch )
109109 if err != nil {
110110 return nil , fmt .Errorf ("error getting branch in branchsHandler.getBranch: %w" , err )
111111 }
112112
113113 if bran .Protected {
114- protectedBranch , _ , err := handler .glClient .ProtectedBranches .GetProtectedBranch (handler .repourl .projectID , bran .Name )
114+ protectedBranch , _ , err := handler .glClient .ProtectedBranches .GetProtectedBranch (handler .repourl .project , bran .Name )
115115 if err != nil {
116116 return nil , fmt .Errorf ("request for protected branch failed with error %w" , err )
117117 }
118118
119119 projectStatusChecks , resp , err := handler .glClient .ExternalStatusChecks .ListProjectStatusChecks (
120- handler .repourl .projectID , & gitlab.ListOptions {})
120+ handler .repourl .project , & gitlab.ListOptions {})
121121 if err != nil && resp .StatusCode != 404 {
122122 return nil , fmt .Errorf ("request for external status checks failed with error %w" , err )
123123 }
124124
125- projectApprovalRule , resp , err := handler .glClient .Projects .GetApprovalConfiguration (handler .repourl .projectID )
125+ projectApprovalRule , resp , err := handler .glClient .Projects .GetApprovalConfiguration (handler .repourl .project )
126126 if err != nil && resp .StatusCode != 404 {
127127 return nil , fmt .Errorf ("request for project approval rule failed with %w" , err )
128128 }
0 commit comments