Skip to content

Commit f4ae869

Browse files
committed
Add pull request filter by head and base
According to https://developer.github.com/v3/pulls/#list-pull-requests we can now filter PR by head and base.
1 parent f841677 commit f4ae869

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

api/v3.0.0/pullRequests.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ var pullRequests = module.exports = {
3030
* - user (String): Required.
3131
* - repo (String): Required.
3232
* - state (String): Optional. open, closed, or all Validation rule: ` ^(open|closed|all)$ `.
33+
* - head (String): Optional. Filter pulls by head user and branch name in the format of user:ref-name. Example: github:new-script-format.
34+
* - base (String): Optional. Filter pulls by base branch name. Example: gh-pages.
3335
* - page (Number): Optional. Page number of the results to fetch. Validation rule: ` ^[0-9]+$ `.
3436
* - per_page (Number): Optional. A custom page size up to 100. Default is 30. Validation rule: ` ^[0-9]+$ `.
3537
* - sort (String): Optional. Possible values are: `created`, `updated`, `popularity`, `long-running`, Default: `created` Validation rule: ` ^(created|updated|popularity|long-running)$ `.

api/v3.0.0/pullRequestsTest.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ describe("[pullRequests]", function() {
3131
{
3232
user: "String",
3333
repo: "String",
34+
base: "String",
35+
head: "String",
3436
state: "String",
3537
page: "Number",
3638
per_page: "Number"

api/v3.0.0/routes.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,6 +1617,8 @@
16171617
"invalidmsg": "open, closed, all, default: open",
16181618
"description": "open, closed, or all"
16191619
},
1620+
"$head": null,
1621+
"$base": null,
16201622
"$page": null,
16211623
"$per_page": null,
16221624
"sort": {

0 commit comments

Comments
 (0)