Added supported for GitHub pull request comments.
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ const (
|
||||
MemberEvent Event = "member"
|
||||
MembershipEvent Event = "membership"
|
||||
MilestoneEvent Event = "milestone"
|
||||
MetaEvent Event = "meta"
|
||||
MetaEvent Event = "meta"
|
||||
OrganizationEvent Event = "organization"
|
||||
OrgBlockEvent Event = "org_block"
|
||||
PageBuildEvent Event = "page_build"
|
||||
|
||||
@@ -273,6 +273,16 @@ func TestWebhooks(t *testing.T) {
|
||||
"X-Hub-Signature": []string{"sha1=e724c9f811fcf5f511aac32e4251b08ab1a0fd87"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "PullRequestIssueCommentEvent",
|
||||
event: IssueCommentEvent,
|
||||
typ: IssueCommentPayload{},
|
||||
filename: "../testdata/github/pull-request-issue-comment.json",
|
||||
headers: http.Header{
|
||||
"X-Github-Event": []string{"issue_comment"},
|
||||
"X-Hub-Signature": []string{"sha1=6c969b99ef881b5c98b2dbfc66a34465fcf0e7d4"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "IssuesEvent",
|
||||
event: IssuesEvent,
|
||||
|
||||
+16
-10
@@ -1614,16 +1614,22 @@ type IssueCommentPayload struct {
|
||||
Color string `json:"color"`
|
||||
Default bool `json:"default"`
|
||||
} `json:"labels"`
|
||||
State string `json:"state"`
|
||||
Locked bool `json:"locked"`
|
||||
Assignee *Assignee `json:"assignee"`
|
||||
Assignees []*Assignee `json:"assignees"`
|
||||
Milestone *Milestone `json:"milestone"`
|
||||
Comments int64 `json:"comments"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
ClosedAt *time.Time `json:"closed_at"`
|
||||
Body string `json:"body"`
|
||||
State string `json:"state"`
|
||||
Locked bool `json:"locked"`
|
||||
Assignee *Assignee `json:"assignee"`
|
||||
Assignees []*Assignee `json:"assignees"`
|
||||
Milestone *Milestone `json:"milestone"`
|
||||
Comments int64 `json:"comments"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
ClosedAt *time.Time `json:"closed_at"`
|
||||
PullRequest *struct {
|
||||
URL string `json:"url"`
|
||||
HTMLURL string `json:"html_url"`
|
||||
DiffURL string `json:"diff_url"`
|
||||
PatchURL string `json:"patch_url"`
|
||||
} `json:"pull_request"`
|
||||
Body string `json:"body"`
|
||||
} `json:"issue"`
|
||||
Comment struct {
|
||||
URL string `json:"url"`
|
||||
|
||||
Reference in New Issue
Block a user