From 3d689a6b5f1e68ebc92486ecdd0e4fb32d316399 Mon Sep 17 00:00:00 2001 From: konojunya Date: Sat, 17 Aug 2019 03:38:02 +0900 Subject: [PATCH 1/4] chore: add pull request url in push event payload --- github/event_types.go | 1 + github/github-accessors.go | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/github/event_types.go b/github/event_types.go index 8ba922a2b74..d3e2123547d 100644 --- a/github/event_types.go +++ b/github/event_types.go @@ -707,6 +707,7 @@ type PushEventRepository struct { PushedAt *Timestamp `json:"pushed_at,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty"` Homepage *string `json:"homepage,omitempty"` + PullsURL *string `json:"pulls_url,omitempty"` Size *int `json:"size,omitempty"` StargazersCount *int `json:"stargazers_count,omitempty"` WatchersCount *int `json:"watchers_count,omitempty"` diff --git a/github/github-accessors.go b/github/github-accessors.go index 13e60abb843..9d101e38dac 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -8780,6 +8780,14 @@ func (p *PushEventRepository) GetHomepage() string { return *p.Homepage } +// GetPullsURL returns the PullsURL field if it's non-nil, zero value otherwise. +func (p *PushEventRepository) GetPullsURL() string { + if p == nil || p.PullsURL == nil { + return "" + } + return *p.PullsURL +} + // GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. func (p *PushEventRepository) GetHTMLURL() string { if p == nil || p.HTMLURL == nil { From 69cd88b26bfcc85ab99d6ad6f38d8b3c62cac384 Mon Sep 17 00:00:00 2001 From: konojunya Date: Sat, 17 Aug 2019 03:45:11 +0900 Subject: [PATCH 2/4] update: go.sum --- go.sum | 1 + 1 file changed, 1 insertion(+) diff --git a/go.sum b/go.sum index 927256d3d86..26ae87180b1 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,6 @@ github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= From dc59440405c730fdfb4afa1c285ded84a82f505c Mon Sep 17 00:00:00 2001 From: konojunya Date: Tue, 20 Aug 2019 11:05:56 +0900 Subject: [PATCH 3/4] chore: go generate --- github/github-accessors.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/github/github-accessors.go b/github/github-accessors.go index 9d101e38dac..7c89cb60d0b 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -8780,14 +8780,6 @@ func (p *PushEventRepository) GetHomepage() string { return *p.Homepage } -// GetPullsURL returns the PullsURL field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetPullsURL() string { - if p == nil || p.PullsURL == nil { - return "" - } - return *p.PullsURL -} - // GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. func (p *PushEventRepository) GetHTMLURL() string { if p == nil || p.HTMLURL == nil { @@ -8868,6 +8860,14 @@ func (p *PushEventRepository) GetPrivate() bool { return *p.Private } +// GetPullsURL returns the PullsURL field if it's non-nil, zero value otherwise. +func (p *PushEventRepository) GetPullsURL() string { + if p == nil || p.PullsURL == nil { + return "" + } + return *p.PullsURL +} + // GetPushedAt returns the PushedAt field if it's non-nil, zero value otherwise. func (p *PushEventRepository) GetPushedAt() Timestamp { if p == nil || p.PushedAt == nil { From 790b3252fbca863308df0b1703a63b510cedfc69 Mon Sep 17 00:00:00 2001 From: konojunya Date: Tue, 20 Aug 2019 11:06:24 +0900 Subject: [PATCH 4/4] chore: revert go.sum --- go.sum | 1 - 1 file changed, 1 deletion(-) diff --git a/go.sum b/go.sum index 26ae87180b1..927256d3d86 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,5 @@ github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=