From 9b94746da29b754c913ad568b1f9eaedb3b26530 Mon Sep 17 00:00:00 2001 From: Greg Holmes Date: Sat, 19 Sep 2020 20:36:59 +0100 Subject: [PATCH] Initial commit --- .gitignore | 12 + .pre-commit-config.yaml | 17 + Dockerfile | 29 + LICENSE | 21 + README.md | 36 ++ cmd/github/github.go | 81 +++ cmd/github/issueComment.go | 26 + cmd/github/issueComment_test.go | 48 ++ cmd/github/issues.go | 37 ++ cmd/github/issues_test.go | 79 +++ cmd/github/main.go | 137 +++++ cmd/github/main_test.go | 86 +++ cmd/github/pr.go | 52 ++ cmd/github/push.go | 93 ++++ cmd/github/push_test.go | 111 ++++ cmd/github/testdata/create_tag_1.json | 127 +++++ .../testdata/issuecomments/commented_1.json | 210 ++++++++ .../issuecomments/commented_1.json.golden | 1 + cmd/github/testdata/issues/closed_1.json | 179 ++++++ .../testdata/issues/closed_1.json.golden | 1 + cmd/github/testdata/issues/create_1.json | 179 ++++++ .../testdata/issues/create_1.json.golden | 1 + cmd/github/testdata/ping.json | 149 +++++ cmd/github/testdata/pullrequest_closed_1.json | 508 ++++++++++++++++++ cmd/github/testdata/push/basic.json | 194 +++++++ cmd/github/testdata/push/basic.json.golden | 2 + cmd/github/testdata/push/commit/basic.json | 194 +++++++ .../testdata/push/commit/basic.json.golden | 2 + .../testdata/push/commit/external_merge.json | 142 +++++ .../push/commit/external_merge.json.golden | 1 + .../push/commit/multiline_commit_message.json | 224 ++++++++ .../multiline_commit_message.json.golden | 3 + cmd/github/testdata/push/delete/delete_1.json | 125 +++++ .../testdata/push/delete/delete_1.json.golden | 1 + cmd/github/testdata/push/tag.json | 168 ++++++ cmd/github/testdata/push/tag.json.golden | 1 + cmd/github/testdata/push_create_1.json | 127 +++++ cmd/github/testdata/releases_created_1.json | 164 ++++++ cmd/github/testdata/releases_published_1.json | 164 ++++++ cmd/github/testdata/releases_released_1.json | 164 ++++++ cmd/github/webhook.go | 136 +++++ cmd/github/webhook_test.go | 173 ++++++ go.mod | 11 + go.sum | 462 ++++++++++++++++ 44 files changed, 4678 insertions(+) create mode 100644 .gitignore create mode 100644 .pre-commit-config.yaml create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100644 README.md create mode 100644 cmd/github/github.go create mode 100644 cmd/github/issueComment.go create mode 100644 cmd/github/issueComment_test.go create mode 100644 cmd/github/issues.go create mode 100644 cmd/github/issues_test.go create mode 100644 cmd/github/main.go create mode 100644 cmd/github/main_test.go create mode 100644 cmd/github/pr.go create mode 100644 cmd/github/push.go create mode 100644 cmd/github/push_test.go create mode 100644 cmd/github/testdata/create_tag_1.json create mode 100644 cmd/github/testdata/issuecomments/commented_1.json create mode 100644 cmd/github/testdata/issuecomments/commented_1.json.golden create mode 100644 cmd/github/testdata/issues/closed_1.json create mode 100644 cmd/github/testdata/issues/closed_1.json.golden create mode 100644 cmd/github/testdata/issues/create_1.json create mode 100644 cmd/github/testdata/issues/create_1.json.golden create mode 100644 cmd/github/testdata/ping.json create mode 100644 cmd/github/testdata/pullrequest_closed_1.json create mode 100644 cmd/github/testdata/push/basic.json create mode 100644 cmd/github/testdata/push/basic.json.golden create mode 100644 cmd/github/testdata/push/commit/basic.json create mode 100644 cmd/github/testdata/push/commit/basic.json.golden create mode 100644 cmd/github/testdata/push/commit/external_merge.json create mode 100644 cmd/github/testdata/push/commit/external_merge.json.golden create mode 100644 cmd/github/testdata/push/commit/multiline_commit_message.json create mode 100644 cmd/github/testdata/push/commit/multiline_commit_message.json.golden create mode 100644 cmd/github/testdata/push/delete/delete_1.json create mode 100644 cmd/github/testdata/push/delete/delete_1.json.golden create mode 100644 cmd/github/testdata/push/tag.json create mode 100644 cmd/github/testdata/push/tag.json.golden create mode 100644 cmd/github/testdata/push_create_1.json create mode 100644 cmd/github/testdata/releases_created_1.json create mode 100644 cmd/github/testdata/releases_published_1.json create mode 100644 cmd/github/testdata/releases_released_1.json create mode 100644 cmd/github/webhook.go create mode 100644 cmd/github/webhook_test.go create mode 100644 go.mod create mode 100644 go.sum diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b62b996 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +*.exe +*.exe~ +*.dll +*.so +*.dylib +*.test +*.out +.idea +*.iml +data +config.yaml +.cache \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..1168b09 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,17 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.5.0 + hooks: + - id: check-merge-conflict + - id: end-of-file-fixer + - id: trailing-whitespace + - repo: https://github.com/Lucas-C/pre-commit-hooks + rev: v1.1.7 + hooks: + - id: remove-crlf + - repo: https://github.com/dnephin/pre-commit-golang + rev: 0a943e8cbbdfd4a4b33f15e77c542715b4964f65 + hooks: + - id: go-fmt + - id: go-build + - id: go-imports diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f2bab81 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +FROM golang:latest as builder + +ENV USER=appuser +ENV UID=10001 + +RUN adduser \ + --disabled-password \ + --gecos "" \ + --home "/nonexistent" \ + --shell "/sbin/nologin" \ + --no-create-home \ + --uid "${UID}" \ + "${USER}" + +WORKDIR /app +COPY . /app +RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -trimpath -ldflags=-buildid= -o main github.com/greboid/irc/cmd/github + +FROM scratch + +COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ +COPY --from=builder /etc/passwd /etc/passwd +COPY --from=builder /etc/group /etc/group +COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo + +COPY --from=builder /app/main /irc-github +EXPOSE 8080 +USER appuser:appuser +CMD ["/irc-github"] \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f685fc5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Greg Holmes + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..2b97afb --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +## Github IRC notifier plugin + +Plugin for [IRC-Bot](https://github.com/greboid/irc-bot) + +Receives notifications from a [Github](https://github.com/) instance and outputs them to a channel. + + - go build go build github.com/greboid/irc-github/v2/cmd/github + - docker run greboid/irc-github + +#### Configuration + +At a bare minimum you also need to give it a channel, a github secret to verify received notifications + on and an RPC token. You'll like also want to specify the bot host. + +Optionally you can hide any notifications about private channels, or send them to a different channel. + +Once configured the URL to configure in github would be /github + +#### Example running + +``` +--- +version: "3.5" +service: + goplum: + image: greboid/irc-github + environment: + RPC_HOST: bot + RPC_TOKEN: + CHANNEL: #spam + GITHUB_SECRET: cUCrb7HJ +``` + +``` +github -rpc-host bot -rpc-token -channel #spam -github-secret cUCrb7HJ +``` diff --git a/cmd/github/github.go b/cmd/github/github.go new file mode 100644 index 0000000..3e5db53 --- /dev/null +++ b/cmd/github/github.go @@ -0,0 +1,81 @@ +package main + +//ping events +type pinghook struct { +} + +//Push events +type pushhook struct { + Refspec string `json:"ref"` + Repository Repository `json:"repository"` + Pusher Pusher `json:"pusher"` + Sender Sender `json:"sender"` + Forced bool `json:"forced"` + Deleted bool `json:"deleted"` + Created bool `json:"created"` + CompareLink string `json:"compare"` + Commits []Commit `json:"commits"` + Baserefspec string `json:"base_ref"` +} + +type Repository struct { + FullName string `json:"full_name"` + IsPrivate bool `json:"private"` +} + +type Pusher struct { + Name string `json:"name"` +} + +type Commit struct { + ID string `json:"id"` + Message string `json:"message"` + URL string `json:"url"` + Author Author `json:"author"` + Committer Author `json:"committer"` +} + +type Author struct { + User string `json:"username"` +} + +type Sender struct { + Login string `json:"login"` +} + +//Pull Request events +type prhook struct { + Action string `json:"action"` + PullRequest PullRequest `json:"pull_request"` + Repository Repository `json:"repository"` +} + +type PullRequest struct { + HtmlURL string `json:"html_url"` + Url string `json:"url"` + State string `json:"state"` + Title string `json:"title"` + Body string `json:"body"` + User User `json:"user"` + Merged string `json:"merged_at"` + MergedBy User `json:"merged_by"` +} + +type User struct { + Login string `json:"login"` +} + +//Issue events +type issuehook struct { + Action string `json:"action"` + Issue Issue `json:"issue"` + Repository Repository `json:"repository"` + User User `json:"sender"` +} + +type Issue struct { + HtmlURL string `json:"html_url"` + Title string `json:"title"` + State string `json:"state"` + User User `json:"user"` +} diff --git a/cmd/github/issueComment.go b/cmd/github/issueComment.go new file mode 100644 index 0000000..c8e523f --- /dev/null +++ b/cmd/github/issueComment.go @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" +) + +type githubIssueCommenthandler struct{} + +func (g *githubIssueCommenthandler) handleIssueCommentEvent(data issuehook) (messages []string) { + switch data.Action { + case "created": + return g.handleIssueCommentCreated(data) + } + return []string{} +} + +func (g *githubIssueCommenthandler) handleIssueCommentCreated(data issuehook) (messages []string) { + messages = append(messages, fmt.Sprintf( + "[%s] %s commented on issue %s - %s", + data.Repository.FullName, + data.User.Login, + data.Issue.Title, + data.Issue.HtmlURL, + )) + return +} diff --git a/cmd/github/issueComment_test.go b/cmd/github/issueComment_test.go new file mode 100644 index 0000000..9e65824 --- /dev/null +++ b/cmd/github/issueComment_test.go @@ -0,0 +1,48 @@ +package main + +import ( + "github.com/sebdah/goldie/v2" + "strings" + "testing" +) + +func Test_githubissuehandler_handIssueCommentEvent_comment(t *testing.T) { + g := &githubIssueCommenthandler{} + hook := issuehook{} + err := getTestData("issuecomments/commented_1.json", &hook) + if err != nil { + t.Fatal("Unable to parse example data") + } + messages := g.handleIssueCommentEvent(hook) + if len(messages) == 0 { + t.Fatal("Output expected, none provided") + } +} + +func Test_githubissuehandler_handIssueCommentEvent_unknown(t *testing.T) { + g := &githubIssueCommenthandler{} + hook := issuehook{} + hook.Action = "ThisWillError" + messages := g.handleIssueCommentEvent(hook) + if len(messages) != 0 { + t.Fatal("Output provided, none expected") + } +} + +func Test_githubissuehandler_handleIssueCommentCreated(t *testing.T) { + tests := []string{"issuecomments/commented_1.json"} + gold := goldie.New(t) + for index := range tests { + t.Run(tests[index], func(t *testing.T) { + g := &githubIssueCommenthandler{} + hook := issuehook{} + err := getTestData(tests[index], &hook) + if err != nil { + t.Fatal("Unable to parse example data") + } + got := []byte(strings.Join(g.handleIssueCommentCreated(hook), "\n")) + gold.Assert(t, tests[index], got) + }) + + } +} diff --git a/cmd/github/issues.go b/cmd/github/issues.go new file mode 100644 index 0000000..27bf950 --- /dev/null +++ b/cmd/github/issues.go @@ -0,0 +1,37 @@ +package main + +import "fmt" + +type githubissuehandler struct{} + +func (g *githubissuehandler) handleIssueEvent(data issuehook) (messages []string) { + switch data.Action { + case "opened": + return g.handleIssueOpened(data) + case "closed": + return g.handleIssueClosed(data) + } + return []string{} +} + +func (g *githubissuehandler) handleIssueOpened(data issuehook) (messages []string) { + messages = append(messages, fmt.Sprintf( + "[%s] %s create issue: %s - %s", + data.Repository.FullName, + data.User.Login, + data.Issue.Title, + data.Issue.HtmlURL, + )) + return +} + +func (g *githubissuehandler) handleIssueClosed(data issuehook) (messages []string) { + messages = append(messages, fmt.Sprintf( + "[%s] %s closed issue %s - %s", + data.Repository.FullName, + data.User.Login, + data.Issue.Title, + data.Issue.HtmlURL, + )) + return +} diff --git a/cmd/github/issues_test.go b/cmd/github/issues_test.go new file mode 100644 index 0000000..c4d32af --- /dev/null +++ b/cmd/github/issues_test.go @@ -0,0 +1,79 @@ +package main + +import ( + "github.com/sebdah/goldie/v2" + "strings" + "testing" +) + +func Test_githubissuehandler_handIssueEvent_open(t *testing.T) { + g := &githubissuehandler{} + hook := issuehook{} + err := getTestData("issues/create_1.json", &hook) + if err != nil { + t.Fatal("Unable to parse example data") + } + messages := g.handleIssueEvent(hook) + if len(messages) == 0 { + t.Fatal("Output expected, none provided") + } +} + +func Test_githubissuehandler_handIssueEvent_closed(t *testing.T) { + g := &githubissuehandler{} + hook := issuehook{} + err := getTestData("issues/closed_1.json", &hook) + if err != nil { + t.Fatal("Unable to parse example data") + } + messages := g.handleIssueEvent(hook) + if len(messages) == 0 { + t.Fatal("Output expected, none provided") + } +} + +func Test_githubissuehandler_handIssueEvent_unknown(t *testing.T) { + g := &githubissuehandler{} + hook := issuehook{} + hook.Action = "ThisWillError" + messages := g.handleIssueEvent(hook) + if len(messages) != 0 { + t.Fatal("Output provided, none expected") + } +} + +func Test_githubissuehandler_handleIssueOpened(t *testing.T) { + tests := []string{"issues/create_1.json"} + gold := goldie.New(t) + for index := range tests { + t.Run(tests[index], func(t *testing.T) { + g := &githubissuehandler{} + hook := issuehook{} + err := getTestData(tests[index], &hook) + if err != nil { + t.Fatal("Unable to parse example data") + } + got := []byte(strings.Join(g.handleIssueOpened(hook), "\n")) + gold.Assert(t, tests[index], got) + }) + + } +} + +func Test_githubissuehandler_handleIssueClosed(t *testing.T) { + tests := []string{"issues/closed_1.json"} + gold := goldie.New(t) + for index := range tests { + t.Run(tests[index], func(t *testing.T) { + g := &githubissuehandler{} + hook := issuehook{} + err := getTestData(tests[index], &hook) + if err != nil { + t.Fatal("Unable to parse example data") + } + got := []byte(strings.Join(g.handleIssueClosed(hook), "\n")) + gold.Assert(t, tests[index], got) + }) + + } +} diff --git a/cmd/github/main.go b/cmd/github/main.go new file mode 100644 index 0000000..4fead5d --- /dev/null +++ b/cmd/github/main.go @@ -0,0 +1,137 @@ +package main + +import ( + "context" + "crypto/hmac" + "crypto/sha1" + "crypto/subtle" + "crypto/tls" + "encoding/hex" + "flag" + "fmt" + "github.com/greboid/irc/v2/logger" + "github.com/greboid/irc/v2/rpc" + "github.com/kouhin/envflag" + "go.uber.org/zap" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials" + "io" + "net/http" + "strings" +) + +var ( + RPCHost = flag.String("rpc-host", "localhost", "gRPC server to connect to") + RPCPort = flag.Int("rpc-port", 8001, "gRPC server port") + RPCToken = flag.String("rpc-token", "", "gRPC authentication token") + Channel = flag.String("channel", "", "Channel to send messages to") + PrivateChannel = flag.String("private-channel", "", "Channel to send messages to") + HidePrivate = flag.Bool("hide-private", false, "Hide notifications about private repos") + GithubSecret = flag.String("github-secret", "", "Github secret for validating webhooks") + Debug = flag.Bool("debug", false, "Show debugging info") +) + +type github struct { + client rpc.IRCPluginClient + log *zap.SugaredLogger +} + +func main() { + log := logger.CreateLogger(*Debug) + if err := envflag.Parse(); err != nil { + log.Fatalf("Unable to load config: %s", err.Error()) + } + github := github{ + log: log, + } + log.Infof("Creating Github RPC Client") + client, err := github.doRPC() + if err != nil { + log.Fatalf("Unable to create RPC Client: %s", err.Error()) + } + github.client = client + log.Infof("Starting github web server") + err = github.doWeb() + if err != nil { + log.Panicf("Error handling web: %s", err.Error()) + } + log.Infof("exiting") +} + +func (g *github) doRPC() (rpc.IRCPluginClient, error) { + creds := credentials.NewTLS(&tls.Config{InsecureSkipVerify: true}) + conn, err := grpc.Dial(fmt.Sprintf("%s:%d", *RPCHost, *RPCPort), grpc.WithTransportCredentials(creds)) + client := rpc.NewIRCPluginClient(conn) + _, err = client.Ping(rpc.CtxWithToken(context.Background(), "bearer", *RPCToken), &rpc.Empty{}) + if err != nil { + return nil, err + } + return client, nil +} + +func (g *github) doWeb() error { + creds := credentials.NewTLS(&tls.Config{InsecureSkipVerify: true}) + conn, err := grpc.Dial(fmt.Sprintf("%s:%d", *RPCHost, *RPCPort), grpc.WithTransportCredentials(creds)) + if err != nil { + return err + } + client := rpc.NewHTTPPluginClient(conn) + stream, err := client.GetRequest(rpc.CtxWithTokenAndPath(context.Background(), "bearer", *RPCToken, "github")) + for { + request, err := stream.Recv() + if err == io.EOF { + return nil + } + if err != nil { + return nil + } + response := g.handleGithub(request) + err = stream.Send(response) + if err != nil { + return err + } + } +} + +func (g *github) handleGithub(request *rpc.HttpRequest) *rpc.HttpResponse { + headers := rpc.ConvertFromRPCHeaders(request.Header) + eventType := headers.Get("X-GitHub-Event") + header := strings.SplitN(headers.Get("X-Hub-Signature"), "=", 2) + if header[0] != "sha1" { + g.log.Debugf("Error: %s", "Bad header") + return &rpc.HttpResponse{ + Header: nil, + Body: []byte("Bad headers"), + Status: http.StatusInternalServerError, + } + } + if !CheckGithubSecret(request.Body, header[1], *GithubSecret) { + g.log.Debugf("Error: %s", "Bad hash") + return &rpc.HttpResponse{ + Header: nil, + Body: []byte("Bad hash"), + Status: http.StatusBadRequest, + } + } + go func() { + webhookHandler := githubWebhookHandler{ + client: g.client, + } + err := webhookHandler.handleWebhook(eventType, request.Body) + if err != nil { + g.log.Errorf("Unable to handle webhook: %s", err.Error()) + } + }() + return &rpc.HttpResponse{ + Header: nil, + Body: []byte("Delivered"), + Status: http.StatusOK, + } +} + +func CheckGithubSecret(bodyBytes []byte, headerSecret string, githubSecret string) bool { + h := hmac.New(sha1.New, []byte(githubSecret)) + h.Write(bodyBytes) + expected := fmt.Sprintf("%s", hex.EncodeToString(h.Sum(nil))) + return len(expected) == len(headerSecret) && subtle.ConstantTimeCompare([]byte(expected), []byte(headerSecret)) == 1 +} diff --git a/cmd/github/main_test.go b/cmd/github/main_test.go new file mode 100644 index 0000000..30b6eb6 --- /dev/null +++ b/cmd/github/main_test.go @@ -0,0 +1,86 @@ +package main + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "github.com/greboid/irc/v2/rpc" + "google.golang.org/grpc" + "io/ioutil" +) + +type mockFailingIRCPluginClient struct { + err bool +} + +func (m *mockFailingIRCPluginClient) SendChannelMessage(context.Context, *rpc.ChannelMessage, ...grpc.CallOption) (*rpc.Error, error) { + if m.err { + return &rpc.Error{Message: "Fake error"}, errors.New("fake error") + } else { + return nil, nil + } +} + +func (m *mockFailingIRCPluginClient) SendRawMessage(context.Context, *rpc.RawMessage, ...grpc.CallOption) (*rpc.Error, error) { + if m.err { + return &rpc.Error{Message: "Fake error"}, errors.New("fake error") + } else { + return nil, nil + } +} + +func (m *mockFailingIRCPluginClient) GetMessages(context.Context, *rpc.Channel, ...grpc.CallOption) (rpc.IRCPlugin_GetMessagesClient, error) { + if m.err { + return nil, errors.New("fake error") + } else { + return nil, nil + } +} + +func (m *mockFailingIRCPluginClient) Ping(context.Context, *rpc.Empty, ...grpc.CallOption) (*rpc.Empty, error) { + if m.err { + return &rpc.Empty{}, errors.New("fake error") + } else { + return nil, nil + } +} + +type mockIRCPluginClient struct { + sentRawMessages int + sentChannelMessages int + finished chan bool +} + +func (m *mockIRCPluginClient) SendChannelMessage(context.Context, *rpc.ChannelMessage, ...grpc.CallOption) (*rpc.Error, error) { + m.sentChannelMessages = m.sentChannelMessages + 1 + m.finished <- true + return nil, nil +} + +func (m *mockIRCPluginClient) SendRawMessage(context.Context, *rpc.RawMessage, ...grpc.CallOption) (*rpc.Error, error) { + m.sentRawMessages = m.sentRawMessages + 1 + m.finished <- true + return nil, nil +} + +func (m *mockIRCPluginClient) GetMessages(context.Context, *rpc.Channel, ...grpc.CallOption) (rpc.IRCPlugin_GetMessagesClient, error) { + return nil, nil +} + +func (m *mockIRCPluginClient) Ping(context.Context, *rpc.Empty, ...grpc.CallOption) (*rpc.Empty, error) { + return nil, nil +} + +func getTestData(filename string, output interface{}) error { + data, err := getTestDataBytes(filename) + if err != nil { + return err + } + err = json.Unmarshal(data, &output) + return err +} + +func getTestDataBytes(filename string) ([]byte, error) { + return ioutil.ReadFile(fmt.Sprintf("./testdata/%s", filename)) +} diff --git a/cmd/github/pr.go b/cmd/github/pr.go new file mode 100644 index 0000000..c316ffc --- /dev/null +++ b/cmd/github/pr.go @@ -0,0 +1,52 @@ +package main + +import "fmt" + +type githubPRHandler struct{} + +func (g *githubPRHandler) handlePREvent(data prhook) (messages []string) { + if data.Action == "opened" { + return g.handlePROpen(data) + } else if data.Action == "closed" { + if data.PullRequest.Merged == "" { + return g.handlePRClose(data) + } else { + return g.handlePRMerged(data) + } + } + return +} + +func (g *githubPRHandler) handlePRClose(data prhook) (messages []string) { + messages = append(messages, fmt.Sprintf( + "[%s] %s closed PR: %s - %s", + data.Repository.FullName, + data.PullRequest.User.Login, + data.PullRequest.Title, + data.PullRequest.HtmlURL, + )) + return +} + +func (g *githubPRHandler) handlePRMerged(data prhook) (messages []string) { + messages = append(messages, fmt.Sprintf( + "[%s] %s merged PR from %s: %s - %s", + data.Repository.FullName, + data.PullRequest.MergedBy.Login, + data.PullRequest.User.Login, + data.PullRequest.Title, + data.PullRequest.HtmlURL, + )) + return +} + +func (g *githubPRHandler) handlePROpen(data prhook) (messages []string) { + messages = append(messages, fmt.Sprintf( + "[%s] %s submitted PR: %s - %s", + data.Repository.FullName, + data.PullRequest.User.Login, + data.PullRequest.Title, + data.PullRequest.HtmlURL, + )) + return +} diff --git a/cmd/github/push.go b/cmd/github/push.go new file mode 100644 index 0000000..f92ce4f --- /dev/null +++ b/cmd/github/push.go @@ -0,0 +1,93 @@ +package main + +import ( + "fmt" + "strings" +) + +type githubPushHandler struct{} + +func (g *githubPushHandler) tidyPushRefspecs(data *pushhook) { + data.Refspec = g.tidyRefsHeads(data.Refspec) + data.Refspec = g.tidyRefsTags(data.Refspec) + data.Baserefspec = g.tidyRefsHeads(data.Baserefspec) + data.Baserefspec = g.tidyRefsTags(data.Baserefspec) +} + +func (g *githubPushHandler) tidyRefsHeads(input string) string { + if strings.HasPrefix(input, "refs/heads/") { + return fmt.Sprintf("branch %s", strings.TrimPrefix(input, "refs/heads/")) + } + return input +} + +func (g *githubPushHandler) tidyRefsTags(input string) string { + if strings.HasPrefix(input, "refs/tags/") { + return fmt.Sprintf("tag %s", strings.TrimPrefix(input, "refs/tags/")) + } + return input +} + +func (g *githubPushHandler) handlePushEvent(data pushhook) (messages []string) { + g.tidyPushRefspecs(&data) + if data.Created { + return g.handleCreate(data) + } else if data.Deleted { + return g.handleDelete(data) + } else { + return g.handleCommit(data) + } +} + +func (g *githubPushHandler) handleDelete(data pushhook) (messages []string) { + messages = append(messages, fmt.Sprintf( + "[%s] %s deleted %s", + data.Repository.FullName, + data.Sender.Login, + data.Refspec, + )) + return +} + +func (g *githubPushHandler) handleCreate(data pushhook) (messages []string) { + if data.Baserefspec == "" { + messages = append(messages, fmt.Sprintf( + "[%s] %s created %s - %s", + data.Repository.FullName, + data.Pusher.Name, + data.Refspec, + data.CompareLink, + )) + } else { + messages = append(messages, fmt.Sprintf( + "[%s] %s created %s from %s - %s", + data.Repository.FullName, + data.Pusher.Name, + data.Refspec, + data.Baserefspec, + data.CompareLink, + )) + } + return +} + +func (g *githubPushHandler) handleCommit(data pushhook) (messages []string) { + messages = append(messages, fmt.Sprintf( + "[%s] %s pushed %d commits to %s - %s", + data.Repository.FullName, + data.Pusher.Name, + len(data.Commits), + data.Refspec, + data.CompareLink, + )) + for _, commit := range data.Commits { + messages = append(messages, fmt.Sprintf( + "[%s] %s committed %s - %s", + data.Repository.FullName, + commit.Author.User, + commit.ID[len(commit.ID)-6:], + strings.SplitN(commit.Message, "\n", 2)[0], + )) + } + return +} diff --git a/cmd/github/push_test.go b/cmd/github/push_test.go new file mode 100644 index 0000000..21c4bd8 --- /dev/null +++ b/cmd/github/push_test.go @@ -0,0 +1,111 @@ +package main + +import ( + "github.com/greboid/irc/v2/rpc" + "github.com/sebdah/goldie/v2" + "reflect" + "strings" + "testing" +) + +func Test_github_tidyPushRefspecs(t *testing.T) { + type fields struct { + client rpc.IRCPluginClient + } + tests := []struct { + name string + fields fields + args *pushhook + want *pushhook + }{ + { + name: "refspec: master branch", + fields: fields{}, + args: &pushhook{Refspec: "refs/heads/master"}, + want: &pushhook{Refspec: "branch master"}, + }, + { + name: "refspec: tag v1", + fields: fields{}, + args: &pushhook{Refspec: "refs/tags/v1.0.0"}, + want: &pushhook{Refspec: "tag v1.0.0"}, + }, + { + name: "baserefspec: master branch", + fields: fields{}, + args: &pushhook{Baserefspec: "refs/heads/master"}, + want: &pushhook{Baserefspec: "branch master"}, + }, + { + name: "baserefspec: tag v1", + fields: fields{}, + args: &pushhook{Baserefspec: "refs/tags/v1.0.0"}, + want: &pushhook{Baserefspec: "tag v1.0.0"}, + }, + { + name: "refspec: non master", + fields: fields{}, + args: &pushhook{Baserefspec: "refs/heads/testing"}, + want: &pushhook{Baserefspec: "branch testing"}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + g := &githubPushHandler{} + if g.tidyPushRefspecs(tt.args); !reflect.DeepEqual(tt.args.Refspec, tt.want.Refspec) { + t.Errorf("%v != %v", tt.args.Refspec, tt.want.Refspec) + } + }) + } +} + +func Test_github_handlePushEvent(t *testing.T) { + tests := []string{"push/basic.json", "push/tag.json"} + gold := goldie.New(t) + for index := range tests { + t.Run(tests[index], func(t *testing.T) { + g := &githubPushHandler{} + hook := pushhook{} + err := getTestData(tests[index], &hook) + if err != nil { + t.Fatal("Unable to parse example data") + } + got := []byte(strings.Join(g.handlePushEvent(hook), "\n")) + gold.Assert(t, tests[index], got) + }) + } +} + +func Test_github_handleCommit(t *testing.T) { + tests := []string{"push/commit/basic.json", "push/commit/multiline_commit_message.json", "push/commit/external_merge.json"} + gold := goldie.New(t) + for index := range tests { + t.Run(tests[index], func(t *testing.T) { + g := &githubPushHandler{} + hook := pushhook{} + err := getTestData(tests[index], &hook) + if err != nil { + t.Fatal("Unable to parse example data") + } + got := []byte(strings.Join(g.handleCommit(hook), "\n")) + gold.Assert(t, tests[index], got) + }) + } +} + +func Test_githubPushHandler_handleDelete(t *testing.T) { + tests := []string{"push/delete/delete_1.json"} + gold := goldie.New(t) + for index := range tests { + t.Run(tests[index], func(t *testing.T) { + g := &githubPushHandler{} + hook := pushhook{} + err := getTestData(tests[index], &hook) + if err != nil { + t.Fatal("Unable to parse example data") + } + got := []byte(strings.Join(g.handleDelete(hook), "\n")) + gold.Assert(t, tests[index], got) + }) + } +} diff --git a/cmd/github/testdata/create_tag_1.json b/cmd/github/testdata/create_tag_1.json new file mode 100644 index 0000000..a161229 --- /dev/null +++ b/cmd/github/testdata/create_tag_1.json @@ -0,0 +1,127 @@ +{ + "ref": "v1.2.0", + "ref_type": "tag", + "master_branch": "master", + "description": "Plugin based IRC library for Go", + "pusher_type": "user", + "repository": { + "id": 243344149, + "node_id": "MDEwOlJlcG9zaXRvcnkyNDMzNDQxNDk=", + "name": "irc", + "full_name": "greboid/irc", + "private": false, + "owner": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/irc", + "description": "Plugin based IRC library for Go", + "fork": false, + "url": "https://api.github.com/repos/greboid/irc", + "forks_url": "https://api.github.com/repos/greboid/irc/forks", + "keys_url": "https://api.github.com/repos/greboid/irc/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/irc/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/irc/teams", + "hooks_url": "https://api.github.com/repos/greboid/irc/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/irc/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/irc/events", + "assignees_url": "https://api.github.com/repos/greboid/irc/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/irc/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/irc/tags", + "blobs_url": "https://api.github.com/repos/greboid/irc/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/irc/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/irc/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/irc/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/irc/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/irc/languages", + "stargazers_url": "https://api.github.com/repos/greboid/irc/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/irc/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/irc/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/irc/subscription", + "commits_url": "https://api.github.com/repos/greboid/irc/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/irc/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/irc/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/irc/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/irc/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/irc/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/irc/merges", + "archive_url": "https://api.github.com/repos/greboid/irc/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/irc/downloads", + "issues_url": "https://api.github.com/repos/greboid/irc/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/irc/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/irc/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/irc/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/irc/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/irc/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/irc/deployments", + "created_at": "2020-02-26T19:09:37Z", + "updated_at": "2020-03-21T16:46:59Z", + "pushed_at": "2020-03-21T16:54:11Z", + "git_url": "git://github.com/greboid/irc.git", + "ssh_url": "git@github.com:greboid/irc.git", + "clone_url": "https://github.com/greboid/irc.git", + "svn_url": "https://github.com/greboid/irc", + "homepage": "", + "size": 184, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Go", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "sender": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + } +} \ No newline at end of file diff --git a/cmd/github/testdata/issuecomments/commented_1.json b/cmd/github/testdata/issuecomments/commented_1.json new file mode 100644 index 0000000..7684860 --- /dev/null +++ b/cmd/github/testdata/issuecomments/commented_1.json @@ -0,0 +1,210 @@ +{ + "action": "created", + "issue": { + "url": "https://api.github.com/repos/greboid/irc/issues/6", + "repository_url": "https://api.github.com/repos/greboid/irc", + "labels_url": "https://api.github.com/repos/greboid/irc/issues/6/labels{/name}", + "comments_url": "https://api.github.com/repos/greboid/irc/issues/6/comments", + "events_url": "https://api.github.com/repos/greboid/irc/issues/6/events", + "html_url": "https://github.com/greboid/irc/issues/6", + "id": 584325795, + "node_id": "MDU6SXNzdWU1ODQzMjU3OTU=", + "number": 6, + "title": "GitHub: Handle pull requests", + "user": { + "login": "csmith", + "id": 189133, + "node_id": "MDQ6VXNlcjE4OTEzMw==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189133?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/csmith", + "html_url": "https://github.com/csmith", + "followers_url": "https://api.github.com/users/csmith/followers", + "following_url": "https://api.github.com/users/csmith/following{/other_user}", + "gists_url": "https://api.github.com/users/csmith/gists{/gist_id}", + "starred_url": "https://api.github.com/users/csmith/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/csmith/subscriptions", + "organizations_url": "https://api.github.com/users/csmith/orgs", + "repos_url": "https://api.github.com/users/csmith/repos", + "events_url": "https://api.github.com/users/csmith/events{/privacy}", + "received_events_url": "https://api.github.com/users/csmith/received_events", + "type": "User", + "site_admin": false + }, + "labels": [ + { + "id": 1873189850, + "node_id": "MDU6TGFiZWwxODczMTg5ODUw", + "url": "https://api.github.com/repos/greboid/irc/labels/enhancement", + "name": "enhancement", + "color": "a2eeef", + "default": true, + "description": "New feature or request" + } + ], + "state": "closed", + "locked": false, + "assignee": null, + "assignees": [ + + ], + "milestone": null, + "comments": 1, + "created_at": "2020-03-19T10:54:22Z", + "updated_at": "2020-03-19T20:51:24Z", + "closed_at": "2020-03-19T20:51:24Z", + "author_association": "CONTRIBUTOR", + "body": "The GitHub plugin doesn't currently announce pull requests, it'd be nice if it did." + }, + "comment": { + "url": "https://api.github.com/repos/greboid/irc/issues/comments/601410689", + "html_url": "https://github.com/greboid/irc/issues/6#issuecomment-601410689", + "issue_url": "https://api.github.com/repos/greboid/irc/issues/6", + "id": 601410689, + "node_id": "MDEyOklzc3VlQ29tbWVudDYwMTQxMDY4OQ==", + "user": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2020-03-19T20:51:24Z", + "updated_at": "2020-03-19T20:51:24Z", + "author_association": "OWNER", + "body": "I believe this should now be resolved." + }, + "repository": { + "id": 243344149, + "node_id": "MDEwOlJlcG9zaXRvcnkyNDMzNDQxNDk=", + "name": "irc", + "full_name": "greboid/irc", + "private": false, + "owner": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/irc", + "description": "Plugin based IRC library for Go", + "fork": false, + "url": "https://api.github.com/repos/greboid/irc", + "forks_url": "https://api.github.com/repos/greboid/irc/forks", + "keys_url": "https://api.github.com/repos/greboid/irc/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/irc/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/irc/teams", + "hooks_url": "https://api.github.com/repos/greboid/irc/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/irc/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/irc/events", + "assignees_url": "https://api.github.com/repos/greboid/irc/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/irc/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/irc/tags", + "blobs_url": "https://api.github.com/repos/greboid/irc/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/irc/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/irc/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/irc/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/irc/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/irc/languages", + "stargazers_url": "https://api.github.com/repos/greboid/irc/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/irc/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/irc/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/irc/subscription", + "commits_url": "https://api.github.com/repos/greboid/irc/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/irc/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/irc/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/irc/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/irc/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/irc/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/irc/merges", + "archive_url": "https://api.github.com/repos/greboid/irc/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/irc/downloads", + "issues_url": "https://api.github.com/repos/greboid/irc/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/irc/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/irc/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/irc/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/irc/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/irc/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/irc/deployments", + "created_at": "2020-02-26T19:09:37Z", + "updated_at": "2020-03-19T20:38:32Z", + "pushed_at": "2020-03-19T20:38:30Z", + "git_url": "git://github.com/greboid/irc.git", + "ssh_url": "git@github.com:greboid/irc.git", + "clone_url": "https://github.com/greboid/irc.git", + "svn_url": "https://github.com/greboid/irc", + "homepage": "", + "size": 180, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Go", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 1, + "open_issues": 1, + "watchers": 0, + "default_branch": "master" + }, + "sender": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + } +} \ No newline at end of file diff --git a/cmd/github/testdata/issuecomments/commented_1.json.golden b/cmd/github/testdata/issuecomments/commented_1.json.golden new file mode 100644 index 0000000..a5514f7 --- /dev/null +++ b/cmd/github/testdata/issuecomments/commented_1.json.golden @@ -0,0 +1 @@ +[greboid/irc] greboid commented on issue GitHub: Handle pull requests - https://github.com/greboid/irc/issues/6 \ No newline at end of file diff --git a/cmd/github/testdata/issues/closed_1.json b/cmd/github/testdata/issues/closed_1.json new file mode 100644 index 0000000..cb3c45b --- /dev/null +++ b/cmd/github/testdata/issues/closed_1.json @@ -0,0 +1,179 @@ +{ + "action": "closed", + "issue": { + "url": "https://api.github.com/repos/greboid/irc/issues/9", + "repository_url": "https://api.github.com/repos/greboid/irc", + "labels_url": "https://api.github.com/repos/greboid/irc/issues/9/labels{/name}", + "comments_url": "https://api.github.com/repos/greboid/irc/issues/9/comments", + "events_url": "https://api.github.com/repos/greboid/irc/issues/9/events", + "html_url": "https://github.com/greboid/irc/issues/9", + "id": 590904706, + "node_id": "MDU6SXNzdWU1OTA5MDQ3MDY=", + "number": 9, + "title": "[BUG] Panic when using streaming API", + "user": { + "login": "csmith", + "id": 189133, + "node_id": "MDQ6VXNlcjE4OTEzMw==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189133?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/csmith", + "html_url": "https://github.com/csmith", + "followers_url": "https://api.github.com/users/csmith/followers", + "following_url": "https://api.github.com/users/csmith/following{/other_user}", + "gists_url": "https://api.github.com/users/csmith/gists{/gist_id}", + "starred_url": "https://api.github.com/users/csmith/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/csmith/subscriptions", + "organizations_url": "https://api.github.com/users/csmith/orgs", + "repos_url": "https://api.github.com/users/csmith/repos", + "events_url": "https://api.github.com/users/csmith/events{/privacy}", + "received_events_url": "https://api.github.com/users/csmith/received_events", + "type": "User", + "site_admin": false + }, + "labels": [ + { + "id": 1873189829, + "node_id": "MDU6TGFiZWwxODczMTg5ODI5", + "url": "https://api.github.com/repos/greboid/irc/labels/bug", + "name": "bug", + "color": "d73a4a", + "default": true, + "description": "Something isn't working" + } + ], + "state": "closed", + "locked": false, + "assignee": null, + "assignees": [ + + ], + "milestone": null, + "comments": 0, + "created_at": "2020-03-31T08:30:22Z", + "updated_at": "2020-03-31T10:23:18Z", + "closed_at": "2020-03-31T10:23:18Z", + "author_association": "CONTRIBUTOR", + "body": "**Describe the bug**\r\nSeemingly every time a plugin accesses the streaming API the bot panics\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. Run bot\r\n2. Run streaming API plugin\r\n\r\n**Expected behavior**\r\nNo panics.\r\n\r\n```\r\npanic: assignment to entry in nil map\r\n\r\ngoroutine 45 [running]:\r\ngithub.com/greboid/irc/irc.(*EventManager).SubscribeChannelPart(0xc0001653f0, 0xc0004fe500)\r\n\tgithub.com/greboid/irc/irc/messageBus.go:52 +0xbb\r\ngithub.com/greboid/irc/rpc.(*pluginServer).GetMessages(0xc0001653e0, 0xc0000e2690, 0x9e7640, 0xc000388760, 0x0, 0x0)\r\n\tgithub.com/greboid/irc/rpc/server.go:97 +0x186\r\ngithub.com/greboid/irc/rpc._IRCPlugin_GetMessages_Handler(0x8ba3c0, 0xc0001653e0, 0x9e5de0, 0xc0004fe4c0, 0x0, 0x0)\r\n\tgithub.com/greboid/irc/rpc/plugin.pb.go:435 +0x109\r\ngithub.com/grpc-ecosystem/go-grpc-middleware/auth.StreamServerInterceptor.func1(0x8ba3c0, 0xc0001653e0, 0x9e5f60, 0xc0002a00c0, 0xc0004fe460, 0x9516a0, 0xc0004fe480, 0xc0004fe460)\r\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.2.0/auth/auth.go:66 +0x148\r\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainStreamServer.func1.1.1(0x8ba3c0, 0xc0001653e0, 0x9e5f60, 0xc0002a00c0, 0xc00062bc58, 0x40c9c8)\r\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.2.0/chain.go:49 +0x5f\r\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainStreamServer.func1(0x8ba3c0, 0xc0001653e0, 0x9e5f60, 0xc0002a00c0, 0xc0004fe460, 0x9516a0, 0x9e4060, 0xc0000e2660)\r\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.2.0/chain.go:58 +0xcf\r\ngoogle.golang.org/grpc.(*Server).processStreamingRPC(0xc00007e000, 0x9e8420, 0xc000182480, 0xc00029c100, 0xc000165470, 0xd07780, 0x0, 0x0, 0x0)\r\n\tgoogle.golang.org/grpc@v1.28.0/server.go:1336 +0x511\r\ngoogle.golang.org/grpc.(*Server).handleStream(0xc00007e000, 0x9e8420, 0xc000182480, 0xc00029c100, 0x0)\r\n\tgoogle.golang.org/grpc@v1.28.0/server.go:1409 +0xc62\r\ngoogle.golang.org/grpc.(*Server).serveStreams.func1.1(0xc0004984c4, 0xc00007e000, 0x9e8420, 0xc000182480, 0xc00029c100)\r\n\tgoogle.golang.org/grpc@v1.28.0/server.go:746 +0xa1\r\ncreated by google.golang.org/grpc.(*Server).serveStreams.func1\r\n\tgoogle.golang.org/grpc@v1.28.0/server.go:744 +0xa1\r\n```" + }, + "repository": { + "id": 243344149, + "node_id": "MDEwOlJlcG9zaXRvcnkyNDMzNDQxNDk=", + "name": "irc", + "full_name": "greboid/irc", + "private": false, + "owner": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/irc", + "description": "Plugin based IRC library for Go", + "fork": false, + "url": "https://api.github.com/repos/greboid/irc", + "forks_url": "https://api.github.com/repos/greboid/irc/forks", + "keys_url": "https://api.github.com/repos/greboid/irc/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/irc/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/irc/teams", + "hooks_url": "https://api.github.com/repos/greboid/irc/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/irc/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/irc/events", + "assignees_url": "https://api.github.com/repos/greboid/irc/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/irc/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/irc/tags", + "blobs_url": "https://api.github.com/repos/greboid/irc/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/irc/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/irc/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/irc/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/irc/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/irc/languages", + "stargazers_url": "https://api.github.com/repos/greboid/irc/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/irc/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/irc/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/irc/subscription", + "commits_url": "https://api.github.com/repos/greboid/irc/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/irc/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/irc/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/irc/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/irc/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/irc/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/irc/merges", + "archive_url": "https://api.github.com/repos/greboid/irc/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/irc/downloads", + "issues_url": "https://api.github.com/repos/greboid/irc/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/irc/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/irc/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/irc/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/irc/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/irc/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/irc/deployments", + "created_at": "2020-02-26T19:09:37Z", + "updated_at": "2020-03-30T22:37:10Z", + "pushed_at": "2020-03-31T10:23:17Z", + "git_url": "git://github.com/greboid/irc.git", + "ssh_url": "git@github.com:greboid/irc.git", + "clone_url": "https://github.com/greboid/irc.git", + "svn_url": "https://github.com/greboid/irc", + "homepage": "", + "size": 228, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Go", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 1, + "open_issues": 1, + "watchers": 0, + "default_branch": "master" + }, + "sender": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + } +} \ No newline at end of file diff --git a/cmd/github/testdata/issues/closed_1.json.golden b/cmd/github/testdata/issues/closed_1.json.golden new file mode 100644 index 0000000..9d4d8a1 --- /dev/null +++ b/cmd/github/testdata/issues/closed_1.json.golden @@ -0,0 +1 @@ +[greboid/irc] greboid closed issue [BUG] Panic when using streaming API - https://github.com/greboid/irc/issues/9 \ No newline at end of file diff --git a/cmd/github/testdata/issues/create_1.json b/cmd/github/testdata/issues/create_1.json new file mode 100644 index 0000000..6c5a504 --- /dev/null +++ b/cmd/github/testdata/issues/create_1.json @@ -0,0 +1,179 @@ +{ + "action": "opened", + "issue": { + "url": "https://api.github.com/repos/greboid/irc/issues/5", + "repository_url": "https://api.github.com/repos/greboid/irc", + "labels_url": "https://api.github.com/repos/greboid/irc/issues/5/labels{/name}", + "comments_url": "https://api.github.com/repos/greboid/irc/issues/5/comments", + "events_url": "https://api.github.com/repos/greboid/irc/issues/5/events", + "html_url": "https://github.com/greboid/irc/issues/5", + "id": 584325274, + "node_id": "MDU6SXNzdWU1ODQzMjUyNzQ=", + "number": 5, + "title": "[BUG] GitHub: new branches say \"from \"", + "user": { + "login": "csmith", + "id": 189133, + "node_id": "MDQ6VXNlcjE4OTEzMw==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189133?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/csmith", + "html_url": "https://github.com/csmith", + "followers_url": "https://api.github.com/users/csmith/followers", + "following_url": "https://api.github.com/users/csmith/following{/other_user}", + "gists_url": "https://api.github.com/users/csmith/gists{/gist_id}", + "starred_url": "https://api.github.com/users/csmith/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/csmith/subscriptions", + "organizations_url": "https://api.github.com/users/csmith/orgs", + "repos_url": "https://api.github.com/users/csmith/repos", + "events_url": "https://api.github.com/users/csmith/events{/privacy}", + "received_events_url": "https://api.github.com/users/csmith/received_events", + "type": "User", + "site_admin": false + }, + "labels": [ + { + "id": 1873189829, + "node_id": "MDU6TGFiZWwxODczMTg5ODI5", + "url": "https://api.github.com/repos/greboid/irc/labels/bug", + "name": "bug", + "color": "d73a4a", + "default": true, + "description": "Something isn't working" + } + ], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [ + + ], + "milestone": null, + "comments": 0, + "created_at": "2020-03-19T10:53:27Z", + "updated_at": "2020-03-19T10:53:27Z", + "closed_at": null, + "author_association": "CONTRIBUTOR", + "body": "When dependabot creates a new branch, the message on IRC looks like:\r\n\r\n> [simpicapp/simpic] dependabot-preview[bot] created branch dependabot/npm_and_yarn/frontend/mnemonist-0.34.0 from - https://github.com/simpicapp/simpic/commit/dcb6c41b4c84\r\n\r\n
\r\nJSON payload\r\n\r\n```json\r\n{\r\n \"ref\": \"refs/heads/dependabot/npm_and_yarn/frontend/mnemonist-0.34.0\",\r\n \"before\": \"0000000000000000000000000000000000000000\",\r\n \"after\": \"dcb6c41b4c842e7535825f2fb7c029c76af4783e\",\r\n \"repository\": {\r\n \"id\": 240111851,\r\n \"node_id\": \"MDEwOlJlcG9zaXRvcnkyNDAxMTE4NTE=\",\r\n \"name\": \"simpic\",\r\n \"full_name\": \"simpicapp/simpic\",\r\n \"private\": false,\r\n \"owner\": {\r\n \"name\": \"simpicapp\",\r\n \"email\": null,\r\n \"login\": \"simpicapp\",\r\n \"id\": 61029506,\r\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjYxMDI5NTA2\",\r\n \"avatar_url\": \"https://avatars2.githubusercontent.com/u/61029506?v=4\",\r\n \"gravatar_id\": \"\",\r\n \"url\": \"https://api.github.com/users/simpicapp\",\r\n \"html_url\": \"https://github.com/simpicapp\",\r\n \"followers_url\": \"https://api.github.com/users/simpicapp/followers\",\r\n \"following_url\": \"https://api.github.com/users/simpicapp/following{/other_user}\",\r\n \"gists_url\": \"https://api.github.com/users/simpicapp/gists{/gist_id}\",\r\n \"starred_url\": \"https://api.github.com/users/simpicapp/starred{/owner}{/repo}\",\r\n \"subscriptions_url\": \"https://api.github.com/users/simpicapp/subscriptions\",\r\n \"organizations_url\": \"https://api.github.com/users/simpicapp/orgs\",\r\n \"repos_url\": \"https://api.github.com/users/simpicapp/repos\",\r\n \"events_url\": \"https://api.github.com/users/simpicapp/events{/privacy}\",\r\n \"received_events_url\": \"https://api.github.com/users/simpicapp/received_events\",\r\n \"type\": \"Organization\",\r\n \"site_admin\": false\r\n },\r\n \"html_url\": \"https://github.com/simpicapp/simpic\",\r\n \"description\": \"Simple self-hosted photo manager\",\r\n \"fork\": false,\r\n \"url\": \"https://github.com/simpicapp/simpic\",\r\n \"forks_url\": \"https://api.github.com/repos/simpicapp/simpic/forks\",\r\n \"keys_url\": \"https://api.github.com/repos/simpicapp/simpic/keys{/key_id}\",\r\n \"collaborators_url\": \"https://api.github.com/repos/simpicapp/simpic/collaborators{/collaborator}\",\r\n \"teams_url\": \"https://api.github.com/repos/simpicapp/simpic/teams\",\r\n \"hooks_url\": \"https://api.github.com/repos/simpicapp/simpic/hooks\",\r\n \"issue_events_url\": \"https://api.github.com/repos/simpicapp/simpic/issues/events{/number}\",\r\n \"events_url\": \"https://api.github.com/repos/simpicapp/simpic/events\",\r\n \"assignees_url\": \"https://api.github.com/repos/simpicapp/simpic/assignees{/user}\",\r\n \"branches_url\": \"https://api.github.com/repos/simpicapp/simpic/branches{/branch}\",\r\n \"tags_url\": \"https://api.github.com/repos/simpicapp/simpic/tags\",\r\n \"blobs_url\": \"https://api.github.com/repos/simpicapp/simpic/git/blobs{/sha}\",\r\n \"git_tags_url\": \"https://api.github.com/repos/simpicapp/simpic/git/tags{/sha}\",\r\n \"git_refs_url\": \"https://api.github.com/repos/simpicapp/simpic/git/refs{/sha}\",\r\n \"trees_url\": \"https://api.github.com/repos/simpicapp/simpic/git/trees{/sha}\",\r\n \"statuses_url\": \"https://api.github.com/repos/simpicapp/simpic/statuses/{sha}\",\r\n \"languages_url\": \"https://api.github.com/repos/simpicapp/simpic/languages\",\r\n \"stargazers_url\": \"https://api.github.com/repos/simpicapp/simpic/stargazers\",\r\n \"contributors_url\": \"https://api.github.com/repos/simpicapp/simpic/contributors\",\r\n \"subscribers_url\": \"https://api.github.com/repos/simpicapp/simpic/subscribers\",\r\n \"subscription_url\": \"https://api.github.com/repos/simpicapp/simpic/subscription\",\r\n \"commits_url\": \"https://api.github.com/repos/simpicapp/simpic/commits{/sha}\",\r\n \"git_commits_url\": \"https://api.github.com/repos/simpicapp/simpic/git/commits{/sha}\",\r\n \"comments_url\": \"https://api.github.com/repos/simpicapp/simpic/comments{/number}\",\r\n \"issue_comment_url\": \"https://api.github.com/repos/simpicapp/simpic/issues/comments{/number}\",\r\n \"contents_url\": \"https://api.github.com/repos/simpicapp/simpic/contents/{+path}\",\r\n \"compare_url\": \"https://api.github.com/repos/simpicapp/simpic/compare/{base}...{head}\",\r\n \"merges_url\": \"https://api.github.com/repos/simpicapp/simpic/merges\",\r\n \"archive_url\": \"https://api.github.com/repos/simpicapp/simpic/{archive_format}{/ref}\",\r\n \"downloads_url\": \"https://api.github.com/repos/simpicapp/simpic/downloads\",\r\n \"issues_url\": \"https://api.github.com/repos/simpicapp/simpic/issues{/number}\",\r\n \"pulls_url\": \"https://api.github.com/repos/simpicapp/simpic/pulls{/number}\",\r\n \"milestones_url\": \"https://api.github.com/repos/simpicapp/simpic/milestones{/number}\",\r\n \"notifications_url\": \"https://api.github.com/repos/simpicapp/simpic/notifications{?since,all,participating}\",\r\n \"labels_url\": \"https://api.github.com/repos/simpicapp/simpic/labels{/name}\",\r\n \"releases_url\": \"https://api.github.com/repos/simpicapp/simpic/releases{/id}\",\r\n \"deployments_url\": \"https://api.github.com/repos/simpicapp/simpic/deployments\",\r\n \"created_at\": 1581540441,\r\n \"updated_at\": \"2020-03-18T11:40:56Z\",\r\n \"pushed_at\": 1584614397,\r\n \"git_url\": \"git://github.com/simpicapp/simpic.git\",\r\n \"ssh_url\": \"git@github.com:simpicapp/simpic.git\",\r\n \"clone_url\": \"https://github.com/simpicapp/simpic.git\",\r\n \"svn_url\": \"https://github.com/simpicapp/simpic\",\r\n \"homepage\": \"https://simpic.app/\",\r\n \"size\": 3002,\r\n \"stargazers_count\": 2,\r\n \"watchers_count\": 2,\r\n \"language\": \"Go\",\r\n \"has_issues\": true,\r\n \"has_projects\": false,\r\n \"has_downloads\": true,\r\n \"has_wiki\": false,\r\n \"has_pages\": false,\r\n \"forks_count\": 1,\r\n \"mirror_url\": null,\r\n \"archived\": false,\r\n \"disabled\": false,\r\n \"open_issues_count\": 22,\r\n \"license\": {\r\n \"key\": \"other\",\r\n \"name\": \"Other\",\r\n \"spdx_id\": \"NOASSERTION\",\r\n \"url\": null,\r\n \"node_id\": \"MDc6TGljZW5zZTA=\"\r\n },\r\n \"forks\": 1,\r\n \"open_issues\": 22,\r\n \"watchers\": 2,\r\n \"default_branch\": \"master\",\r\n \"stargazers\": 2,\r\n \"master_branch\": \"master\",\r\n \"organization\": \"simpicapp\"\r\n },\r\n \"pusher\": {\r\n \"name\": \"dependabot-preview[bot]\",\r\n \"email\": null\r\n },\r\n \"organization\": {\r\n \"login\": \"simpicapp\",\r\n \"id\": 61029506,\r\n \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjYxMDI5NTA2\",\r\n \"url\": \"https://api.github.com/orgs/simpicapp\",\r\n \"repos_url\": \"https://api.github.com/orgs/simpicapp/repos\",\r\n \"events_url\": \"https://api.github.com/orgs/simpicapp/events\",\r\n \"hooks_url\": \"https://api.github.com/orgs/simpicapp/hooks\",\r\n \"issues_url\": \"https://api.github.com/orgs/simpicapp/issues\",\r\n \"members_url\": \"https://api.github.com/orgs/simpicapp/members{/member}\",\r\n \"public_members_url\": \"https://api.github.com/orgs/simpicapp/public_members{/member}\",\r\n \"avatar_url\": \"https://avatars2.githubusercontent.com/u/61029506?v=4\",\r\n \"description\": \"\"\r\n },\r\n \"sender\": {\r\n \"login\": \"dependabot-preview[bot]\",\r\n \"id\": 27856297,\r\n \"node_id\": \"MDM6Qm90Mjc4NTYyOTc=\",\r\n \"avatar_url\": \"https://avatars3.githubusercontent.com/in/2141?v=4\",\r\n \"gravatar_id\": \"\",\r\n \"url\": \"https://api.github.com/users/dependabot-preview%5Bbot%5D\",\r\n \"html_url\": \"https://github.com/apps/dependabot-preview\",\r\n \"followers_url\": \"https://api.github.com/users/dependabot-preview%5Bbot%5D/followers\",\r\n \"following_url\": \"https://api.github.com/users/dependabot-preview%5Bbot%5D/following{/other_user}\",\r\n \"gists_url\": \"https://api.github.com/users/dependabot-preview%5Bbot%5D/gists{/gist_id}\",\r\n \"starred_url\": \"https://api.github.com/users/dependabot-preview%5Bbot%5D/starred{/owner}{/repo}\",\r\n \"subscriptions_url\": \"https://api.github.com/users/dependabot-preview%5Bbot%5D/subscriptions\",\r\n \"organizations_url\": \"https://api.github.com/users/dependabot-preview%5Bbot%5D/orgs\",\r\n \"repos_url\": \"https://api.github.com/users/dependabot-preview%5Bbot%5D/repos\",\r\n \"events_url\": \"https://api.github.com/users/dependabot-preview%5Bbot%5D/events{/privacy}\",\r\n \"received_events_url\": \"https://api.github.com/users/dependabot-preview%5Bbot%5D/received_events\",\r\n \"type\": \"Bot\",\r\n \"site_admin\": false\r\n },\r\n \"created\": true,\r\n \"deleted\": false,\r\n \"forced\": false,\r\n \"base_ref\": null,\r\n \"compare\": \"https://github.com/simpicapp/simpic/commit/dcb6c41b4c84\",\r\n \"commits\": [\r\n {\r\n \"id\": \"dcb6c41b4c842e7535825f2fb7c029c76af4783e\",\r\n \"tree_id\": \"5aeba54d848fe0ad0c0e029f5a17193de65df66c\",\r\n \"distinct\": true,\r\n \"message\": \"Bump mnemonist from 0.33.1 to 0.34.0 in /frontend\\n\\nBumps [mnemonist](https://github.com/yomguithereal/mnemonist) from 0.33.1 to 0.34.0.\\n- [Release notes](https://github.com/yomguithereal/mnemonist/releases)\\n- [Changelog](https://github.com/Yomguithereal/mnemonist/blob/master/CHANGELOG.md)\\n- [Commits](https://github.com/yomguithereal/mnemonist/compare/0.33.1...0.34.0)\\n\\nSigned-off-by: dependabot-preview[bot] \",\r\n \"timestamp\": \"2020-03-19T10:39:56Z\",\r\n \"url\": \"https://github.com/simpicapp/simpic/commit/dcb6c41b4c842e7535825f2fb7c029c76af4783e\",\r\n \"author\": {\r\n \"name\": \"dependabot-preview[bot]\",\r\n \"email\": \"27856297+dependabot-preview[bot]@users.noreply.github.com\",\r\n \"username\": \"dependabot-preview[bot]\"\r\n },\r\n \"committer\": {\r\n \"name\": \"GitHub\",\r\n \"email\": \"noreply@github.com\",\r\n \"username\": \"web-flow\"\r\n },\r\n \"added\": [\r\n\r\n ],\r\n \"removed\": [\r\n\r\n ],\r\n \"modified\": [\r\n \"frontend/package-lock.json\",\r\n \"frontend/package.json\"\r\n ]\r\n }\r\n ],\r\n \"head_commit\": {\r\n \"id\": \"dcb6c41b4c842e7535825f2fb7c029c76af4783e\",\r\n \"tree_id\": \"5aeba54d848fe0ad0c0e029f5a17193de65df66c\",\r\n \"distinct\": true,\r\n \"message\": \"Bump mnemonist from 0.33.1 to 0.34.0 in /frontend\\n\\nBumps [mnemonist](https://github.com/yomguithereal/mnemonist) from 0.33.1 to 0.34.0.\\n- [Release notes](https://github.com/yomguithereal/mnemonist/releases)\\n- [Changelog](https://github.com/Yomguithereal/mnemonist/blob/master/CHANGELOG.md)\\n- [Commits](https://github.com/yomguithereal/mnemonist/compare/0.33.1...0.34.0)\\n\\nSigned-off-by: dependabot-preview[bot] \",\r\n \"timestamp\": \"2020-03-19T10:39:56Z\",\r\n \"url\": \"https://github.com/simpicapp/simpic/commit/dcb6c41b4c842e7535825f2fb7c029c76af4783e\",\r\n \"author\": {\r\n \"name\": \"dependabot-preview[bot]\",\r\n \"email\": \"27856297+dependabot-preview[bot]@users.noreply.github.com\",\r\n \"username\": \"dependabot-preview[bot]\"\r\n },\r\n \"committer\": {\r\n \"name\": \"GitHub\",\r\n \"email\": \"noreply@github.com\",\r\n \"username\": \"web-flow\"\r\n },\r\n \"added\": [\r\n\r\n ],\r\n \"removed\": [\r\n\r\n ],\r\n \"modified\": [\r\n \"frontend/package-lock.json\",\r\n \"frontend/package.json\"\r\n ]\r\n }\r\n}\r\n```\r\n
" + }, + "repository": { + "id": 243344149, + "node_id": "MDEwOlJlcG9zaXRvcnkyNDMzNDQxNDk=", + "name": "irc", + "full_name": "greboid/irc", + "private": false, + "owner": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/irc", + "description": "Plugin based IRC library for Go", + "fork": false, + "url": "https://api.github.com/repos/greboid/irc", + "forks_url": "https://api.github.com/repos/greboid/irc/forks", + "keys_url": "https://api.github.com/repos/greboid/irc/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/irc/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/irc/teams", + "hooks_url": "https://api.github.com/repos/greboid/irc/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/irc/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/irc/events", + "assignees_url": "https://api.github.com/repos/greboid/irc/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/irc/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/irc/tags", + "blobs_url": "https://api.github.com/repos/greboid/irc/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/irc/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/irc/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/irc/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/irc/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/irc/languages", + "stargazers_url": "https://api.github.com/repos/greboid/irc/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/irc/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/irc/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/irc/subscription", + "commits_url": "https://api.github.com/repos/greboid/irc/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/irc/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/irc/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/irc/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/irc/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/irc/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/irc/merges", + "archive_url": "https://api.github.com/repos/greboid/irc/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/irc/downloads", + "issues_url": "https://api.github.com/repos/greboid/irc/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/irc/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/irc/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/irc/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/irc/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/irc/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/irc/deployments", + "created_at": "2020-02-26T19:09:37Z", + "updated_at": "2020-03-19T00:36:43Z", + "pushed_at": "2020-03-19T00:36:41Z", + "git_url": "git://github.com/greboid/irc.git", + "ssh_url": "git@github.com:greboid/irc.git", + "clone_url": "https://github.com/greboid/irc.git", + "svn_url": "https://github.com/greboid/irc", + "homepage": "", + "size": 168, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Go", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 1, + "open_issues": 1, + "watchers": 0, + "default_branch": "master" + }, + "sender": { + "login": "csmith", + "id": 189133, + "node_id": "MDQ6VXNlcjE4OTEzMw==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189133?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/csmith", + "html_url": "https://github.com/csmith", + "followers_url": "https://api.github.com/users/csmith/followers", + "following_url": "https://api.github.com/users/csmith/following{/other_user}", + "gists_url": "https://api.github.com/users/csmith/gists{/gist_id}", + "starred_url": "https://api.github.com/users/csmith/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/csmith/subscriptions", + "organizations_url": "https://api.github.com/users/csmith/orgs", + "repos_url": "https://api.github.com/users/csmith/repos", + "events_url": "https://api.github.com/users/csmith/events{/privacy}", + "received_events_url": "https://api.github.com/users/csmith/received_events", + "type": "User", + "site_admin": false + } +} \ No newline at end of file diff --git a/cmd/github/testdata/issues/create_1.json.golden b/cmd/github/testdata/issues/create_1.json.golden new file mode 100644 index 0000000..6218168 --- /dev/null +++ b/cmd/github/testdata/issues/create_1.json.golden @@ -0,0 +1 @@ +[greboid/irc] csmith create issue: [BUG] GitHub: new branches say "from " - https://github.com/greboid/irc/issues/5 \ No newline at end of file diff --git a/cmd/github/testdata/ping.json b/cmd/github/testdata/ping.json new file mode 100644 index 0000000..8dabdcd --- /dev/null +++ b/cmd/github/testdata/ping.json @@ -0,0 +1,149 @@ +{ + "zen": "It's not fully shipped until it's fast.", + "hook_id": 192828383, + "hook": { + "type": "Repository", + "id": 192828383, + "name": "web", + "active": true, + "events": [ + "*" + ], + "config": { + "content_type": "form", + "insecure_ssl": "0", + "secret": "********", + "url": "********" + }, + "updated_at": "2020-03-18T20:52:51Z", + "created_at": "2020-03-18T20:52:51Z", + "url": "https://api.github.com/repos/greboid/irc/hooks/192828383", + "test_url": "https://api.github.com/repos/greboid/irc/hooks/192828383/test", + "ping_url": "https://api.github.com/repos/greboid/irc/hooks/192828383/pings", + "last_response": { + "code": null, + "status": "unused", + "message": null + } + }, + "repository": { + "id": 243344149, + "node_id": "MDEwOlJlcG9zaXRvcnkyNDMzNDQxNDk=", + "name": "irc", + "full_name": "greboid/irc", + "private": false, + "owner": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/irc", + "description": "Plugin based IRC library for Go", + "fork": false, + "url": "https://api.github.com/repos/greboid/irc", + "forks_url": "https://api.github.com/repos/greboid/irc/forks", + "keys_url": "https://api.github.com/repos/greboid/irc/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/irc/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/irc/teams", + "hooks_url": "https://api.github.com/repos/greboid/irc/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/irc/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/irc/events", + "assignees_url": "https://api.github.com/repos/greboid/irc/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/irc/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/irc/tags", + "blobs_url": "https://api.github.com/repos/greboid/irc/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/irc/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/irc/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/irc/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/irc/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/irc/languages", + "stargazers_url": "https://api.github.com/repos/greboid/irc/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/irc/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/irc/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/irc/subscription", + "commits_url": "https://api.github.com/repos/greboid/irc/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/irc/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/irc/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/irc/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/irc/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/irc/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/irc/merges", + "archive_url": "https://api.github.com/repos/greboid/irc/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/irc/downloads", + "issues_url": "https://api.github.com/repos/greboid/irc/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/irc/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/irc/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/irc/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/irc/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/irc/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/irc/deployments", + "created_at": "2020-02-26T19:09:37Z", + "updated_at": "2020-03-18T20:28:54Z", + "pushed_at": "2020-03-18T20:28:51Z", + "git_url": "git://github.com/greboid/irc.git", + "ssh_url": "git@github.com:greboid/irc.git", + "clone_url": "https://github.com/greboid/irc.git", + "svn_url": "https://github.com/greboid/irc", + "homepage": "", + "size": 154, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Go", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "sender": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + } +} \ No newline at end of file diff --git a/cmd/github/testdata/pullrequest_closed_1.json b/cmd/github/testdata/pullrequest_closed_1.json new file mode 100644 index 0000000..24b4d00 --- /dev/null +++ b/cmd/github/testdata/pullrequest_closed_1.json @@ -0,0 +1,508 @@ +{ + "action": "closed", + "number": 332, + "pull_request": { + "url": "https://api.github.com/repos/greboid/ig/pulls/332", + "id": 392927324, + "node_id": "MDExOlB1bGxSZXF1ZXN0MzkyOTI3MzI0", + "html_url": "https://github.com/greboid/ig/pull/332", + "diff_url": "https://github.com/greboid/ig/pull/332.diff", + "patch_url": "https://github.com/greboid/ig/pull/332.patch", + "issue_url": "https://api.github.com/repos/greboid/ig/issues/332", + "number": 332, + "state": "closed", + "locked": false, + "title": "Bump kotlin-gradle-plugin from 1.3.70 to 1.3.71", + "user": { + "login": "dependabot-preview[bot]", + "id": 27856297, + "node_id": "MDM6Qm90Mjc4NTYyOTc=", + "avatar_url": "https://avatars3.githubusercontent.com/in/2141?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/dependabot-preview%5Bbot%5D", + "html_url": "https://github.com/apps/dependabot-preview", + "followers_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "body": "Bumps [kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) from 1.3.70 to 1.3.71.\n
\nRelease notes\n

Sourced from kotlin-gradle-plugin's releases.

\n
\n

Kotlin 1.3.71

\n

1.3.71

\n

Compiler

\n
    \n
  • KT-36095 201: False positive OVERLOAD_RESOLUTION_AMBIGUITY with Java Enum.valueOf and Enum.values() reference
  • \n
  • KT-37040 'No explicit visibility in API mode' should not be reported on enum members
  • \n
  • KT-37204 AssertionError: "No delegated property metadata owner for" with lazy inside inline function
  • \n
\n

Docs & Examples

\n
    \n
  • KT-37029 Kotlin full stack app demo: update all involving versions to work with 1.3.70 release
  • \n
\n

IDE

\n
    \n
  • KT-34759 "PSI and index do not match" and high CPU usage when the library has enum with elements in quotes and internal lazy val in another part of code
  • \n
  • KT-37200 StackOverflowError in LightMethodBuilder.equals when analysing Kotlin files
  • \n
  • KT-37229 java.lang.NoSuchMethodError: 'com.intellij.psi.impl.light.LightJavaModule, com.intellij.psi.impl.light.LightJavaModule.findModule after updating kotlin plugin to 1.3.70
  • \n
  • KT-37273 No error in editor when typing unresolved reference in super constructor lambda
  • \n
  • KT-37414 Not all imports are added on paste if code is formatted after paste
  • \n
  • KT-37553 Run inspections after general highlight pass
  • \n
\n

IDE. Code Style, Formatting

\n
    \n
  • KT-37545 Continuation indent for method's parameter changes in call chain
  • \n
\n

IDE. Hints

\n
    \n
  • KT-37537 IDE is missing or swallowing keystrokes when hint popups are displayed
  • \n
\n

IDE. Inspections and Intentions

\n
    \n
  • KT-36478 IDE suggests to use 'OptIn' annotation when it is not available in the used version of kotlin-stdlib
  • \n
  • KT-37294 False positive "Unused unary operator" on negative long annotation value
  • \n
\n

IDE. Navigation

\n
    \n
  • KT-36657 KotlinFindUsagesHandler#processElementUsages always return false if options.isSearchForTextOccurrences is false
  • \n
\n

IDE. Refactorings

\n
    \n
  • KT-37451 Change of signature error: Type of parameter cannot be resolved
  • \n
  • KT-37597 Support Suggest rename and change signature refactorings in Kotlin for IDEA 2020.1
  • \n
\n

IDE. Run Configurations

\n
    \n
  • KT-36781 Override ConfigurationFactory::getId method in Kotlin plugin to avoid problems with localizations
  • \n
\n

JavaScript

\n ... (truncated)\n
\n
\n
\nChangelog\n

Sourced from kotlin-gradle-plugin's changelog.

\n
\n

1.3.71

\n

Compiler

\n
    \n
  • KT-36095 201: False positive OVERLOAD_RESOLUTION_AMBIGUITY with Java Enum.valueOf and Enum.values() reference
  • \n
  • KT-37040 'No explicit visibility in API mode' should not be reported on enum members
  • \n
  • KT-37204 AssertionError: "No delegated property metadata owner for" with lazy inside inline function
  • \n
\n

Docs & Examples

\n
    \n
  • KT-37029 Kotlin full stack app demo: update all involving versions to work with 1.3.70 release
  • \n
\n

IDE

\n
    \n
  • KT-34759 "PSI and index do not match" and high CPU usage when the library has enum with elements in quotes and internal lazy val in another part of code
  • \n
  • KT-37200 StackOverflowError in LightMethodBuilder.equals when analysing Kotlin files
  • \n
  • KT-37229 java.lang.NoSuchMethodError: 'com.intellij.psi.impl.light.LightJavaModule, com.intellij.psi.impl.light.LightJavaModule.findModule after updating kotlin plugin to 1.3.70
  • \n
  • KT-37273 No error in editor when typing unresolved reference in super constructor lambda
  • \n
  • KT-37414 Not all imports are added on paste if code is formatted after paste
  • \n
  • KT-37553 Run inspections after general highlight pass
  • \n
\n

IDE. Code Style, Formatting

\n
    \n
  • KT-37545 Continuation indent for method's parameter changes in call chain
  • \n
\n

IDE. Hints

\n
    \n
  • KT-37537 IDE is missing or swallowing keystrokes when hint popups are displayed
  • \n
\n

IDE. Inspections and Intentions

\n
    \n
  • KT-36478 IDE suggests to use 'OptIn' annotation when it is not available in the used version of kotlin-stdlib
  • \n
  • KT-37294 False positive "Unused unary operator" on negative long annotation value
  • \n
\n

IDE. Navigation

\n
    \n
  • KT-36657 KotlinFindUsagesHandler#processElementUsages always return false if options.isSearchForTextOccurrences is false
  • \n
\n

IDE. Refactorings

\n
    \n
  • KT-37451 Change of signature error: Type of parameter cannot be resolved
  • \n
  • KT-37597 Support Suggest rename and change signature refactorings in Kotlin for IDEA 2020.1
  • \n
\n

IDE. Run Configurations

\n
    \n
  • KT-36781 Override ConfigurationFactory::getId method in Kotlin plugin to avoid problems with localizations
  • \n
\n

JavaScript

\n
    \n
  • KT-37386 Incorrect JS generated by the compiler: function is erased by the function parameter
  • \n
\n ... (truncated)\n
\n
\n
\nCommits\n
    \n
  • 7fe66d3 Fix changelog for 1.3.71
  • \n
  • b659ad4 Fix changelog for 1.3.71
  • \n
  • c4ab358 Add changelog for 1.3.71
  • \n
  • 61a6031 KotlinSdkType: fix i18n for 192
  • \n
  • fc81533 Fixed diff with master
  • \n
  • 6473e35 Suppress suggested refactoring for unused private and local declarations
  • \n
  • 05c3366 Do not suggest to update usages on renaming duplicated method or property
  • \n
  • bcdb934 Using new API
  • \n
  • a5ef38a Minor changes after code review
  • \n
  • 1c7a952 Suggested Rename and Change Signature implementation for Kotlin
  • \n
  • Additional commits viewable in compare view
  • \n
\n
\n
\n\n\n[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=org.jetbrains.kotlin:kotlin-gradle-plugin&package-manager=gradle&previous-version=1.3.70&new-version=1.3.71)](https://dependabot.com/compatibility-score/?dependency-name=org.jetbrains.kotlin:kotlin-gradle-plugin&package-manager=gradle&previous-version=1.3.70&new-version=1.3.71)\n\nDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.\n\n[//]: # (dependabot-automerge-start)\n[//]: # (dependabot-automerge-end)\n\n---\n\n
\nDependabot commands and options\n
\n\nYou can trigger Dependabot actions by commenting on this PR:\n- `@dependabot rebase` will rebase this PR\n- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it\n- `@dependabot merge` will merge this PR after your CI passes on it\n- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it\n- `@dependabot cancel merge` will cancel a previously requested merge and block automerging\n- `@dependabot reopen` will reopen this PR if it is closed\n- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually\n- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language\n- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language\n- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language\n- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language\n- `@dependabot badge me` will comment on this PR with code to add a \"Dependabot enabled\" badge to your readme\n\nAdditionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):\n- Update frequency (including time of day and day of week)\n- Pull request limits (per update run and/or open at any time)\n- Automerge options (never/patch/minor, and dev/runtime dependencies)\n- Out-of-range updates (receive only lockfile updates, if desired)\n- Security updates (receive only security updates, if desired)\n\n\n\n
", + "created_at": "2020-03-24T11:14:34Z", + "updated_at": "2020-03-24T20:23:50Z", + "closed_at": "2020-03-24T20:23:50Z", + "merged_at": "2020-03-24T20:23:50Z", + "merge_commit_sha": "30603a97134d3a13702e2605c3246a9f9115611f", + "assignee": null, + "assignees": [ + + ], + "requested_reviewers": [ + + ], + "requested_teams": [ + + ], + "labels": [ + { + "id": 1180998224, + "node_id": "MDU6TGFiZWwxMTgwOTk4MjI0", + "url": "https://api.github.com/repos/greboid/ig/labels/dependencies", + "name": "dependencies", + "color": "0025ff", + "default": false, + "description": "Pull requests that update a dependency file" + }, + { + "id": 1182498505, + "node_id": "MDU6TGFiZWwxMTgyNDk4NTA1", + "url": "https://api.github.com/repos/greboid/ig/labels/java", + "name": "java", + "color": "ffa221", + "default": false, + "description": "Pull requests that update Java code" + } + ], + "milestone": null, + "draft": false, + "commits_url": "https://api.github.com/repos/greboid/ig/pulls/332/commits", + "review_comments_url": "https://api.github.com/repos/greboid/ig/pulls/332/comments", + "review_comment_url": "https://api.github.com/repos/greboid/ig/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/greboid/ig/issues/332/comments", + "statuses_url": "https://api.github.com/repos/greboid/ig/statuses/4a22fe3bf1fff68ccceee6cbf25fdc8834e0d480", + "head": { + "label": "greboid:dependabot/gradle/org.jetbrains.kotlin-kotlin-gradle-plugin-1.3.71", + "ref": "dependabot/gradle/org.jetbrains.kotlin-kotlin-gradle-plugin-1.3.71", + "sha": "4a22fe3bf1fff68ccceee6cbf25fdc8834e0d480", + "user": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "repo": { + "id": 134196659, + "node_id": "MDEwOlJlcG9zaXRvcnkxMzQxOTY2NTk=", + "name": "ig", + "full_name": "greboid/ig", + "private": false, + "owner": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/ig", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/greboid/ig", + "forks_url": "https://api.github.com/repos/greboid/ig/forks", + "keys_url": "https://api.github.com/repos/greboid/ig/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/ig/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/ig/teams", + "hooks_url": "https://api.github.com/repos/greboid/ig/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/ig/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/ig/events", + "assignees_url": "https://api.github.com/repos/greboid/ig/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/ig/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/ig/tags", + "blobs_url": "https://api.github.com/repos/greboid/ig/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/ig/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/ig/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/ig/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/ig/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/ig/languages", + "stargazers_url": "https://api.github.com/repos/greboid/ig/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/ig/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/ig/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/ig/subscription", + "commits_url": "https://api.github.com/repos/greboid/ig/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/ig/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/ig/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/ig/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/ig/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/ig/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/ig/merges", + "archive_url": "https://api.github.com/repos/greboid/ig/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/ig/downloads", + "issues_url": "https://api.github.com/repos/greboid/ig/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/ig/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/ig/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/ig/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/ig/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/ig/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/ig/deployments", + "created_at": "2018-05-20T23:57:42Z", + "updated_at": "2020-03-23T11:24:36Z", + "pushed_at": "2020-03-24T20:23:50Z", + "git_url": "git://github.com/greboid/ig.git", + "ssh_url": "git@github.com:greboid/ig.git", + "clone_url": "https://github.com/greboid/ig.git", + "svn_url": "https://github.com/greboid/ig", + "homepage": "", + "size": 2190, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Kotlin", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 2, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 14, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 2, + "open_issues": 14, + "watchers": 0, + "default_branch": "master" + } + }, + "base": { + "label": "greboid:master", + "ref": "master", + "sha": "a413724985c6115d3595b7f505df1437a1b4a0fa", + "user": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "repo": { + "id": 134196659, + "node_id": "MDEwOlJlcG9zaXRvcnkxMzQxOTY2NTk=", + "name": "ig", + "full_name": "greboid/ig", + "private": false, + "owner": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/ig", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/greboid/ig", + "forks_url": "https://api.github.com/repos/greboid/ig/forks", + "keys_url": "https://api.github.com/repos/greboid/ig/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/ig/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/ig/teams", + "hooks_url": "https://api.github.com/repos/greboid/ig/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/ig/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/ig/events", + "assignees_url": "https://api.github.com/repos/greboid/ig/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/ig/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/ig/tags", + "blobs_url": "https://api.github.com/repos/greboid/ig/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/ig/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/ig/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/ig/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/ig/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/ig/languages", + "stargazers_url": "https://api.github.com/repos/greboid/ig/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/ig/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/ig/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/ig/subscription", + "commits_url": "https://api.github.com/repos/greboid/ig/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/ig/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/ig/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/ig/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/ig/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/ig/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/ig/merges", + "archive_url": "https://api.github.com/repos/greboid/ig/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/ig/downloads", + "issues_url": "https://api.github.com/repos/greboid/ig/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/ig/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/ig/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/ig/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/ig/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/ig/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/ig/deployments", + "created_at": "2018-05-20T23:57:42Z", + "updated_at": "2020-03-23T11:24:36Z", + "pushed_at": "2020-03-24T20:23:50Z", + "git_url": "git://github.com/greboid/ig.git", + "ssh_url": "git@github.com:greboid/ig.git", + "clone_url": "https://github.com/greboid/ig.git", + "svn_url": "https://github.com/greboid/ig", + "homepage": "", + "size": 2190, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Kotlin", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 2, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 14, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 2, + "open_issues": 14, + "watchers": 0, + "default_branch": "master" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/greboid/ig/pulls/332" + }, + "html": { + "href": "https://github.com/greboid/ig/pull/332" + }, + "issue": { + "href": "https://api.github.com/repos/greboid/ig/issues/332" + }, + "comments": { + "href": "https://api.github.com/repos/greboid/ig/issues/332/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/greboid/ig/pulls/332/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/greboid/ig/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/greboid/ig/pulls/332/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/greboid/ig/statuses/4a22fe3bf1fff68ccceee6cbf25fdc8834e0d480" + } + }, + "author_association": "CONTRIBUTOR", + "merged": true, + "mergeable": null, + "rebaseable": null, + "mergeable_state": "unknown", + "merged_by": { + "login": "dependabot-preview[bot]", + "id": 27856297, + "node_id": "MDM6Qm90Mjc4NTYyOTc=", + "avatar_url": "https://avatars3.githubusercontent.com/in/2141?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/dependabot-preview%5Bbot%5D", + "html_url": "https://github.com/apps/dependabot-preview", + "followers_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "comments": 1, + "review_comments": 0, + "maintainer_can_modify": false, + "commits": 1, + "additions": 1, + "deletions": 1, + "changed_files": 1 + }, + "repository": { + "id": 134196659, + "node_id": "MDEwOlJlcG9zaXRvcnkxMzQxOTY2NTk=", + "name": "ig", + "full_name": "greboid/ig", + "private": false, + "owner": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/ig", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/greboid/ig", + "forks_url": "https://api.github.com/repos/greboid/ig/forks", + "keys_url": "https://api.github.com/repos/greboid/ig/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/ig/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/ig/teams", + "hooks_url": "https://api.github.com/repos/greboid/ig/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/ig/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/ig/events", + "assignees_url": "https://api.github.com/repos/greboid/ig/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/ig/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/ig/tags", + "blobs_url": "https://api.github.com/repos/greboid/ig/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/ig/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/ig/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/ig/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/ig/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/ig/languages", + "stargazers_url": "https://api.github.com/repos/greboid/ig/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/ig/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/ig/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/ig/subscription", + "commits_url": "https://api.github.com/repos/greboid/ig/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/ig/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/ig/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/ig/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/ig/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/ig/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/ig/merges", + "archive_url": "https://api.github.com/repos/greboid/ig/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/ig/downloads", + "issues_url": "https://api.github.com/repos/greboid/ig/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/ig/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/ig/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/ig/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/ig/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/ig/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/ig/deployments", + "created_at": "2018-05-20T23:57:42Z", + "updated_at": "2020-03-23T11:24:36Z", + "pushed_at": "2020-03-24T20:23:50Z", + "git_url": "git://github.com/greboid/ig.git", + "ssh_url": "git@github.com:greboid/ig.git", + "clone_url": "https://github.com/greboid/ig.git", + "svn_url": "https://github.com/greboid/ig", + "homepage": "", + "size": 2190, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Kotlin", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 2, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 14, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 2, + "open_issues": 14, + "watchers": 0, + "default_branch": "master" + }, + "sender": { + "login": "dependabot-preview[bot]", + "id": 27856297, + "node_id": "MDM6Qm90Mjc4NTYyOTc=", + "avatar_url": "https://avatars3.githubusercontent.com/in/2141?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/dependabot-preview%5Bbot%5D", + "html_url": "https://github.com/apps/dependabot-preview", + "followers_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + } +} \ No newline at end of file diff --git a/cmd/github/testdata/push/basic.json b/cmd/github/testdata/push/basic.json new file mode 100644 index 0000000..be4eb1e --- /dev/null +++ b/cmd/github/testdata/push/basic.json @@ -0,0 +1,194 @@ +{ + "ref": "refs/heads/master", + "before": "e2a9a5c7eda1c58683a87cad58de9f499c9b79e8", + "after": "80a1e16889599fa51a5a74631068b33d4eae2000", + "repository": { + "id": 243344149, + "node_id": "MDEwOlJlcG9zaXRvcnkyNDMzNDQxNDk=", + "name": "irc", + "full_name": "greboid/irc", + "private": false, + "owner": { + "name": "greboid", + "email": "greboid@users.noreply.github.com", + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/irc", + "description": "Plugin based IRC library for Go", + "fork": false, + "url": "https://github.com/greboid/irc", + "forks_url": "https://api.github.com/repos/greboid/irc/forks", + "keys_url": "https://api.github.com/repos/greboid/irc/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/irc/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/irc/teams", + "hooks_url": "https://api.github.com/repos/greboid/irc/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/irc/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/irc/events", + "assignees_url": "https://api.github.com/repos/greboid/irc/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/irc/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/irc/tags", + "blobs_url": "https://api.github.com/repos/greboid/irc/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/irc/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/irc/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/irc/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/irc/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/irc/languages", + "stargazers_url": "https://api.github.com/repos/greboid/irc/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/irc/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/irc/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/irc/subscription", + "commits_url": "https://api.github.com/repos/greboid/irc/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/irc/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/irc/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/irc/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/irc/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/irc/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/irc/merges", + "archive_url": "https://api.github.com/repos/greboid/irc/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/irc/downloads", + "issues_url": "https://api.github.com/repos/greboid/irc/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/irc/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/irc/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/irc/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/irc/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/irc/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/irc/deployments", + "created_at": 1582744177, + "updated_at": "2020-03-18T20:28:54Z", + "pushed_at": 1584565472, + "git_url": "git://github.com/greboid/irc.git", + "ssh_url": "git@github.com:greboid/irc.git", + "clone_url": "https://github.com/greboid/irc.git", + "svn_url": "https://github.com/greboid/irc", + "homepage": "", + "size": 154, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Go", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "stargazers": 0, + "master_branch": "master" + }, + "pusher": { + "name": "greboid", + "email": "greboid@users.noreply.github.com" + }, + "sender": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "created": false, + "deleted": false, + "forced": false, + "base_ref": null, + "compare": "https://github.com/greboid/irc/compare/e2a9a5c7eda1...80a1e1688959", + "commits": [ + { + "id": "80a1e16889599fa51a5a74631068b33d4eae2000", + "tree_id": "52687b1e04ad00f129c2edf6e7c5a6fc3245db56", + "distinct": true, + "message": "Put github_secret in example compose", + "timestamp": "2020-03-18T21:04:27Z", + "url": "https://github.com/greboid/irc/commit/80a1e16889599fa51a5a74631068b33d4eae2000", + "author": { + "name": "Greg Holmes", + "email": "git@greg.holmes.name", + "username": "greboid" + }, + "committer": { + "name": "Greg Holmes", + "email": "git@greg.holmes.name", + "username": "greboid" + }, + "added": [ + + ], + "removed": [ + + ], + "modified": [ + "docker-compose-example.yml" + ] + } + ], + "head_commit": { + "id": "80a1e16889599fa51a5a74631068b33d4eae2000", + "tree_id": "52687b1e04ad00f129c2edf6e7c5a6fc3245db56", + "distinct": true, + "message": "Put github_secret in example compose", + "timestamp": "2020-03-18T21:04:27Z", + "url": "https://github.com/greboid/irc/commit/80a1e16889599fa51a5a74631068b33d4eae2000", + "author": { + "name": "Greg Holmes", + "email": "git@greg.holmes.name", + "username": "greboid" + }, + "committer": { + "name": "Greg Holmes", + "email": "git@greg.holmes.name", + "username": "greboid" + }, + "added": [ + + ], + "removed": [ + + ], + "modified": [ + "docker-compose-example.yml" + ] + } +} \ No newline at end of file diff --git a/cmd/github/testdata/push/basic.json.golden b/cmd/github/testdata/push/basic.json.golden new file mode 100644 index 0000000..8c9cc33 --- /dev/null +++ b/cmd/github/testdata/push/basic.json.golden @@ -0,0 +1,2 @@ +[greboid/irc] greboid pushed 1 commits to branch master - https://github.com/greboid/irc/compare/e2a9a5c7eda1...80a1e1688959 +[greboid/irc] greboid committed ae2000 - Put github_secret in example compose \ No newline at end of file diff --git a/cmd/github/testdata/push/commit/basic.json b/cmd/github/testdata/push/commit/basic.json new file mode 100644 index 0000000..be4eb1e --- /dev/null +++ b/cmd/github/testdata/push/commit/basic.json @@ -0,0 +1,194 @@ +{ + "ref": "refs/heads/master", + "before": "e2a9a5c7eda1c58683a87cad58de9f499c9b79e8", + "after": "80a1e16889599fa51a5a74631068b33d4eae2000", + "repository": { + "id": 243344149, + "node_id": "MDEwOlJlcG9zaXRvcnkyNDMzNDQxNDk=", + "name": "irc", + "full_name": "greboid/irc", + "private": false, + "owner": { + "name": "greboid", + "email": "greboid@users.noreply.github.com", + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/irc", + "description": "Plugin based IRC library for Go", + "fork": false, + "url": "https://github.com/greboid/irc", + "forks_url": "https://api.github.com/repos/greboid/irc/forks", + "keys_url": "https://api.github.com/repos/greboid/irc/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/irc/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/irc/teams", + "hooks_url": "https://api.github.com/repos/greboid/irc/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/irc/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/irc/events", + "assignees_url": "https://api.github.com/repos/greboid/irc/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/irc/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/irc/tags", + "blobs_url": "https://api.github.com/repos/greboid/irc/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/irc/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/irc/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/irc/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/irc/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/irc/languages", + "stargazers_url": "https://api.github.com/repos/greboid/irc/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/irc/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/irc/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/irc/subscription", + "commits_url": "https://api.github.com/repos/greboid/irc/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/irc/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/irc/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/irc/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/irc/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/irc/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/irc/merges", + "archive_url": "https://api.github.com/repos/greboid/irc/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/irc/downloads", + "issues_url": "https://api.github.com/repos/greboid/irc/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/irc/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/irc/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/irc/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/irc/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/irc/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/irc/deployments", + "created_at": 1582744177, + "updated_at": "2020-03-18T20:28:54Z", + "pushed_at": 1584565472, + "git_url": "git://github.com/greboid/irc.git", + "ssh_url": "git@github.com:greboid/irc.git", + "clone_url": "https://github.com/greboid/irc.git", + "svn_url": "https://github.com/greboid/irc", + "homepage": "", + "size": 154, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Go", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "stargazers": 0, + "master_branch": "master" + }, + "pusher": { + "name": "greboid", + "email": "greboid@users.noreply.github.com" + }, + "sender": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "created": false, + "deleted": false, + "forced": false, + "base_ref": null, + "compare": "https://github.com/greboid/irc/compare/e2a9a5c7eda1...80a1e1688959", + "commits": [ + { + "id": "80a1e16889599fa51a5a74631068b33d4eae2000", + "tree_id": "52687b1e04ad00f129c2edf6e7c5a6fc3245db56", + "distinct": true, + "message": "Put github_secret in example compose", + "timestamp": "2020-03-18T21:04:27Z", + "url": "https://github.com/greboid/irc/commit/80a1e16889599fa51a5a74631068b33d4eae2000", + "author": { + "name": "Greg Holmes", + "email": "git@greg.holmes.name", + "username": "greboid" + }, + "committer": { + "name": "Greg Holmes", + "email": "git@greg.holmes.name", + "username": "greboid" + }, + "added": [ + + ], + "removed": [ + + ], + "modified": [ + "docker-compose-example.yml" + ] + } + ], + "head_commit": { + "id": "80a1e16889599fa51a5a74631068b33d4eae2000", + "tree_id": "52687b1e04ad00f129c2edf6e7c5a6fc3245db56", + "distinct": true, + "message": "Put github_secret in example compose", + "timestamp": "2020-03-18T21:04:27Z", + "url": "https://github.com/greboid/irc/commit/80a1e16889599fa51a5a74631068b33d4eae2000", + "author": { + "name": "Greg Holmes", + "email": "git@greg.holmes.name", + "username": "greboid" + }, + "committer": { + "name": "Greg Holmes", + "email": "git@greg.holmes.name", + "username": "greboid" + }, + "added": [ + + ], + "removed": [ + + ], + "modified": [ + "docker-compose-example.yml" + ] + } +} \ No newline at end of file diff --git a/cmd/github/testdata/push/commit/basic.json.golden b/cmd/github/testdata/push/commit/basic.json.golden new file mode 100644 index 0000000..7ef7214 --- /dev/null +++ b/cmd/github/testdata/push/commit/basic.json.golden @@ -0,0 +1,2 @@ +[greboid/irc] greboid pushed 1 commits to refs/heads/master - https://github.com/greboid/irc/compare/e2a9a5c7eda1...80a1e1688959 +[greboid/irc] greboid committed ae2000 - Put github_secret in example compose \ No newline at end of file diff --git a/cmd/github/testdata/push/commit/external_merge.json b/cmd/github/testdata/push/commit/external_merge.json new file mode 100644 index 0000000..fc47c13 --- /dev/null +++ b/cmd/github/testdata/push/commit/external_merge.json @@ -0,0 +1,142 @@ +{ + "ref": "refs/heads/dependabot/gradle/org.jetbrains.kotlin-kotlin-gradle-plugin-1.3.71", + "before": "4a22fe3bf1fff68ccceee6cbf25fdc8834e0d480", + "after": "0000000000000000000000000000000000000000", + "repository": { + "id": 134196659, + "node_id": "MDEwOlJlcG9zaXRvcnkxMzQxOTY2NTk=", + "name": "ig", + "full_name": "greboid/ig", + "private": false, + "owner": { + "name": "greboid", + "email": "greboid@users.noreply.github.com", + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/ig", + "description": null, + "fork": false, + "url": "https://github.com/greboid/ig", + "forks_url": "https://api.github.com/repos/greboid/ig/forks", + "keys_url": "https://api.github.com/repos/greboid/ig/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/ig/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/ig/teams", + "hooks_url": "https://api.github.com/repos/greboid/ig/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/ig/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/ig/events", + "assignees_url": "https://api.github.com/repos/greboid/ig/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/ig/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/ig/tags", + "blobs_url": "https://api.github.com/repos/greboid/ig/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/ig/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/ig/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/ig/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/ig/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/ig/languages", + "stargazers_url": "https://api.github.com/repos/greboid/ig/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/ig/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/ig/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/ig/subscription", + "commits_url": "https://api.github.com/repos/greboid/ig/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/ig/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/ig/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/ig/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/ig/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/ig/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/ig/merges", + "archive_url": "https://api.github.com/repos/greboid/ig/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/ig/downloads", + "issues_url": "https://api.github.com/repos/greboid/ig/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/ig/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/ig/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/ig/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/ig/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/ig/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/ig/deployments", + "created_at": 1526860662, + "updated_at": "2020-03-23T11:24:36Z", + "pushed_at": 1585081431, + "git_url": "git://github.com/greboid/ig.git", + "ssh_url": "git@github.com:greboid/ig.git", + "clone_url": "https://github.com/greboid/ig.git", + "svn_url": "https://github.com/greboid/ig", + "homepage": "", + "size": 2190, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Kotlin", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 2, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 14, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 2, + "open_issues": 14, + "watchers": 0, + "default_branch": "master", + "stargazers": 0, + "master_branch": "master" + }, + "pusher": { + "name": "dependabot-preview[bot]", + "email": null + }, + "sender": { + "login": "dependabot-preview[bot]", + "id": 27856297, + "node_id": "MDM6Qm90Mjc4NTYyOTc=", + "avatar_url": "https://avatars3.githubusercontent.com/in/2141?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/dependabot-preview%5Bbot%5D", + "html_url": "https://github.com/apps/dependabot-preview", + "followers_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/dependabot-preview%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "created": false, + "deleted": true, + "forced": false, + "base_ref": null, + "compare": "https://github.com/greboid/ig/compare/4a22fe3bf1ff...000000000000", + "commits": [ + + ], + "head_commit": null +} \ No newline at end of file diff --git a/cmd/github/testdata/push/commit/external_merge.json.golden b/cmd/github/testdata/push/commit/external_merge.json.golden new file mode 100644 index 0000000..ad36bbf --- /dev/null +++ b/cmd/github/testdata/push/commit/external_merge.json.golden @@ -0,0 +1 @@ +[greboid/ig] dependabot-preview[bot] pushed 0 commits to refs/heads/dependabot/gradle/org.jetbrains.kotlin-kotlin-gradle-plugin-1.3.71 - https://github.com/greboid/ig/compare/4a22fe3bf1ff...000000000000 \ No newline at end of file diff --git a/cmd/github/testdata/push/commit/multiline_commit_message.json b/cmd/github/testdata/push/commit/multiline_commit_message.json new file mode 100644 index 0000000..71fab5d --- /dev/null +++ b/cmd/github/testdata/push/commit/multiline_commit_message.json @@ -0,0 +1,224 @@ +{ + "ref": "refs/heads/master", + "before": "020a158c950e018e84c98d2229c72883e86d03fa", + "after": "1253a1cd6d3976656bc2c314a9cd6a12ac2eb7ed", + "repository": { + "id": 243344149, + "node_id": "MDEwOlJlcG9zaXRvcnkyNDMzNDQxNDk=", + "name": "irc", + "full_name": "greboid/irc", + "private": false, + "owner": { + "name": "greboid", + "email": "greboid@users.noreply.github.com", + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/irc", + "description": "Plugin based IRC library for Go", + "fork": false, + "url": "https://github.com/greboid/irc", + "forks_url": "https://api.github.com/repos/greboid/irc/forks", + "keys_url": "https://api.github.com/repos/greboid/irc/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/irc/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/irc/teams", + "hooks_url": "https://api.github.com/repos/greboid/irc/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/irc/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/irc/events", + "assignees_url": "https://api.github.com/repos/greboid/irc/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/irc/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/irc/tags", + "blobs_url": "https://api.github.com/repos/greboid/irc/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/irc/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/irc/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/irc/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/irc/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/irc/languages", + "stargazers_url": "https://api.github.com/repos/greboid/irc/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/irc/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/irc/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/irc/subscription", + "commits_url": "https://api.github.com/repos/greboid/irc/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/irc/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/irc/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/irc/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/irc/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/irc/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/irc/merges", + "archive_url": "https://api.github.com/repos/greboid/irc/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/irc/downloads", + "issues_url": "https://api.github.com/repos/greboid/irc/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/irc/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/irc/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/irc/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/irc/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/irc/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/irc/deployments", + "created_at": 1582744177, + "updated_at": "2020-03-19T00:36:43Z", + "pushed_at": 1584640745, + "git_url": "git://github.com/greboid/irc.git", + "ssh_url": "git@github.com:greboid/irc.git", + "clone_url": "https://github.com/greboid/irc.git", + "svn_url": "https://github.com/greboid/irc", + "homepage": "", + "size": 168, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Go", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 3, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 1, + "open_issues": 3, + "watchers": 0, + "default_branch": "master", + "stargazers": 0, + "master_branch": "master" + }, + "pusher": { + "name": "greboid", + "email": "greboid@users.noreply.github.com" + }, + "sender": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "created": false, + "deleted": false, + "forced": false, + "base_ref": null, + "compare": "https://github.com/greboid/irc/compare/020a158c950e...1253a1cd6d39", + "commits": [ + { + "id": "87418b3bb62cdb18f7d18c0531ddc90a428a502f", + "tree_id": "c3850379d3e7600049950a528dff063451735dda", + "distinct": true, + "message": "Support setting the client's realname.", + "timestamp": "2020-03-19T17:57:22Z", + "url": "https://github.com/greboid/irc/commit/87418b3bb62cdb18f7d18c0531ddc90a428a502f", + "author": { + "name": "Chris Smith", + "email": "chris@chameth.com", + "username": "csmith" + }, + "committer": { + "name": "Chris Smith", + "email": "chris@chameth.com", + "username": "csmith" + }, + "added": [ + + ], + "removed": [ + + ], + "modified": [ + "cmd/bot/main.go", + "irc/irc.go" + ] + }, + { + "id": "1253a1cd6d3976656bc2c314a9cd6a12ac2eb7ed", + "tree_id": "c3850379d3e7600049950a528dff063451735dda", + "distinct": true, + "message": "Merge pull request #8 from csmith/support-realname\n\nSupport setting the client's realname.", + "timestamp": "2020-03-19T17:59:04Z", + "url": "https://github.com/greboid/irc/commit/1253a1cd6d3976656bc2c314a9cd6a12ac2eb7ed", + "author": { + "name": "Greg Holmes", + "email": "greboid@users.noreply.github.com", + "username": "greboid" + }, + "committer": { + "name": "GitHub", + "email": "noreply@github.com", + "username": "web-flow" + }, + "added": [ + + ], + "removed": [ + + ], + "modified": [ + "cmd/bot/main.go", + "irc/irc.go" + ] + } + ], + "head_commit": { + "id": "1253a1cd6d3976656bc2c314a9cd6a12ac2eb7ed", + "tree_id": "c3850379d3e7600049950a528dff063451735dda", + "distinct": true, + "message": "Merge pull request #8 from csmith/support-realname\n\nSupport setting the client's realname.", + "timestamp": "2020-03-19T17:59:04Z", + "url": "https://github.com/greboid/irc/commit/1253a1cd6d3976656bc2c314a9cd6a12ac2eb7ed", + "author": { + "name": "Greg Holmes", + "email": "greboid@users.noreply.github.com", + "username": "greboid" + }, + "committer": { + "name": "GitHub", + "email": "noreply@github.com", + "username": "web-flow" + }, + "added": [ + + ], + "removed": [ + + ], + "modified": [ + "cmd/bot/main.go", + "irc/irc.go" + ] + } +} \ No newline at end of file diff --git a/cmd/github/testdata/push/commit/multiline_commit_message.json.golden b/cmd/github/testdata/push/commit/multiline_commit_message.json.golden new file mode 100644 index 0000000..f2d2fc1 --- /dev/null +++ b/cmd/github/testdata/push/commit/multiline_commit_message.json.golden @@ -0,0 +1,3 @@ +[greboid/irc] greboid pushed 2 commits to refs/heads/master - https://github.com/greboid/irc/compare/020a158c950e...1253a1cd6d39 +[greboid/irc] csmith committed 8a502f - Support setting the client's realname. +[greboid/irc] greboid committed 2eb7ed - Merge pull request #8 from csmith/support-realname \ No newline at end of file diff --git a/cmd/github/testdata/push/delete/delete_1.json b/cmd/github/testdata/push/delete/delete_1.json new file mode 100644 index 0000000..3043266 --- /dev/null +++ b/cmd/github/testdata/push/delete/delete_1.json @@ -0,0 +1,125 @@ +{ + "ref": "test_branch", + "ref_type": "branch", + "pusher_type": "user", + "repository": { + "id": 243344149, + "node_id": "MDEwOlJlcG9zaXRvcnkyNDMzNDQxNDk=", + "name": "irc", + "full_name": "greboid/irc", + "private": false, + "owner": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/irc", + "description": "Plugin based IRC library for Go", + "fork": false, + "url": "https://api.github.com/repos/greboid/irc", + "forks_url": "https://api.github.com/repos/greboid/irc/forks", + "keys_url": "https://api.github.com/repos/greboid/irc/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/irc/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/irc/teams", + "hooks_url": "https://api.github.com/repos/greboid/irc/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/irc/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/irc/events", + "assignees_url": "https://api.github.com/repos/greboid/irc/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/irc/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/irc/tags", + "blobs_url": "https://api.github.com/repos/greboid/irc/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/irc/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/irc/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/irc/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/irc/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/irc/languages", + "stargazers_url": "https://api.github.com/repos/greboid/irc/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/irc/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/irc/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/irc/subscription", + "commits_url": "https://api.github.com/repos/greboid/irc/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/irc/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/irc/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/irc/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/irc/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/irc/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/irc/merges", + "archive_url": "https://api.github.com/repos/greboid/irc/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/irc/downloads", + "issues_url": "https://api.github.com/repos/greboid/irc/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/irc/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/irc/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/irc/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/irc/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/irc/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/irc/deployments", + "created_at": "2020-02-26T19:09:37Z", + "updated_at": "2020-03-18T21:16:45Z", + "pushed_at": "2020-03-18T23:09:36Z", + "git_url": "git://github.com/greboid/irc.git", + "ssh_url": "git@github.com:greboid/irc.git", + "clone_url": "https://github.com/greboid/irc.git", + "svn_url": "https://github.com/greboid/irc", + "homepage": "", + "size": 158, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Go", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "sender": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + } +} \ No newline at end of file diff --git a/cmd/github/testdata/push/delete/delete_1.json.golden b/cmd/github/testdata/push/delete/delete_1.json.golden new file mode 100644 index 0000000..7e6fbb0 --- /dev/null +++ b/cmd/github/testdata/push/delete/delete_1.json.golden @@ -0,0 +1 @@ +[greboid/irc] greboid deleted test_branch \ No newline at end of file diff --git a/cmd/github/testdata/push/tag.json b/cmd/github/testdata/push/tag.json new file mode 100644 index 0000000..4fc8789 --- /dev/null +++ b/cmd/github/testdata/push/tag.json @@ -0,0 +1,168 @@ +{ + "ref": "refs/tags/v1.2.0", + "before": "0000000000000000000000000000000000000000", + "after": "b0fd4c623c6724406156eaacfc93871e688413af", + "repository": { + "id": 243344149, + "node_id": "MDEwOlJlcG9zaXRvcnkyNDMzNDQxNDk=", + "name": "irc", + "full_name": "greboid/irc", + "private": false, + "owner": { + "name": "greboid", + "email": "greboid@users.noreply.github.com", + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/irc", + "description": "Plugin based IRC library for Go", + "fork": false, + "url": "https://github.com/greboid/irc", + "forks_url": "https://api.github.com/repos/greboid/irc/forks", + "keys_url": "https://api.github.com/repos/greboid/irc/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/irc/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/irc/teams", + "hooks_url": "https://api.github.com/repos/greboid/irc/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/irc/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/irc/events", + "assignees_url": "https://api.github.com/repos/greboid/irc/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/irc/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/irc/tags", + "blobs_url": "https://api.github.com/repos/greboid/irc/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/irc/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/irc/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/irc/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/irc/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/irc/languages", + "stargazers_url": "https://api.github.com/repos/greboid/irc/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/irc/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/irc/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/irc/subscription", + "commits_url": "https://api.github.com/repos/greboid/irc/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/irc/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/irc/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/irc/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/irc/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/irc/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/irc/merges", + "archive_url": "https://api.github.com/repos/greboid/irc/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/irc/downloads", + "issues_url": "https://api.github.com/repos/greboid/irc/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/irc/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/irc/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/irc/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/irc/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/irc/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/irc/deployments", + "created_at": 1582744177, + "updated_at": "2020-03-21T16:46:59Z", + "pushed_at": 1584809651, + "git_url": "git://github.com/greboid/irc.git", + "ssh_url": "git@github.com:greboid/irc.git", + "clone_url": "https://github.com/greboid/irc.git", + "svn_url": "https://github.com/greboid/irc", + "homepage": "", + "size": 184, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Go", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "stargazers": 0, + "master_branch": "master" + }, + "pusher": { + "name": "greboid", + "email": "greboid@users.noreply.github.com" + }, + "sender": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "created": true, + "deleted": false, + "forced": false, + "base_ref": "refs/heads/master", + "compare": "https://github.com/greboid/irc/compare/v1.2.0", + "commits": [ + + ], + "head_commit": { + "id": "b0fd4c623c6724406156eaacfc93871e688413af", + "tree_id": "13e7077b2f5bcd7252fc357c36fc918a14d52d73", + "distinct": true, + "message": "Use the right name", + "timestamp": "2020-03-21T16:46:52Z", + "url": "https://github.com/greboid/irc/commit/b0fd4c623c6724406156eaacfc93871e688413af", + "author": { + "name": "Greg Holmes", + "email": "git@greg.holmes.name", + "username": "greboid" + }, + "committer": { + "name": "Greg Holmes", + "email": "git@greg.holmes.name", + "username": "greboid" + }, + "added": [ + + ], + "removed": [ + + ], + "modified": [ + "Dockerfile.github" + ] + } +} \ No newline at end of file diff --git a/cmd/github/testdata/push/tag.json.golden b/cmd/github/testdata/push/tag.json.golden new file mode 100644 index 0000000..3992662 --- /dev/null +++ b/cmd/github/testdata/push/tag.json.golden @@ -0,0 +1 @@ +[greboid/irc] greboid created tag v1.2.0 from branch master - https://github.com/greboid/irc/compare/v1.2.0 \ No newline at end of file diff --git a/cmd/github/testdata/push_create_1.json b/cmd/github/testdata/push_create_1.json new file mode 100644 index 0000000..85723fa --- /dev/null +++ b/cmd/github/testdata/push_create_1.json @@ -0,0 +1,127 @@ +{ + "ref": "dfsdfgsdfg", + "ref_type": "branch", + "master_branch": "master", + "description": "Plugin based IRC library for Go", + "pusher_type": "user", + "repository": { + "id": 243344149, + "node_id": "MDEwOlJlcG9zaXRvcnkyNDMzNDQxNDk=", + "name": "irc", + "full_name": "greboid/irc", + "private": false, + "owner": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/irc", + "description": "Plugin based IRC library for Go", + "fork": false, + "url": "https://api.github.com/repos/greboid/irc", + "forks_url": "https://api.github.com/repos/greboid/irc/forks", + "keys_url": "https://api.github.com/repos/greboid/irc/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/irc/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/irc/teams", + "hooks_url": "https://api.github.com/repos/greboid/irc/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/irc/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/irc/events", + "assignees_url": "https://api.github.com/repos/greboid/irc/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/irc/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/irc/tags", + "blobs_url": "https://api.github.com/repos/greboid/irc/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/irc/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/irc/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/irc/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/irc/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/irc/languages", + "stargazers_url": "https://api.github.com/repos/greboid/irc/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/irc/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/irc/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/irc/subscription", + "commits_url": "https://api.github.com/repos/greboid/irc/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/irc/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/irc/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/irc/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/irc/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/irc/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/irc/merges", + "archive_url": "https://api.github.com/repos/greboid/irc/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/irc/downloads", + "issues_url": "https://api.github.com/repos/greboid/irc/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/irc/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/irc/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/irc/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/irc/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/irc/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/irc/deployments", + "created_at": "2020-02-26T19:09:37Z", + "updated_at": "2020-03-19T00:14:47Z", + "pushed_at": "2020-03-19T00:15:42Z", + "git_url": "git://github.com/greboid/irc.git", + "ssh_url": "git@github.com:greboid/irc.git", + "clone_url": "https://github.com/greboid/irc.git", + "svn_url": "https://github.com/greboid/irc", + "homepage": "", + "size": 158, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Go", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "sender": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + } +} \ No newline at end of file diff --git a/cmd/github/testdata/releases_created_1.json b/cmd/github/testdata/releases_created_1.json new file mode 100644 index 0000000..d0ccdc6 --- /dev/null +++ b/cmd/github/testdata/releases_created_1.json @@ -0,0 +1,164 @@ +{ + "action": "created", + "release": { + "url": "https://api.github.com/repos/greboid/irc/releases/24737239", + "assets_url": "https://api.github.com/repos/greboid/irc/releases/24737239/assets", + "upload_url": "https://uploads.github.com/repos/greboid/irc/releases/24737239/assets{?name,label}", + "html_url": "https://github.com/greboid/irc/releases/tag/v1.2.0", + "id": 24737239, + "node_id": "MDc6UmVsZWFzZTI0NzM3MjM5", + "tag_name": "v1.2.0", + "target_commitish": "master", + "name": "v1.2.0", + "draft": false, + "author": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "prerelease": false, + "created_at": "2020-03-21T16:46:52Z", + "published_at": "2020-03-21T16:54:11Z", + "assets": [ + + ], + "tarball_url": "https://api.github.com/repos/greboid/irc/tarball/v1.2.0", + "zipball_url": "https://api.github.com/repos/greboid/irc/zipball/v1.2.0", + "body": "" + }, + "repository": { + "id": 243344149, + "node_id": "MDEwOlJlcG9zaXRvcnkyNDMzNDQxNDk=", + "name": "irc", + "full_name": "greboid/irc", + "private": false, + "owner": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/irc", + "description": "Plugin based IRC library for Go", + "fork": false, + "url": "https://api.github.com/repos/greboid/irc", + "forks_url": "https://api.github.com/repos/greboid/irc/forks", + "keys_url": "https://api.github.com/repos/greboid/irc/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/irc/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/irc/teams", + "hooks_url": "https://api.github.com/repos/greboid/irc/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/irc/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/irc/events", + "assignees_url": "https://api.github.com/repos/greboid/irc/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/irc/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/irc/tags", + "blobs_url": "https://api.github.com/repos/greboid/irc/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/irc/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/irc/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/irc/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/irc/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/irc/languages", + "stargazers_url": "https://api.github.com/repos/greboid/irc/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/irc/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/irc/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/irc/subscription", + "commits_url": "https://api.github.com/repos/greboid/irc/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/irc/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/irc/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/irc/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/irc/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/irc/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/irc/merges", + "archive_url": "https://api.github.com/repos/greboid/irc/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/irc/downloads", + "issues_url": "https://api.github.com/repos/greboid/irc/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/irc/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/irc/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/irc/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/irc/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/irc/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/irc/deployments", + "created_at": "2020-02-26T19:09:37Z", + "updated_at": "2020-03-21T16:46:59Z", + "pushed_at": "2020-03-21T16:54:11Z", + "git_url": "git://github.com/greboid/irc.git", + "ssh_url": "git@github.com:greboid/irc.git", + "clone_url": "https://github.com/greboid/irc.git", + "svn_url": "https://github.com/greboid/irc", + "homepage": "", + "size": 184, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Go", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "sender": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + } +} \ No newline at end of file diff --git a/cmd/github/testdata/releases_published_1.json b/cmd/github/testdata/releases_published_1.json new file mode 100644 index 0000000..2c7b9b5 --- /dev/null +++ b/cmd/github/testdata/releases_published_1.json @@ -0,0 +1,164 @@ +{ + "action": "published", + "release": { + "url": "https://api.github.com/repos/greboid/irc/releases/24737239", + "assets_url": "https://api.github.com/repos/greboid/irc/releases/24737239/assets", + "upload_url": "https://uploads.github.com/repos/greboid/irc/releases/24737239/assets{?name,label}", + "html_url": "https://github.com/greboid/irc/releases/tag/v1.2.0", + "id": 24737239, + "node_id": "MDc6UmVsZWFzZTI0NzM3MjM5", + "tag_name": "v1.2.0", + "target_commitish": "master", + "name": "v1.2.0", + "draft": false, + "author": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "prerelease": false, + "created_at": "2020-03-21T16:46:52Z", + "published_at": "2020-03-21T16:54:11Z", + "assets": [ + + ], + "tarball_url": "https://api.github.com/repos/greboid/irc/tarball/v1.2.0", + "zipball_url": "https://api.github.com/repos/greboid/irc/zipball/v1.2.0", + "body": "" + }, + "repository": { + "id": 243344149, + "node_id": "MDEwOlJlcG9zaXRvcnkyNDMzNDQxNDk=", + "name": "irc", + "full_name": "greboid/irc", + "private": false, + "owner": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/irc", + "description": "Plugin based IRC library for Go", + "fork": false, + "url": "https://api.github.com/repos/greboid/irc", + "forks_url": "https://api.github.com/repos/greboid/irc/forks", + "keys_url": "https://api.github.com/repos/greboid/irc/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/irc/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/irc/teams", + "hooks_url": "https://api.github.com/repos/greboid/irc/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/irc/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/irc/events", + "assignees_url": "https://api.github.com/repos/greboid/irc/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/irc/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/irc/tags", + "blobs_url": "https://api.github.com/repos/greboid/irc/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/irc/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/irc/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/irc/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/irc/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/irc/languages", + "stargazers_url": "https://api.github.com/repos/greboid/irc/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/irc/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/irc/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/irc/subscription", + "commits_url": "https://api.github.com/repos/greboid/irc/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/irc/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/irc/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/irc/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/irc/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/irc/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/irc/merges", + "archive_url": "https://api.github.com/repos/greboid/irc/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/irc/downloads", + "issues_url": "https://api.github.com/repos/greboid/irc/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/irc/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/irc/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/irc/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/irc/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/irc/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/irc/deployments", + "created_at": "2020-02-26T19:09:37Z", + "updated_at": "2020-03-21T16:46:59Z", + "pushed_at": "2020-03-21T16:54:11Z", + "git_url": "git://github.com/greboid/irc.git", + "ssh_url": "git@github.com:greboid/irc.git", + "clone_url": "https://github.com/greboid/irc.git", + "svn_url": "https://github.com/greboid/irc", + "homepage": "", + "size": 184, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Go", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "sender": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + } +} \ No newline at end of file diff --git a/cmd/github/testdata/releases_released_1.json b/cmd/github/testdata/releases_released_1.json new file mode 100644 index 0000000..905dcc0 --- /dev/null +++ b/cmd/github/testdata/releases_released_1.json @@ -0,0 +1,164 @@ +{ + "action": "released", + "release": { + "url": "https://api.github.com/repos/greboid/irc/releases/24737239", + "assets_url": "https://api.github.com/repos/greboid/irc/releases/24737239/assets", + "upload_url": "https://uploads.github.com/repos/greboid/irc/releases/24737239/assets{?name,label}", + "html_url": "https://github.com/greboid/irc/releases/tag/v1.2.0", + "id": 24737239, + "node_id": "MDc6UmVsZWFzZTI0NzM3MjM5", + "tag_name": "v1.2.0", + "target_commitish": "master", + "name": "v1.2.0", + "draft": false, + "author": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "prerelease": false, + "created_at": "2020-03-21T16:46:52Z", + "published_at": "2020-03-21T16:54:11Z", + "assets": [ + + ], + "tarball_url": "https://api.github.com/repos/greboid/irc/tarball/v1.2.0", + "zipball_url": "https://api.github.com/repos/greboid/irc/zipball/v1.2.0", + "body": "" + }, + "repository": { + "id": 243344149, + "node_id": "MDEwOlJlcG9zaXRvcnkyNDMzNDQxNDk=", + "name": "irc", + "full_name": "greboid/irc", + "private": false, + "owner": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/greboid/irc", + "description": "Plugin based IRC library for Go", + "fork": false, + "url": "https://api.github.com/repos/greboid/irc", + "forks_url": "https://api.github.com/repos/greboid/irc/forks", + "keys_url": "https://api.github.com/repos/greboid/irc/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/greboid/irc/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/greboid/irc/teams", + "hooks_url": "https://api.github.com/repos/greboid/irc/hooks", + "issue_events_url": "https://api.github.com/repos/greboid/irc/issues/events{/number}", + "events_url": "https://api.github.com/repos/greboid/irc/events", + "assignees_url": "https://api.github.com/repos/greboid/irc/assignees{/user}", + "branches_url": "https://api.github.com/repos/greboid/irc/branches{/branch}", + "tags_url": "https://api.github.com/repos/greboid/irc/tags", + "blobs_url": "https://api.github.com/repos/greboid/irc/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/greboid/irc/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/greboid/irc/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/greboid/irc/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/greboid/irc/statuses/{sha}", + "languages_url": "https://api.github.com/repos/greboid/irc/languages", + "stargazers_url": "https://api.github.com/repos/greboid/irc/stargazers", + "contributors_url": "https://api.github.com/repos/greboid/irc/contributors", + "subscribers_url": "https://api.github.com/repos/greboid/irc/subscribers", + "subscription_url": "https://api.github.com/repos/greboid/irc/subscription", + "commits_url": "https://api.github.com/repos/greboid/irc/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/greboid/irc/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/greboid/irc/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/greboid/irc/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/greboid/irc/contents/{+path}", + "compare_url": "https://api.github.com/repos/greboid/irc/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/greboid/irc/merges", + "archive_url": "https://api.github.com/repos/greboid/irc/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/greboid/irc/downloads", + "issues_url": "https://api.github.com/repos/greboid/irc/issues{/number}", + "pulls_url": "https://api.github.com/repos/greboid/irc/pulls{/number}", + "milestones_url": "https://api.github.com/repos/greboid/irc/milestones{/number}", + "notifications_url": "https://api.github.com/repos/greboid/irc/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/greboid/irc/labels{/name}", + "releases_url": "https://api.github.com/repos/greboid/irc/releases{/id}", + "deployments_url": "https://api.github.com/repos/greboid/irc/deployments", + "created_at": "2020-02-26T19:09:37Z", + "updated_at": "2020-03-21T16:46:59Z", + "pushed_at": "2020-03-21T16:54:11Z", + "git_url": "git://github.com/greboid/irc.git", + "ssh_url": "git@github.com:greboid/irc.git", + "clone_url": "https://github.com/greboid/irc.git", + "svn_url": "https://github.com/greboid/irc", + "homepage": "", + "size": 184, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Go", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "sender": { + "login": "greboid", + "id": 189618, + "node_id": "MDQ6VXNlcjE4OTYxOA==", + "avatar_url": "https://avatars0.githubusercontent.com/u/189618?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/greboid", + "html_url": "https://github.com/greboid", + "followers_url": "https://api.github.com/users/greboid/followers", + "following_url": "https://api.github.com/users/greboid/following{/other_user}", + "gists_url": "https://api.github.com/users/greboid/gists{/gist_id}", + "starred_url": "https://api.github.com/users/greboid/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/greboid/subscriptions", + "organizations_url": "https://api.github.com/users/greboid/orgs", + "repos_url": "https://api.github.com/users/greboid/repos", + "events_url": "https://api.github.com/users/greboid/events{/privacy}", + "received_events_url": "https://api.github.com/users/greboid/received_events", + "type": "User", + "site_admin": false + } +} \ No newline at end of file diff --git a/cmd/github/webhook.go b/cmd/github/webhook.go new file mode 100644 index 0000000..a40b253 --- /dev/null +++ b/cmd/github/webhook.go @@ -0,0 +1,136 @@ +package main + +import ( + "context" + "encoding/json" + "github.com/greboid/irc/v2/rpc" + "go.uber.org/zap" +) + +type githubWebhookHandler struct { + client rpc.IRCPluginClient + log *zap.SugaredLogger +} + +func (g *githubWebhookHandler) handleWebhook(eventType string, bodyBytes []byte) error { + switch eventType { + case "ping": + data := pinghook{} + err := json.Unmarshal(bodyBytes, &data) + if err == nil { + go func() { + err := g.sendMessage([]string{"Ping received."}, false) + if len(err) > 0 { + for index := range err { + g.log.Errorf("Error handling push: %s", err[index].Error()) + } + } + }() + } else { + g.log.Errorf("Error handling push: %s", err.Error()) + return err + } + case "push": + data := pushhook{} + handler := githubPushHandler{} + err := json.Unmarshal(bodyBytes, &data) + if err == nil { + go func() { + err := g.sendMessage(handler.handlePushEvent(data), data.Repository.IsPrivate) + if len(err) > 0 { + for index := range err { + g.log.Errorf("Error handling push: %s", err[index].Error()) + } + } + }() + } else { + g.log.Errorf("Error handling push: %s", err.Error()) + return err + } + case "pull_request": + data := prhook{} + handler := githubPRHandler{} + err := json.Unmarshal(bodyBytes, &data) + if err == nil { + go func() { + err := g.sendMessage(handler.handlePREvent(data), data.Repository.IsPrivate) + if len(err) > 0 { + for index := range err { + g.log.Errorf("Error handling push: %s", err[index].Error()) + } + } + }() + } else { + g.log.Errorf("Error handling PR: %s", err.Error()) + return err + } + case "issues": + data := issuehook{} + handler := githubissuehandler{} + err := json.Unmarshal(bodyBytes, &data) + if err == nil { + go func() { + err := g.sendMessage(handler.handleIssueEvent(data), data.Repository.IsPrivate) + if len(err) > 0 { + for index := range err { + g.log.Errorf("Error handling push: %s", err[index].Error()) + } + } + }() + } else { + g.log.Errorf("Error handling PR: %s", err.Error()) + return err + } + case "issue_comment": + data := issuehook{} + handler := githubIssueCommenthandler{} + err := json.Unmarshal(bodyBytes, &data) + if err == nil { + go func() { + err := g.sendMessage(handler.handleIssueCommentEvent(data), data.Repository.IsPrivate) + if len(err) > 0 { + for index := range err { + g.log.Errorf("Error handling push: %s", err[index].Error()) + } + } + }() + } else { + g.log.Errorf("Error handling PR: %s", err.Error()) + return err + } + case "check_run": + // TODO: Handle + return nil + case "release": + // TODO: Handle + return nil + case "create": + // TODO: Handle + return nil + case "check_suite": + // TODO: Handle + return nil + } + return nil +} + +func (g *githubWebhookHandler) sendMessage(messages []string, isPrivate bool) []error { + notifyChannel := *Channel + if isPrivate && *HidePrivate { + return []error{} + } + if isPrivate && len(*PrivateChannel) != 0 { + notifyChannel = *PrivateChannel + } + errors := make([]error, 0) + for index := range messages { + _, err := g.client.SendChannelMessage(rpc.CtxWithToken(context.Background(), "bearer", *RPCToken), &rpc.ChannelMessage{ + Channel: notifyChannel, + Message: messages[index], + }) + if err != nil { + errors = append(errors, err) + } + } + return errors +} diff --git a/cmd/github/webhook_test.go b/cmd/github/webhook_test.go new file mode 100644 index 0000000..9982604 --- /dev/null +++ b/cmd/github/webhook_test.go @@ -0,0 +1,173 @@ +package main + +import ( + "errors" + "github.com/greboid/irc/v2/logger" + "go.uber.org/zap" + "reflect" + "testing" + "time" +) + +func Test_githubWebhookHandler_handleWebhook(t *testing.T) { + type args struct { + eventType string + filename string + } + tests := []struct { + name string + client *mockIRCPluginClient + args args + err bool + output int + finished chan bool + }{ + { + name: "valid push", + finished: make(chan bool, 1), + client: &mockIRCPluginClient{}, + args: args{ + eventType: "push", + filename: "push/basic.json", + }, + err: false, + output: 2, + }, + { + name: "error push", + client: &mockIRCPluginClient{}, + args: args{ + eventType: "push", + filename: "", + }, + err: true, + output: 0, + }, + { + name: "valid pull_request", + finished: make(chan bool, 1), + client: &mockIRCPluginClient{}, + args: args{ + eventType: "pull_request", + filename: "pullrequest_closed_1.json", + }, + err: false, + output: 1, + }, + { + name: "error pull_request", + client: &mockIRCPluginClient{}, + args: args{ + eventType: "pull_request", + filename: "", + }, + err: true, + output: 0, + }, + { + name: "valid issues", + finished: make(chan bool, 1), + client: &mockIRCPluginClient{}, + args: args{ + eventType: "issues", + filename: "issues/create_1.json", + }, + err: false, + output: 1, + }, + { + name: "error issues", + client: &mockIRCPluginClient{}, + args: args{ + eventType: "issues", + filename: "", + }, + err: true, + output: 0, + }, + { + name: "valid issue_comment", + finished: make(chan bool, 1), + client: &mockIRCPluginClient{}, + args: args{ + eventType: "issue_comment", + filename: "issuecomments/commented_1.json", + }, + err: false, + output: 1, + }, + { + name: "error issue_comment", + client: &mockIRCPluginClient{}, + args: args{ + eventType: "issue_comment", + filename: "", + }, + err: true, + output: 0, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + tt.client.finished = tt.finished + g := &githubWebhookHandler{ + client: tt.client, + log: logger.CreateLogger(false), + } + var bodyBytes []byte + if tt.args.filename != "" { + bodyBytes, _ = getTestDataBytes(tt.args.filename) + + } + err := g.handleWebhook(tt.args.eventType, bodyBytes) + if !tt.err { + select { + case <-tt.finished: + break + case <-time.After(5 * time.Millisecond): + break + } + } + if (tt.err && err == nil) || (!tt.err && err != nil) { + t.Errorf("handleWebhook() error = %v, wanted %v", err, tt.err) + } + if tt.client.sentChannelMessages != tt.output { + t.Errorf("handleWebhook() sent = %v, wanted %v", tt.client.sentChannelMessages, tt.output) + } + }) + } +} + +func Test_githubWebhookHandler_sendMessage(t *testing.T) { + tests := []struct { + name string + client *mockFailingIRCPluginClient + messages []string + wanted []error + }{ + { + name: "Check working", + client: &mockFailingIRCPluginClient{err: false}, + messages: []string{"test"}, + wanted: []error{}, + }, + { + name: "Check Failing", + client: &mockFailingIRCPluginClient{err: true}, + messages: []string{"test"}, + wanted: []error{errors.New("fake error")}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + g := &githubWebhookHandler{ + client: tt.client, + log: zap.NewNop().Sugar(), + } + got := g.sendMessage(tt.messages, false) + if !reflect.DeepEqual(got, tt.wanted) { + t.Errorf("sendMessage() sent = %v, wanted %v", got, tt.wanted) + } + }) + } +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..3acc83a --- /dev/null +++ b/go.mod @@ -0,0 +1,11 @@ +module github.com/greboid/irc-github/v2 + +go 1.15 + +require ( + github.com/greboid/irc/v2 v2.0.1 + github.com/kouhin/envflag v0.0.0-20150818174321-0e9a86061649 + github.com/sebdah/goldie/v2 v2.5.1 + go.uber.org/zap v1.16.0 + google.golang.org/grpc v1.32.0 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..b9a1d37 --- /dev/null +++ b/go.sum @@ -0,0 +1,462 @@ +cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.63.0 h1:A+DfAZQ/eWca7gvu42CS6FNSDX4R8cghF+XfWLn4R6g= +cloud.google.com/go v0.63.0/go.mod h1:GmezbQc7T2snqkEXWfZ0sy0VfkB/ivI2DdtJL2DEmlg= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= +github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= +github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/greboid/irc/v2 v2.0.1 h1:u1WSFyKDogXmtb5aCERKjLw1wp/q2D4Kv84HO82biio= +github.com/greboid/irc/v2 v2.0.1/go.mod h1:migjy2vuveCVRZjoCLbc1iAO88nkuIhxEvoCRFfDXw4= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2 h1:FlFbCRLd5Jr4iYXZufAvgWN6Ao0JrI5chLINnUXDDr0= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kouhin/envflag v0.0.0-20150818174321-0e9a86061649 h1:l95EUBxc0iMtMeam3pHFb9jko9ntaLYe2Nc+2evKElM= +github.com/kouhin/envflag v0.0.0-20150818174321-0e9a86061649/go.mod h1:BT0PpXv8Y4EL/WUsQmYsQ2FSB9HwQXIuvY+pElZVdFg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/marwan-at-work/mod v0.4.0/go.mod h1:ipkg+OqCuyke2h5uObCTrMxoaqn55iD5GX3gjuIRLDc= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/sebdah/goldie/v2 v2.5.1 h1:hh70HvG4n3T3MNRJN2z/baxPR8xutxo7JVxyi2svl+s= +github.com/sebdah/goldie/v2 v2.5.1/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/tidwall/btree v0.0.0-20191029221954-400434d76274/go.mod h1:huei1BkDWJ3/sLXmO+bsCNELL+Bp2Kks9OLyQFkzvA8= +github.com/tidwall/buntdb v1.1.2/go.mod h1:xAzi36Hir4FarpSHyfuZ6JzPJdjRZ8QlLZSntE2mqlI= +github.com/tidwall/gjson v1.3.4/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= +github.com/tidwall/gjson v1.6.0/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= +github.com/tidwall/grect v0.0.0-20161006141115-ba9a043346eb/go.mod h1:lKYYLFIr9OIgdgrtgkZ9zgRxRdvPYsExnYBsEAd8W5M= +github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/pretty v1.0.1/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e/go.mod h1:/h+UnNGt0IhNNJLkGikcdcJqm66zGD/uJGMRxK/9+Ao= +github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563/go.mod h1:mLqSmt7Dv/CNneF2wfcChfN1rvapyQr01LGKnKex0DQ= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM= +go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642 h1:B6caxRw+hozq68X2MY7jEpZh/cr4/aHLv9xU8Kkadrw= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 h1:hKsoRgsbwY1NafxrwTs+k64bikrLBkAgPir1TNCj3Zs= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200417140056-c07e33ef3290/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200806022845-90696ccdc692 h1:fsn47thVa7Ar/TMyXYlZgOoT7M4+kRpb+KpSAqRQx1w= +golang.org/x/tools v0.0.0-20200806022845-90696ccdc692/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98 h1:LCO0fg4kb6WwkXQXRQQgUYsFeFb5taTX5WAx5O/Vt28= +google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0 h1:zWTV+LMdc3kaiJMSTOFz2UgSBgx8RNQoTGiZu3fR9S0= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc/examples v0.0.0-20200902210233-8630cac324bf h1:wOyqWlmX1PglUT/RhZ9Sl5Njwc3bTPP+VNgau+k+/Tw= +google.golang.org/grpc/examples v0.0.0-20200902210233-8630cac324bf/go.mod h1:Lh55/1hxmVHEkOvSIQ2uj0P12QyOCUNyRwnUlSS13hw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/urfave/cli.v2 v2.0.0-20180128182452-d3ae77c26ac8/go.mod h1:cKXr3E0k4aosgycml1b5z33BVV6hai1Kh7uDgFOkbcs= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=