Skip to content

Commit

Permalink
added method to get default reviewers (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
craftamap authored Nov 15, 2020
1 parent 99c0de9 commit a37ba43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions bitbucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type repository interface {
Delete(opt RepositoryOptions) (interface{}, error)
ListWatchers(opt RepositoryOptions) (interface{}, error)
ListForks(opt RepositoryOptions) (interface{}, error)
ListDefaultReviewers(opt RepositoryOptions) (interface{}, error)
UpdatePipelineConfig(opt RepositoryPipelineOptions) (*Pipeline, error)
AddPipelineVariable(opt RepositoryPipelineVariableOptions) (*PipelineVariable, error)
AddPipelineKeyPair(opt RepositoryPipelineKeyPairOptions) (*PipelineKeyPair, error)
Expand Down
5 changes: 5 additions & 0 deletions repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,11 @@ func (r *Repository) ListForks(ro *RepositoryOptions) (interface{}, error) {
return r.c.execute("GET", urlStr, "")
}

func (r *Repository) ListDefaultReviewers(ro *RepositoryOptions) (interface{}, error) {
urlStr := r.c.requestUrl("/repositories/%s/%s/default-reviewers?pagelen=1", ro.Owner, ro.RepoSlug)
return r.c.execute("GET", urlStr, "")
}

func (r *Repository) UpdatePipelineConfig(rpo *RepositoryPipelineOptions) (*Pipeline, error) {
data := r.buildPipelineBody(rpo)
urlStr := r.c.requestUrl("/repositories/%s/%s/pipelines_config", rpo.Owner, rpo.RepoSlug)
Expand Down

0 comments on commit a37ba43

Please sign in to comment.