Граф коммитов

116 Коммитов

Автор SHA1 Сообщение Дата
Julie Qiu 7c7e97c9cc cmd/gopherbot: label x/vuln issues
Automatically label all x/vuln issues with the label "x/vuln".

Change-Id: I4f0c6faeddd1a9da410d07cb91c6e6cc0eaaf765
Reviewed-on: https://go-review.googlesource.com/c/build/+/360715
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-11-02 20:17:36 +00:00
Heschi Kreinick 93c2ea3f19 all: update resource requests
The new "services" cluster is stricter about resource requirements. I'm
not sure exactly why but I don't think it matters. Set ones that work.

In particular, anything that uses maintner needs a bunch of disk and
ram.

For golang/go#48408.

Change-Id: I5eacd22eb6ae177bd82faedb83b3489fafa98811
Reviewed-on: https://go-review.googlesource.com/c/build/+/350753
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2021-09-17 21:59:01 +00:00
Heschi Kreinick e4e0662004 all: remove node selector
For golang/go#48408.

Change-Id: I5709cb4278d8c754508d9f4bf76849592b6f9855
Reviewed-on: https://go-review.googlesource.com/c/build/+/350114
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-09-15 20:30:55 +00:00
Julie Qiu 1c53e0647f cmd/gopherbot: set pkgsite milestones
Automatically set milestones for pkgsite issues.

Change-Id: Ib736e33313abad7bfdb44d27cbbf62c33300944d
Reviewed-on: https://go-review.googlesource.com/c/build/+/348971
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-09-13 16:38:46 +00:00
Dmitri Shuralyov c4b8abe9ac cmd/gopherbot: move to Workload Identity
Create a new service account, and move the deployment over to the prod
namespace. Also update the build image to Go 1.17.

For golang/go#48263.

Change-Id: I9c7776b294ee78c2745670f805ec70cab1ae4573
Reviewed-on: https://go-review.googlesource.com/c/build/+/349056
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2021-09-10 19:08:05 +00:00
Carlos Amedee 55fdac83a0 all: update Kubernetes API version
The extensions/v1beta1 API version is no longer supported. This
change updates the API version. It also adds the selector to spec which
helps the configurations pass the validation step.

Change-Id: I2335fe1f7272dfa7ca4abedfa902426226fafde9
Reviewed-on: https://go-review.googlesource.com/c/build/+/346416
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-08-31 22:02:31 +00:00
Dmitri Shuralyov 55124f14eb cmd/gopherbot: add task to ping "early-in-cycle" issues
There are two tasks we regularly do when reopening the tree for the
next major Go version development: remove "wait-release" hashtags
from CLs, and ping issues with "early-in-cycle" label.

The former was automated in CL 129817. The latter is automated here.
Maintner is used to find issues, and a GitHub API client is used to
post comments.

The Go 1.17 cycle was used as an opportunity to test this approach.
It worked as expected; no unexpected problems were found.

Like the unwait-release task, this is run manually via -only-run flag.
In the future we may want to factor both of these tasks out of
gopherbot and into a place that can be used by release automation.
But this seems like the most sensible place to add it initially.

Add a brief sleep in the hot loop for tasks that are invoked
manually. This is to appease humans and can modified at will.
It's unlikely to remain needed when these tasks are automated further.

For golang/go#40279.

Change-Id: I70c4eb7e98551d610f1518d1599661db21e2f271
Reviewed-on: https://go-review.googlesource.com/c/build/+/300570
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2021-05-05 21:05:28 +00:00
Rebecca Stambler 43d580498f cmd/gopherbot: only milestone new vscode-go issues as Untriaged
Transferred issues are getting categorized as part of this set and
returning errors when the milestone is applied, causing GitHub to rate
limit Gopherbot. Only try to milestone newly created issues as a result.

And re-enable that task now that the number of transferred issues should
be lower.

For golang/go#40640

Change-Id: I7e772d1bcda46e982f0f375481108ff10c064ae9
Reviewed-on: https://go-review.googlesource.com/c/build/+/309069
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-04-09 22:09:59 +00:00
Dmitri Shuralyov da7dfab41b cmd/gopherbot: add more deleted issues to deletedIssues map
A good amount of time has passed since the deletedIssues map was last
updated, and the "freeze old issues" task was needlessly making 34 API
calls to freeze issues that are gone. After this change, that task is
making 0 API calls (whenever there aren't existing issues to freeze).

Some gardening tasks were converted to be more general and run on more
issue trackers in CL 233377, so update the deletedIssues map to track
the repo ID in addition to the issue number.

For golang/go#28320.
Updates golang/go#22635.
Updates golang/go#44406.
Updates golang/go#39008.

Change-Id: I3b477bf717f7d97676e9ef950214a3598ec3abd2
Reviewed-on: https://go-review.googlesource.com/c/build/+/308790
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-09 15:34:01 +00:00
Dmitri Shuralyov 1981e83dbe cmd/gopherbot: disable "set vscode-go milestones" task
The maintner data model doesn't expose when an issue gets transferred
from one repo to another (that's golang.org/issue/37370), so GopherBot
currently doesn't skip transferred issues when processing them.

There turns out to be many transferred issues in the vscode-go repo,
causing gopherbot to take too many repetitive actions as reported in
golang.org/issue/45461. Skip the task by default until this is handled
better to avoid depleting the GitHub quota way too quickly.

For golang/go#45461.

Change-Id: I404c94b342f9a870f159d3cadef6cfa2a9979d2d
Reviewed-on: https://go-review.googlesource.com/c/build/+/308789
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-04-09 15:33:49 +00:00
Rebecca Stambler 2bdcdb7774 cmd/gopherbot: configure all vscode-go issues to be marked Untriaged
For the purposes of improving issue triage, it's helpful to add all of
the new issues in the vscode-go repo to Untriaged. Add a gopherbot task
that does this.

Change-Id: I9484c6fd4cc8388cba5f9bf629b77b3a5dda29cf
Reviewed-on: https://go-review.googlesource.com/c/build/+/308350
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-04-08 22:22:43 +00:00
Julie Qiu 7ff1f9441a all: add or change GoDoc badge to pkg.go.dev manually
READMEs with a GoDoc badge that were not changed by update-readmes.go
are manually changed.

For golang/go#42251

Change-Id: Iaaa815e4a5f0905cfb20ea62fcb4cf2e75fde991
Reviewed-on: https://go-review.googlesource.com/c/build/+/276033
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-12-15 04:54:49 +00:00
Hana (Hyang-Ah) Kim d1ab7ac8e2 cmd/gopherbot: rename a function to be more descriptive
labelChangeDisallowed is closer to what this function is meant for.

Change-Id: I64b143263df2d3dca018f9daecd73c2be59e84c9
Reviewed-on: https://go-review.googlesource.com/c/build/+/260417
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-10-07 20:08:45 +00:00
Carlos Amedee 442b1a7d81 internal/secret: add a must constructor for the secret client
Multiple packages have a need for a secret client which exits when the
creation of the client failed. This change adds a must constructor
which would eliminate the code being duplicated.

For  golang/go#37171

Change-Id: I7f56ee681e66c42e290fa00861cb00abb56a2f47
Reviewed-on: https://go-review.googlesource.com/c/build/+/255941
Trust: Carlos Amedee <carlos@golang.org>
Trust: Alexander Rakoczy <alex@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2020-09-22 02:20:15 +00:00
Julie Qiu f1e0897840 cmd/gopherbot: address comments from CL 256179
This CL addresses post-merge comments from CL 256179.

Change-Id: I31f7d9cb521442a28697806380bf26b981d1062e
Reviewed-on: https://go-review.googlesource.com/c/build/+/256337
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-09-21 15:59:23 +00:00
Julie Qiu 86ff168dcb cmd/gopherbot: label x/pkgsite issues as pkgsite
x/pkgsite issues now use the pkgsite label instead of go.dev. Gopherbot
is updated accordingly.

The Documentation label will not be automatically applied to x/pkgsite
issues.

Change-Id: I9f399c38a72dec74e0b8dc742b762b26a84cd022
Reviewed-on: https://go-review.googlesource.com/c/build/+/256179
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-09-21 15:34:52 +00:00
Alexander Rakoczy bbb3aae8c4 cmd/gopherbot: skip labeling nonexistent issues
When an issue is transferred, we incorrectly continue trying to manage
the issue with Gopherbot, even though we should be able to pick up the
new issue and decide if it is Gopherbot's responsibility. As a temporary
fix, this change skips issues which return a 404 when adding labels.

For golang/go#40640

Change-Id: Ib84490c1e41a71b14c0f736a41d1f6032a3c2c92
Reviewed-on: https://go-review.googlesource.com/c/build/+/256040
Trust: Alexander Rakoczy <alex@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2020-09-18 21:36:32 +00:00
Alexander Rakoczy d7661732bd cmd/gopherbot: label x/pkgsite issues as go.dev
The feedback link (https://golang.org/s/discovery-feedback) was updated
to use an issue title prefix of x/pkgsite. We should label issues based
on the new prefix as well.

Fixes golang/go#41481

Change-Id: Id7615b8996c2d945d405a5996136fbb7cece42cf
Reviewed-on: https://go-review.googlesource.com/c/build/+/255939
Trust: Alexander Rakoczy <alex@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-09-18 19:20:34 +00:00
Alexander Rakoczy 22f2f0865f cmd/gopherbot: skip commenting on nonexistent issues
When an issue is transferred, we incorrectly continue trying to manage
the issue with Gopherbot, even though we should be able to pick up the
new issue. As a temporary fix, this change skips issues which return a
404 when trying to comment.

For golang/go#40640

Change-Id: I9280fab7a8ec4ead0d3e1cc5695d9b7eb39d6b32
Reviewed-on: https://go-review.googlesource.com/c/build/+/247409
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2020-08-07 20:47:25 +00:00
Rebecca Stambler 1dcd8460d7 cmd/gopherbot: fix bug causing infinite reviewer assignments
And reenable auto-assignment. This issue was introduced in CL 236438 -
the gerritInstanceID variable already includes the @, so the GetPerson
lookup was failing due to the incorrect formatting.

Fixes golang/go#40468

Change-Id: I5a8d884a7526ee53e04da673c542ed4097c55a2e
Reviewed-on: https://go-review.googlesource.com/c/build/+/247239
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2020-08-06 20:52:36 +00:00
Andrew Bonventre c32acf8915 cmd/gopherbot: temporarily disable assigning reviewers
This is potentially caught in an infinite loop, which updates
a Gerrit change too many times, leaving the change in an unusable
state.

Also adds a map of deleted issues to prevent an error loop caused
by attempting to post changes to issues that don’t exist.

Updates golang/go#40147
Updates golang/go#40468

Change-Id: I3922d63c146591809324861d40437f43e115748c
Reviewed-on: https://go-review.googlesource.com/c/build/+/247195
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2020-08-06 20:33:03 +00:00
Rebecca Stambler cd7372b931 cmd/gopherbot: fix missing import
I must have not rebased CL 241271 before submitting, because somehow,
there's a missing import.

Change-Id: Id050fb547258a2733935f90f35260a60a3815fb2
Reviewed-on: https://go-review.googlesource.com/c/build/+/241858
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-07-10 03:10:07 +00:00
Rebecca Stambler 2aa5be62af cmd/gopherbot: remove automatic troubleshooting comment
I think the usefulness of this has run its course. There's very little
evidence that anyone is ever actually reading the troubleshooting guide.

Change-Id: I903e39c870bbafa377c72ae40b1b0bbffccfb37e
Reviewed-on: https://go-review.googlesource.com/c/build/+/241271
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-07-08 05:19:48 +00:00
Rebecca Stambler cfe9ff1979 cmd/gopherbot: don't set reviewers if they are the same as current
This change avoids calling SetReview with reviews that would have no
effect on the change. This is particularly relevant for changes imported
from PRs, as they require 2 reviewers. If there is only one owner for
the package, we should avoid continually setting the same reviewer.

This change is implemented by keeping track of all of the human
reviewers on a given change and comparing them to the proposed
reviewers. This is a little complicated, given that the current
reviewers can only be kept track of by their Gerrit IDs, whereas owners
are added by the emails associated with their Gerrit accounts.

Change-Id: I684c8c86fd5c0c2c411450ae48a332ba796f5d60
Reviewed-on: https://go-review.googlesource.com/c/build/+/236438
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2020-07-07 16:49:07 +00:00
Rebecca Stambler 147530976d cmd/gopherbot: restructure congratulatory messages for x/repos
This change splits out the paragraph mentioning the freeze from the
default congratulatory message, only showing it if the CL is to a
golang/go repository.

Running gopherbot with --dry-run reports no changes, which is expected
since all CLs that should get congratulatory messages probably already
have them.

Fixes golang/go#39160

Change-Id: I4d0f6c25a9403033c87bf8884a2224927629192d
Reviewed-on: https://go-review.googlesource.com/c/build/+/234897
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2020-06-01 23:16:59 +00:00
Rebecca Stambler bdb4c1fd7a cmd/gopherbot: fix reviewer assignment for CLs imported from PRs
golang/go#30265 causes Gerrit to add the authors of PRs as reviewers on
the imported CLs. Then, when Gopherbot assigns reviewers to the PR, it
seems a human reviewer already listed, meaning that a lot of CLs never
get assigned reviewers and are then never replied to.

As a work-around for these issues, require two reviewers on all PRs.

Fixes golang/go#31658

Change-Id: I7b3f62194450cba61493d8c4c0ad14320443e641
Reviewed-on: https://go-review.googlesource.com/c/build/+/227977
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2020-05-28 15:16:39 +00:00
Dmitri Shuralyov 511221c1b1 cmd/gopherbot: print referenced repo in closeCherryPickIssues
Calls to addGitHubComment and closeGitHubIssue operate on ref.Repo.ID(),
so use it in printIssue call too, rather than hard-coding b.gorepo.ID().

There's no change in behavior now because the closeCherryPickIssues task
only closes issues in the main Go repository at this time, but it should
prevent confusion if that changes in the future.

For golang/go#39008.

Change-Id: Idb72eb884a917ce1eb4d9cc7fb6114e52ddee9db
Reviewed-on: https://go-review.googlesource.com/c/build/+/234023
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-05-15 16:25:53 +00:00
Rebecca Stambler cf70d9152a cmd/gopherbot: extend gopherbot's general tasks to the vscode-go repo
GopherBot has a few tasks, such as automatically applying labels and
closing stale issues, which are applicable to all golang.org/x repos,
not just golang/go. This change makes these work for golang/go and
golang/vscode-go, with the eventual intention of making them work for
more repos.

Updates golang/go#39008

Change-Id: I4aad54822422747aeac25590de3069562bebb3a5
Reviewed-on: https://go-review.googlesource.com/c/build/+/233377
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-05-15 02:54:19 +00:00
Carlos Amedee 65b4327a78 cmd/gopherbot: migrate secrets to secret manager
This change retrieves the secrets used by gopherbot from secret
manager. It is part of the project to store all secrets in a single
location.

Updates golang/go#37171

Change-Id: Id40d0745f00e9c44f2d71b1ba64885e4db6e5ef7
Reviewed-on: https://go-review.googlesource.com/c/build/+/219939
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2020-03-10 16:50:23 +00:00
Alexander Rakoczy 87c4823281 cmd/gopherbot: add unreleased milestone to go.dev issues
This change updates gopherbot to add the Unreleased milestone for go.dev
issues if they do not yet have a milestone.

Tested locally with dry-run.

Updates golang/go#36749

Change-Id: I1fe0739d15961669950b8f65a8767a09c619943d
Reviewed-on: https://go-review.googlesource.com/c/build/+/217957
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-02-06 15:39:19 +00:00
Alexander Rakoczy 933f81f5b4 cmd/gopherbot: label go.dev issues
go.dev and pkg.go.dev now use the Go issue tracker. This will save us a
little bit of effort triaging.

Fixes golang/go#36749

Change-Id: I2840178afdb4b358f424c28c3e36a6cf5de50dd9
Reviewed-on: https://go-review.googlesource.com/c/build/+/216300
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-01-28 16:09:18 +00:00
Alexander Rakoczy 5e0c16c9dc cmd/gopherbot: minor follow-ups from previous CL
This change resolves outstanding comments in golang.org/cl/209717. The
import change was due to my using goimports -local.

Change-Id: I55b50166caf9ac347a11f5d3f5025860f436fc82
Reviewed-on: https://go-review.googlesource.com/c/build/+/210781
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2019-12-10 19:40:12 +00:00
Alexander Rakoczy 101a9af9cd cmd/gopherbot: improve test fake for GitHub issues
This change adds an interface and a fake implementation of a GitHub
service for labeling GitHub issues. This allows us to test more
thoroughly, as well as avoid swapping globally scoped function vars out
in tests.

There are still more places to improve testing of GitHub API calls, but
this is a start.

Change-Id: I76d007163d65e513d74c98d0211cbb92296bfa0c
Reviewed-on: https://go-review.googlesource.com/c/build/+/209717
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-12-10 18:21:55 +00:00
Rebecca Stambler 6e39db66ef cmd/gopherbot: make sure gopls is in the title prefix before labeling
There have been a few instances of people reporting cmd/go issues with
gopls as an example binary that they tried to install. This leads to
issues being labeled as gopls issues, even if they are not.

Change-Id: Iead43281c4b12bebc8748057d4af7131d61d1681
Reviewed-on: https://go-review.googlesource.com/c/build/+/202297
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-10-21 21:29:37 +00:00
Rebecca Stambler 0dcb7edcc2 cmd/gopherbot: check if bug opened by a known contributor before labeling
This change prevents GopherBot from adding a helpful comment on bugs
opened by known contributors.

Change-Id: Ibda3523d5a90e05f1eaf1be61ce555645f14e26f
Reviewed-on: https://go-review.googlesource.com/c/build/+/200762
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-10-16 18:45:32 +00:00
Rebecca Stambler e707fb0ed3 cmd/gopherbot: update link to troubleshooting page
We're moving off of the Wiki and to committed markdown.

Change-Id: I931064bf42cc52d76f2044475a3c1df3edefc71e
Reviewed-on: https://go-review.googlesource.com/c/build/+/196697
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-09-20 14:40:23 +00:00
Matthew Dempsky 08f6ae5e29 cmd/gopherbot: add opt-out from automatic reviewers
Updates golang/go#34362.

Change-Id: I2a1861d7ebb903d0231a7670597467b02d53ac96
Reviewed-on: https://go-review.googlesource.com/c/build/+/196138
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-09-18 17:54:13 +00:00
Than McIntosh 452aaf25b0 cmd/gopherbot: avoid auto-assignment of CLs on shared branches
Don't auto-assign reviewers for CLs on shared branches such as
"dev.garbage" or "dev.ssa" -- the presumption is that folks working on
such branches will be familiar enough with development practices that
they can assign their own reviewers.

Change-Id: I196d73d76cb0c6e72dd30f52f9341febff311b7a
Reviewed-on: https://go-review.googlesource.com/c/build/+/196141
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-09-18 16:08:04 +00:00
Andrew Bonventre 0d7c512d74 cmd/gopherbot: update map of deleted CLs to include some from scratch
Updates golang/go#22635
Updates golang/go#28320

Change-Id: I8769dc83187ad1b1b2c1d751818964565f34e6d3
Reviewed-on: https://go-review.googlesource.com/c/build/+/176038
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-09-13 16:48:49 +00:00
Rebecca Stambler 76d9bfc50b cmd/gopherbot: label Tools issues automatically
Automatically label any issues with x/tools in the title. This will make
them easier to search.

Change-Id: Ib2b1b9d6b208d2c0748282a5cdeb8c7705483f61
Reviewed-on: https://go-review.googlesource.com/c/build/+/194360
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-09-09 19:50:41 +00:00
Brad Fitzpatrick 54acf3aeb9 cmd/gopherbot: don't remove NeedsDecision from Go 2 issues
CL 180925 was a bit too aggressive. We've since cleaned up its changes
(see patchset 1 of this CL).

Updates golang/go#31788

Change-Id: I96b8fa4f5cbc158869e4f607aa69be130c0eda75
Reviewed-on: https://go-review.googlesource.com/c/build/+/193120
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-09-04 17:01:19 +00:00
Dmitri Shuralyov 638dc400f4 cmd/coordinator, maintner, devapp: factor out foreachLine helpers
It's a good idea to have an allocation test for the foreachLine helpers
to ensure their zero-allocation property isn't accidentally compromised.

Such tests turned out not to be compatible with large packages that have
many existing high-level tests, some of which start HTTP servers and/or
clients and miscellenous goroutines, and in turn leak goroutines beyond
test execution that may cause allocations in the background, leading to
inaccurate reports from testing.AllocsPerRun.

In general, a best practice is to write tests that clean up all their
resources after completion, but cmd/coordinator is large and optimized
for a single execution. Future changes may be done in a way that will
cause TestForeachLineAllocs to fail intermittently again.

As a future-proof and simple solution, just factor out the foreachLine
helpers into a small, dedicated internal package.

Fixes golang/go#33949

Change-Id: I664ec27f2b97c47a1cc88e5428152046187dbc36
Reviewed-on: https://go-review.googlesource.com/c/build/+/192680
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2019-08-30 20:45:12 +00:00
Rebecca Stambler 6cacbcd195 cmd/gopherbot: add a Gopherbot comment requesting more gopls information
Since we can't add another GitHub issue template specifically for gopls,
have Gopherbot add a comment requesting more information. For now, the
comment just links to the Troubleshooting wiki page, but we can make it
more sophisticated if necessary.

Change-Id: Iec7e5f8347caa6132416df305bbd7f2c1db45eef
Reviewed-on: https://go-review.googlesource.com/c/build/+/190401
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-08-16 20:10:24 +00:00
Dmitri Shuralyov b8243eba38 cmd/gopherbot: don't fight over NeedsDecision removal
This is a followup to CL 180925 to prevent gopherbot from fighting
people (too much) if they decide to override gopherbot's behavior
and re-add the NeedsDecision label. It's done by adding a check for
whether gopherbot has already taken the action and avoid repeating
it if so.

Since this action is removing a label, we can't just check for any
"labeled" event, as those are likely to happen for other reasons.
So add a more precise check for whether gopherbot has previously
removed the "NeedsDecision" label from the target issue.

Updates golang/go#31788
Updates golang/go#21312

Change-Id: Iaf4dd69a5bfd637694995ee60869f94362110a7d
Reviewed-on: https://go-review.googlesource.com/c/build/+/183624
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-06-24 18:26:30 +00:00
Tai 1b388d270f cmd/gopherbot: remove NeedsDecision label on proposals
Fixes golang/go#31788

Change-Id: I775f706a154f3584c24b1bd2f4925cbc293f8740
Reviewed-on: https://go-review.googlesource.com/c/build/+/180925
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-06-24 15:15:09 +00:00
Brad Fitzpatrick f7a4c98e3f cmd/gopherbot: add manual mode to dump who needs access
Updates golang/go#19572

Change-Id: Ied3fc5f9e4c72eec5a65151f4d44f57119109367
Reviewed-on: https://go-review.googlesource.com/c/build/+/178702
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-05-30 15:43:32 +00:00
Brad Fitzpatrick e06994ed08 cmd/gopherbot: stop using gitlock, use go modules
Updates golang/go#26872

Change-Id: If64b03c03f29ccff2ffcf255d94a2c736806af89
Reviewed-on: https://go-review.googlesource.com/c/build/+/176602
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-05-10 23:24:55 +00:00
Rebecca Stambler 070eb7bb41 cmd/gopherbot: label gopls issues automatically
This change configures gopherbot to automatically label issues with
"gopls" or "lsp" in the title as "gopls".

Change-Id: I1b6639558551a29f22375732592cb13819748115
Reviewed-on: https://go-review.googlesource.com/c/build/+/172097
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-04-16 17:01:35 +00:00
Dmitri Shuralyov f7b27185a0 cmd/gopherbot: support closing major release cherry-pick issues
The "close cherry pick issues" task has been working to close
cherry-pick issues when CLs are merged to release branches,
but only for issues with milestones like like 1.12.1, 1.12.2,
1.12.3, etc., not ones like 1.12. This change fixes that.

Output from a -dry-run run after this change:

	$ go run . -dry-run -only-run="close cherry pick issues"
	close-cherry-pick [dry-run]
		https://golang.org/issue/30314  x/tools/cmd/godoc: url flag's response recorder ignores body [1.12 backport]
	2019/02/21 14:00:43 [dry-run] would add comment to github.com/golang/go/issues/30314: Closed by merging 49d818b07734fb3230f2d00bc5d4453348348d24 to release-branch.go1.12.
	2019/02/21 14:00:43 [dry-run] would close golang.org/issue/30314
	2019/02/21 14:00:43 gopherbot ran in 217.391921ms

Fixes golang/go#30342

Change-Id: I93528e6cf724aba1894a7c640fbb75ec42bb2006
Reviewed-on: https://go-review.googlesource.com/c/163205
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-03-01 20:19:19 +00:00
Dmitri Shuralyov 44b79b8774 cmd/gopherbot: use time.Since, not pass nil Context, not capitalize errors
Also remove unused context.Context parameter from the
getMinorMilestoneForMajor method. It's only doing some
lightweight iteration and string to number conversion.

Found with staticcheck, unused tools.

Change-Id: If4f0a905fbd66d80d1fb07f4bd1127fab4483bf0
Reviewed-on: https://go-review.googlesource.com/c/164158
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-02-28 01:01:58 +00:00