Skip to content

Commit a37ba43

Browse files
authored
added method to get default reviewers (#104)
1 parent 99c0de9 commit a37ba43

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

bitbucket.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ type repository interface {
3232
Delete(opt RepositoryOptions) (interface{}, error)
3333
ListWatchers(opt RepositoryOptions) (interface{}, error)
3434
ListForks(opt RepositoryOptions) (interface{}, error)
35+
ListDefaultReviewers(opt RepositoryOptions) (interface{}, error)
3536
UpdatePipelineConfig(opt RepositoryPipelineOptions) (*Pipeline, error)
3637
AddPipelineVariable(opt RepositoryPipelineVariableOptions) (*PipelineVariable, error)
3738
AddPipelineKeyPair(opt RepositoryPipelineKeyPairOptions) (*PipelineKeyPair, error)

repository.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,11 @@ func (r *Repository) ListForks(ro *RepositoryOptions) (interface{}, error) {
309309
return r.c.execute("GET", urlStr, "")
310310
}
311311

312+
func (r *Repository) ListDefaultReviewers(ro *RepositoryOptions) (interface{}, error) {
313+
urlStr := r.c.requestUrl("/repositories/%s/%s/default-reviewers?pagelen=1", ro.Owner, ro.RepoSlug)
314+
return r.c.execute("GET", urlStr, "")
315+
}
316+
312317
func (r *Repository) UpdatePipelineConfig(rpo *RepositoryPipelineOptions) (*Pipeline, error) {
313318
data := r.buildPipelineBody(rpo)
314319
urlStr := r.c.requestUrl("/repositories/%s/%s/pipelines_config", rpo.Owner, rpo.RepoSlug)

0 commit comments

Comments
 (0)