Skip to content

Commit 9d685f3

Browse files
authored
Merge pull request #106 from wrewolf/patch-1
Added support draft pull request for github
2 parents 1f42c84 + ee81f21 commit 9d685f3

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

github/github_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ func TestWebhooks(t *testing.T) {
420420
filename: "../testdata/github/pull-request.json",
421421
headers: http.Header{
422422
"X-Github-Event": []string{"pull_request"},
423-
"X-Hub-Signature": []string{"sha1=35712c8d2bc197b7d07621dcf20d2fb44620508f"},
423+
"X-Hub-Signature": []string{"sha1=88972f972db301178aa13dafaf112d26416a15e6"},
424424
},
425425
},
426426
{

github/payload.go

+1
Original file line numberDiff line numberDiff line change
@@ -3590,6 +3590,7 @@ type PullRequestPayload struct {
35903590
Assignee *Assignee `json:"assignee"`
35913591
Assignees []*Assignee `json:"assignees"`
35923592
Milestone *Milestone `json:"milestone"`
3593+
Draft bool `json:"draft"`
35933594
CommitsURL string `json:"commits_url"`
35943595
ReviewCommentsURL string `json:"review_comments_url"`
35953596
ReviewCommentURL string `json:"review_comment_url"`

testdata/github/pull-request.json

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"merge_commit_sha": null,
4040
"assignee": null,
4141
"milestone": null,
42+
"draft": false,
4243
"commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits",
4344
"review_comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments",
4445
"review_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}",

0 commit comments

Comments
 (0)