Compare commits

..

11 Commits

Author SHA1 Message Date
Anton Krivenko 59fb74817c Update README.md 2021-01-05 02:33:20 +03:00
Anton Krivenko aa941874be Merge pull request #115 from yinxulai/v5
Add changes field in to IssuesPayload and  IssueCommentPayload of Github
2021-01-05 02:31:45 +03:00
Anton Krivenko bfd950a988 Merge branch 'v5' into v5 2021-01-04 22:39:52 +03:00
Anton Krivenko 9d685f3a73 Merge pull request #106 from wrewolf/patch-1
Added support draft pull request for github
2021-01-04 22:37:19 +03:00
Anton Krivenko 1f42c84783 Merge pull request #122 from DrMagPie/v5
Added missing field
2021-01-04 22:36:10 +03:00
Aleksey Andreyanov ee81f21da7 Add correct X-Hub-Signature for PullRequestEvent test 2020-12-08 14:49:12 +03:00
Dr.MagPie 03cee75fc3 Updated Signature 2020-12-08 00:23:31 +02:00
Dr.MagPie 86c24d8570 added missing field 2020-12-07 23:56:48 +02:00
yinxulai a5ce17cac3 format .travis.yaml 2020-07-23 11:29:49 +08:00
yinxulai efae47c3b9 add changes field in to IssuesPayload and IssueCommentPayload of GitHub. 2020-07-23 10:15:12 +08:00
Aleksey Andreyanov 9a9f42e1b8 Added support draft pull request for github 2020-04-05 20:19:13 +03:00
6 changed files with 36 additions and 19 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
Library webhooks Library webhooks
================ ================
<img align="right" src="https://raw.githubusercontent.com/go-playground/webhooks/v5/logo.png">![Project status](https://img.shields.io/badge/version-5.13.0-green.svg) <img align="right" src="https://raw.githubusercontent.com/go-playground/webhooks/v5/logo.png">![Project status](https://img.shields.io/badge/version-5.17.0-green.svg)
[![Build Status](https://travis-ci.org/go-playground/webhooks.svg?branch=v5)](https://travis-ci.org/go-playground/webhooks) [![Build Status](https://travis-ci.org/go-playground/webhooks.svg?branch=v5)](https://travis-ci.org/go-playground/webhooks)
[![Coverage Status](https://coveralls.io/repos/go-playground/webhooks/badge.svg?branch=v5&service=github)](https://coveralls.io/github/go-playground/webhooks?branch=v5) [![Coverage Status](https://coveralls.io/repos/go-playground/webhooks/badge.svg?branch=v5&service=github)](https://coveralls.io/github/go-playground/webhooks?branch=v5)
[![Go Report Card](https://goreportcard.com/badge/go-playground/webhooks)](https://goreportcard.com/report/go-playground/webhooks) [![Go Report Card](https://goreportcard.com/badge/go-playground/webhooks)](https://goreportcard.com/report/go-playground/webhooks)
+2 -2
View File
@@ -380,7 +380,7 @@ func TestWebhooks(t *testing.T) {
filename: "../testdata/github/project-card.json", filename: "../testdata/github/project-card.json",
headers: http.Header{ headers: http.Header{
"X-Github-Event": []string{"project_card"}, "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", filename: "../testdata/github/pull-request.json",
headers: http.Header{ headers: http.Header{
"X-Github-Event": []string{"pull_request"}, "X-Github-Event": []string{"pull_request"},
"X-Hub-Signature": []string{"sha1=35712c8d2bc197b7d07621dcf20d2fb44620508f"}, "X-Hub-Signature": []string{"sha1=88972f972db301178aa13dafaf112d26416a15e6"},
}, },
}, },
{ {
+15
View File
@@ -1662,6 +1662,11 @@ type IssueCommentPayload struct {
Body string `json:"body"` Body string `json:"body"`
AuthorAssociation string `json:"author_association"` AuthorAssociation string `json:"author_association"`
} `json:"comment"` } `json:"comment"`
Changes *struct {
Body *struct {
From string `json:"from"`
} `json:"body"`
} `json:"changes"`
Repository struct { Repository struct {
ID int64 `json:"id"` ID int64 `json:"id"`
NodeID string `json:"node_id"` NodeID string `json:"node_id"`
@@ -1826,6 +1831,14 @@ type IssuesPayload struct {
ClosedAt *time.Time `json:"closed_at"` ClosedAt *time.Time `json:"closed_at"`
Body string `json:"body"` Body string `json:"body"`
} `json:"issue"` } `json:"issue"`
Changes *struct {
Title *struct {
From string `json:"from"`
} `json:"title"`
Body *struct {
From string `json:"from"`
} `json:"body"`
} `json:"changes"`
Repository struct { Repository struct {
ID int64 `json:"id"` ID int64 `json:"id"`
NodeID string `json:"node_id"` NodeID string `json:"node_id"`
@@ -2987,6 +3000,7 @@ type ProjectCardPayload struct {
Action string `json:"action"` Action string `json:"action"`
ProjectCard struct { ProjectCard struct {
URL string `json:"url"` URL string `json:"url"`
ProjectURL string `json:"project_url"`
ColumnURL string `json:"column_url"` ColumnURL string `json:"column_url"`
ColumnID int64 `json:"column_id"` ColumnID int64 `json:"column_id"`
ID int64 `json:"id"` ID int64 `json:"id"`
@@ -3589,6 +3603,7 @@ type PullRequestPayload struct {
Assignee *Assignee `json:"assignee"` Assignee *Assignee `json:"assignee"`
Assignees []*Assignee `json:"assignees"` Assignees []*Assignee `json:"assignees"`
Milestone *Milestone `json:"milestone"` Milestone *Milestone `json:"milestone"`
Draft bool `json:"draft"`
CommitsURL string `json:"commits_url"` CommitsURL string `json:"commits_url"`
ReviewCommentsURL string `json:"review_comments_url"` ReviewCommentsURL string `json:"review_comments_url"`
ReviewCommentURL string `json:"review_comment_url"` ReviewCommentURL string `json:"review_comment_url"`
+1
View File
@@ -2,6 +2,7 @@
"action": "created", "action": "created",
"project_card": { "project_card": {
"url": "https://api.github.com/projects/columns/cards/1266091", "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_url": "https://api.github.com/projects/columns/515520",
"column_id": 515520, "column_id": 515520,
"id": 1266091, "id": 1266091,
+1
View File
@@ -39,6 +39,7 @@
"merge_commit_sha": null, "merge_commit_sha": null,
"assignee": null, "assignee": null,
"milestone": null, "milestone": null,
"draft": false,
"commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits", "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_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}", "review_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}",