Skip to content

Commit 52c5f60

Browse files
committed
Convert pulls
1 parent 893767d commit 52c5f60

2 files changed

Lines changed: 50 additions & 73 deletions

File tree

content/v3/pulls.md

Lines changed: 31 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -19,38 +19,26 @@ can read more about the use of media types in the API
1919

2020
Pull Requests have these possible link relations:
2121

22-
`self`
23-
: The API location of this Pull Request.
24-
25-
`html`
26-
: The HTML location of this Pull Request.
27-
28-
`comments`
29-
: The API location of this Pull Request's Issue comments.
30-
31-
`review_comments`
32-
: The API location of this Pull Request's Review comments.
33-
34-
`statuses`
35-
: The API location of this Pull Request's commit statuses, which are the statuses of its `head` branch.
22+
Name | Description
23+
-----|-----------|
24+
`self`| The API location of this Pull Request.
25+
`html`| The HTML location of this Pull Request.
26+
`comments`| The API location of this Pull Request's Issue comments.
27+
`review_comments`| The API location of this Pull Request's Review comments.
28+
`statuses`| The API location of this Pull Request's commit statuses, which are the statuses of its `head` branch.
3629

3730
## List pull requests
3831

3932
GET /repos/:owner/:repo/pulls
4033

4134
### Parameters
4235

43-
state
44-
: _Optional_ **string** - `open` or `closed` to filter by state. Default
45-
is `open`.
46-
47-
head
48-
: _Optional_ **string** - Filter pulls by head user and branch name in the format
49-
of: `user:ref-name`. Example: `github:new-script-format`.
36+
Name | Type | Description | Required? | Default
37+
-----|------|--------------|----------|---------
38+
`state`|`string` | Either `open` or `closed` to filter by state. | |`open`
39+
`head`|`string` | Filter pulls by head user and branch name in the format of `user:ref-name`. Example: `github:new-script-format`.| |
40+
`base`|`string` | Filter pulls by base branch name. Example: `gh-pages`.| |
5041

51-
base
52-
: _Optional_ **string** - Filter pulls by base branch name. Example:
53-
`gh-pages`.
5442

5543
### Response
5644

@@ -86,20 +74,13 @@ Pass the appropriate [media type](/v3/media/#commits-commit-comparison-and-pull-
8674

8775
### Input
8876

89-
title
90-
: _Required_ **string**
77+
Name | Type | Description | Required? | Default
78+
-----|------|--------------|----------|---------
79+
`title`|`string` | The title of the pull request.|**YES**|
80+
`body`|`string` | The contents of the pull request.| |
81+
`base`|`string` | The branch (or git ref) you want your changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repo that requests a merge to a base of another repo.|**YES**|
82+
`head`|`string` | The branch (or git ref) where your changes are implemented.|**YES**|
9183

92-
body
93-
: _Optional_ **string**
94-
95-
base
96-
: _Required_ **string** - The branch (or git ref) you want your changes pulled into.
97-
This should be an existing branch on the current repository. You cannot
98-
submit a pull request to one repo that requests a merge to a base of
99-
another repo.
100-
101-
head
102-
: _Required_ **string** - The branch (or git ref) where your changes are implemented.
10384

10485
NOTE: `head` and `base` can be either a sha or a branch name. Typically you
10586
would namespace `head` with a user like this: `username:branch`.
@@ -116,9 +97,10 @@ would namespace `head` with a user like this: `username:branch`.
11697
You can also create a Pull Request from an existing Issue by passing an
11798
Issue number instead of `title` and `body`.
11899

119-
issue
120-
: _Required_ **number** - Issue number in this repository to turn into a
121-
Pull Request.
100+
Name | Type | Description | Required? | Default
101+
-----|------|--------------|----------|---------
102+
`issue`|`number` | The issue number in this repository to turn into a Pull Request.|**YES**|
103+
122104

123105
<%= json \
124106
:issue => "5",
@@ -137,15 +119,12 @@ Pull Request.
137119

138120
### Input
139121

140-
title
141-
: _Optional_ **string**
122+
Name | Type | Description | Required? | Default
123+
-----|------|--------------|----------|---------
124+
`title`|`string` | The title of the pull request.| |
125+
`body`|`string` | The contents of the pull request.| |
126+
`state`|`string` | State of this Pull Request. Either `open` or `closed`.| |
142127

143-
body
144-
: _Optional_ **string**
145-
146-
state
147-
: _Optional_ **string** - State of this Pull Request. Valid values are
148-
`open` and `closed`.
149128

150129
<%= json \
151130
:title => "new title",
@@ -194,8 +173,10 @@ state
194173

195174
### Input
196175

197-
commit\_message
198-
: _Optional_ **string** - The message that will be used for the merge commit
176+
Name | Type | Description | Required? | Default
177+
-----|------|--------------|----------|---------
178+
`commit_message`|`string` | The message that will be used for the merge commit| |
179+
199180

200181
### Response if merge was successful
201182

content/v3/pulls/comments.md

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,12 @@ By default, Review Comments are ordered by ascending ID.
3333

3434
### Parameters
3535

36-
sort
37-
: _Optional_ **String** `created` or `updated`
36+
Name | Type | Description | Required? | Default
37+
-----|------|--------------|----------|---------
38+
`sort`|`string` | Can be either `created` or `updated`| |
39+
`direction`|`string` | Can be either `asc` or `desc`. Ignored without `sort` parameter.| |
40+
`since`|`string` | A timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Only comments updated at or after this time are returned.| |
3841

39-
direction
40-
: _Optional_ **String** `asc` or `desc`. Ignored without `sort` parameter.
41-
42-
since
43-
: _Optional_ **String** of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
4442

4543
### Response
4644

@@ -62,17 +60,13 @@ since
6260

6361
### Input
6462

65-
body
66-
: _Required_ **string**
67-
68-
commit_id
69-
: _Required_ **string** - Sha of the commit to comment on.
63+
Name | Type | Description | Required? | Default
64+
-----|------|--------------|----------|---------
65+
`body`|`string` | The text of the comment|**YES**|
66+
`commit_id`|`string` | The SHA of the commit to comment on.|**YES**|
67+
`path`|`string` | The relative path of the file to comment on.|**YES**|
68+
`position`|`number` | The line index in the diff to comment on.|**YES**|
7069

71-
path
72-
: _Required_ **string** - Relative path of the file to comment on.
73-
74-
position
75-
: _Required_ **number** - Line index in the diff to comment on.
7670

7771
#### Example
7872

@@ -88,11 +82,11 @@ position
8882
Instead of passing `commit_id`, `path`, and `position` you can reply to
8983
an existing Pull Request Comment like this:
9084

91-
body
92-
: _Required_ **string**
85+
Name | Type | Description | Required? | Default
86+
-----|------|--------------|----------|---------
87+
`body`|`string` | The text of the comment|**YES**|
88+
`in_reply_to`|`number` | The comment id to reply to.|**YES**|
9389

94-
in_reply_to
95-
: _Required_ **number** - Comment id to reply to.
9690

9791
#### Example
9892

@@ -114,8 +108,10 @@ in_reply_to
114108

115109
### Input
116110

117-
body
118-
: _Required_ **string**
111+
Name | Type | Description | Required? | Default
112+
-----|------|--------------|----------|---------
113+
`body`|`string` | The text of the comment|**YES**|
114+
119115

120116
#### Example
121117

0 commit comments

Comments
 (0)