You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmd/gopherbot: replace maintner with GitHub API v4 in ping-early-issues
Do this here first to make the diff easier to see.
The next CL in stack moves it to relui.
Notably the GraphQL implementation here is missing the "avoid duplicate
comments" safety net implemented in maintner-powered addGitHubComment.
With maintner, it costs no API calls to check all comments in a GitHub
issue for a past comment. When using the GitHub API, this unfortunately
costs more API quota and needs to be implemented explicitly, adding to
the verbosity of the implementation.
For golang/go#58856.
Change-Id: I2757697e561cb00d041f65ba846d902c0de35e22
Reviewed-on: https://go-review.googlesource.com/c/build/+/473159
Reviewed-by: Heschi Kreinick <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Auto-Submit: Dmitri Shuralyov <[email protected]>
Run-TryBot: Dmitri Shuralyov <[email protected]>
Copy file name to clipboardExpand all lines: cmd/gopherbot/gopherbot.go
+94-21Lines changed: 94 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,7 @@ import (
30
30
31
31
"cloud.google.com/go/compute/metadata"
32
32
"github.com/google/go-github/v48/github"
33
+
"github.com/shurcooL/githubv4"
33
34
"go4.org/strutil"
34
35
"golang.org/x/build/devapp/owners"
35
36
"golang.org/x/build/gerrit"
@@ -47,7 +48,7 @@ import (
47
48
var (
48
49
dryRun=flag.Bool("dry-run", false, "just report what would've been done, without changing anything")
49
50
daemon=flag.Bool("daemon", false, "run in daemon mode")
50
-
githubTokenFile=flag.String("github-token-file", filepath.Join(os.Getenv("HOME"), "keys", "github-gobot"), `File to load Github token from. File should be of form <username>:<token>`)
51
+
githubTokenFile=flag.String("github-token-file", filepath.Join(os.Getenv("HOME"), "keys", "github-gobot"), `File to load GitHub token from. File should be of form <username>:<token>`)
51
52
// go here: https://go-review.googlesource.com/settings#HTTPCredentials
52
53
// click "Obtain Password"
53
54
// The next page will have a .gitcookies file - look for the part that has
0 commit comments