diff --git a/.travis.yml b/.travis.yml index 317d01f..f256e04 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: go go: - - 1.12.1 + - 1.13.15 - tip matrix: allow_failures: @@ -29,6 +29,6 @@ script: - make test after_success: | - [ $TRAVIS_GO_VERSION = 1.11.2 ] && + [ $TRAVIS_GO_VERSION = 1.13.15 ] && overalls -project="github.com/go-playground/webhooks" -covermode=count -ignore=.git,_examples,testdata -debug && goveralls -coverprofile=overalls.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN diff --git a/github/github_test.go b/github/github_test.go index 9a6e05d..9f6d5e3 100644 --- a/github/github_test.go +++ b/github/github_test.go @@ -380,7 +380,7 @@ func TestWebhooks(t *testing.T) { filename: "../testdata/github/project-card.json", headers: http.Header{ "X-Github-Event": []string{"project_card"}, - "X-Hub-Signature": []string{"sha1=495dec0d6449d16b71f2ddcd37d595cb9b04b1d8"}, + "X-Hub-Signature": []string{"sha1=f5ed1572b04f0e03c8d5f5e3f7fa63737bef76d7"}, }, }, { @@ -420,7 +420,7 @@ func TestWebhooks(t *testing.T) { filename: "../testdata/github/pull-request.json", headers: http.Header{ "X-Github-Event": []string{"pull_request"}, - "X-Hub-Signature": []string{"sha1=35712c8d2bc197b7d07621dcf20d2fb44620508f"}, + "X-Hub-Signature": []string{"sha1=88972f972db301178aa13dafaf112d26416a15e6"}, }, }, { diff --git a/github/payload.go b/github/payload.go index 47aaf32..9a377e8 100644 --- a/github/payload.go +++ b/github/payload.go @@ -2999,13 +2999,14 @@ type PingPayload struct { type ProjectCardPayload struct { Action string `json:"action"` ProjectCard struct { - URL string `json:"url"` - ColumnURL string `json:"column_url"` - ColumnID int64 `json:"column_id"` - ID int64 `json:"id"` - NodeID string `json:"node_id"` - Note *string `json:"note"` - Creator struct { + URL string `json:"url"` + ProjectURL string `json:"project_url"` + ColumnURL string `json:"column_url"` + ColumnID int64 `json:"column_id"` + ID int64 `json:"id"` + NodeID string `json:"node_id"` + Note *string `json:"note"` + Creator struct { Login string `json:"login"` ID int64 `json:"id"` NodeID string `json:"node_id"` @@ -3602,6 +3603,7 @@ type PullRequestPayload struct { Assignee *Assignee `json:"assignee"` Assignees []*Assignee `json:"assignees"` Milestone *Milestone `json:"milestone"` + Draft bool `json:"draft"` CommitsURL string `json:"commits_url"` ReviewCommentsURL string `json:"review_comments_url"` ReviewCommentURL string `json:"review_comment_url"` diff --git a/gitlab/payload.go b/gitlab/payload.go index 6c04176..757e6dd 100644 --- a/gitlab/payload.go +++ b/gitlab/payload.go @@ -56,6 +56,7 @@ type MergeRequestEventPayload struct { Changes Changes `json:"changes"` Project Project `json:"project"` Repository Repository `json:"repository"` + Labels []Label `json:"labels"` } // PushEventPayload contains the information for GitLab's push event diff --git a/testdata/github/project-card.json b/testdata/github/project-card.json index a7c17c6..1c3608f 100644 --- a/testdata/github/project-card.json +++ b/testdata/github/project-card.json @@ -2,6 +2,7 @@ "action": "created", "project_card": { "url": "https://api.github.com/projects/columns/cards/1266091", + "project_url": "https://api.github.com/projects/6047634", "column_url": "https://api.github.com/projects/columns/515520", "column_id": 515520, "id": 1266091, @@ -27,7 +28,7 @@ }, "created_at": 1483569391, "updated_at": 1483569391, - "content_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/2" + "content_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/2" }, "repository": { "id": 35129377, @@ -145,4 +146,4 @@ "type": "User", "site_admin": false } -} +} \ No newline at end of file diff --git a/testdata/github/pull-request.json b/testdata/github/pull-request.json index 0c37e40..4fccd04 100644 --- a/testdata/github/pull-request.json +++ b/testdata/github/pull-request.json @@ -39,6 +39,7 @@ "merge_commit_sha": null, "assignee": null, "milestone": null, + "draft": false, "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits", "review_comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments", "review_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}",