From b0ad04189730f5af3e83c96265f31929a78f7bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Br=C3=B8ndum?= Date: Fri, 16 Oct 2020 11:14:21 +0200 Subject: [PATCH] added default labels --- gh/commit.go | 7 ++++++- go.sum | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gh/commit.go b/gh/commit.go index d5f32f34..5749f39d 100644 --- a/gh/commit.go +++ b/gh/commit.go @@ -71,13 +71,18 @@ func CreatePR(ctx context.Context, client *github.Client, repoOwner string, repo return nil, err } - // we dont care about your errors! + // disect team reviewers var teamReviewers []string for _, reviewer := range reviewers { if strings.Contains(reviewer, "/") { teamReviewers = append(teamReviewers, strings.Split(reviewer, "/")[1]) } } + + // add default labels + labels = append(labels, []string{"dependencies", "circleci"}...) + + // we dont care about your errors! client.PullRequests.RequestReviewers(ctx, repoOwner, repoName, pr.GetNumber(), github.ReviewersRequest{Reviewers: reviewers, TeamReviewers: teamReviewers}) client.Issues.AddAssignees(ctx, repoOwner, repoName, pr.GetNumber(), assignees) client.Issues.AddLabelsToIssue(ctx, repoOwner, repoName, pr.GetNumber(), labels) diff --git a/go.sum b/go.sum index 841aaf65..f5e61d94 100644 --- a/go.sum +++ b/go.sum @@ -235,6 +235,7 @@ github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-github v15.0.0+incompatible h1:jlPg2Cpsxb/FyEV/MFiIE9tW/2RAevQNZDPeHbf5a94= github.com/google/go-github v15.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= +github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= github.com/google/go-github/v29 v29.0.2/go.mod h1:CHKiKKPHJ0REzfwc14QMklvtHwCveD0PxlMjLlzAM5E= github.com/google/go-github/v29 v29.0.3 h1:IktKCTwU//aFHnpA+2SLIi7Oo9uhAzgsdZNbcAqhgdc= github.com/google/go-github/v29 v29.0.3/go.mod h1:CHKiKKPHJ0REzfwc14QMklvtHwCveD0PxlMjLlzAM5E=