You've already forked mpbot-github
mirror of
https://github.com/macports/mpbot-github.git
synced 2026-03-31 14:46:03 -07:00
pr: Attempt to assign port maintainers
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user