pr: Attempt to assign port maintainers

This commit is contained in:
Zero King
2018-03-11 13:02:54 +00:00
parent 36c888d9d6
commit 14bfc80cbd
4 changed files with 20 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ type Client interface {
GetPullRequest(owner, repo string, number int) (*github.PullRequest, error)
ListChangedPortsAndFiles(owner, repo string, number int) (ports []string, commitFiles []*github.CommitFile, err error)
CreateComment(owner, repo string, number int, body *string) error
AddAssignees(owner, repo string, number int, assignees []string) error
ReplaceLabels(owner, repo string, number int, labels []string) error
ListLabels(owner, repo string, number int) ([]string, error)
ListOrgMembers(org string) ([]*github.User, error)

View File

@@ -54,6 +54,17 @@ func (client *githubClient) CreateComment(owner, repo string, number int, body *
return err
}
func (client *githubClient) AddAssignees(owner, repo string, number int, assignees []string) error {
_, _, err := client.Issues.AddAssignees(
client.ctx,
owner,
repo,
number,
assignees,
)
return err
}
func (client *githubClient) ReplaceLabels(owner, repo string, number int, labels []string) error {
_, _, err := client.Issues.ReplaceLabelsForIssue(
client.ctx,