Skip to content

Commit

Permalink
[feat]: [CDS-73030]: added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adivishy1 committed Jul 5, 2023
1 parent 64a614c commit aefd6d1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scm/driver/gitea/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ func (s *gitService) ListBranches(ctx context.Context, repo string, opts scm.Lis
}

func (s *gitService) ListBranchesV2(ctx context.Context, repo string, opts scm.BranchListOptions) ([]*scm.Reference, *scm.Response, error) {
// Gitea doesnt provide support listing based on searchTerm
// Hence calling the ListBranches
return s.ListBranches(ctx, repo, opts.PageListOptions)
}

Expand Down
2 changes: 2 additions & 0 deletions scm/driver/gitee/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ func (s *gitService) ListBranches(ctx context.Context, repo string, _ scm.ListOp
}

func (s *gitService) ListBranchesV2(ctx context.Context, repo string, opts scm.BranchListOptions) ([]*scm.Reference, *scm.Response, error) {
// Gitee doesnt provide support listing based on searchTerm
// Hence calling the ListBranches
return s.ListBranches(ctx, repo, opts.PageListOptions)
}

Expand Down
2 changes: 2 additions & 0 deletions scm/driver/github/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ func (s *gitService) ListBranches(ctx context.Context, repo string, opts scm.Lis
}

func (s *gitService) ListBranchesV2(ctx context.Context, repo string, opts scm.BranchListOptions) ([]*scm.Reference, *scm.Response, error) {
// Github doesnt provide support listing based on searchTerm
// Hence calling the ListBranches
return s.ListBranches(ctx, repo, opts.PageListOptions)
}

Expand Down
2 changes: 2 additions & 0 deletions scm/driver/gogs/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ func (s *gitService) ListBranches(ctx context.Context, repo string, _ scm.ListOp
}

func (s *gitService) ListBranchesV2(ctx context.Context, repo string, opts scm.BranchListOptions) ([]*scm.Reference, *scm.Response, error) {
// Gogs doesnt provide support listing based on searchTerm
// Hence calling the ListBranches
return s.ListBranches(ctx, repo, opts.PageListOptions)
}

Expand Down
2 changes: 2 additions & 0 deletions scm/driver/harness/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ func (s *gitService) ListBranches(ctx context.Context, repo string, opts scm.Lis
}

func (s *gitService) ListBranchesV2(ctx context.Context, repo string, opts scm.BranchListOptions) ([]*scm.Reference, *scm.Response, error) {
// Harness doesnt provide support listing based on searchTerm
// Hence calling the ListBranches
return s.ListBranches(ctx, repo, opts.PageListOptions)
}

Expand Down
2 changes: 2 additions & 0 deletions scm/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ type (

// ListBranches returns a list of git branches.
ListBranches(ctx context.Context, repo string, opts ListOptions) ([]*Reference, *Response, error)

// ListBranchesV2 returns a list of git branches based on the searchTerm passed.
ListBranchesV2(ctx context.Context, repo string, opts BranchListOptions) ([]*Reference, *Response, error)

// ListCommits returns a list of git commits.
Expand Down

0 comments on commit aefd6d1

Please sign in to comment.