Skip to content
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit cb063a6

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent 7b0d321 commit cb063a6

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: API changes for changing the base branch on Pull Requests
3+
author_name: scottjg
4+
---
5+
GitHub recently added the ability to [change the base branch][blog post] on a Pull Request after it's created. Now we're updating the Pull Request API to enable the new functionality.
6+
7+
For example:
8+
9+
``` command-line
10+
curl "https://api.github.com/repos/github/hubot/pulls/123" \
11+
-H 'Authorization: token TOKEN' \
12+
-d '{ "base": "master" }'
13+
```
14+
15+
The Pull Request base will be updated to point to the master branch.
16+
17+
You can learn more about the new responses and endpoints in the updated [Pull Request][pulls] documentation.
18+
19+
If you have any questions or feedback, please [let us know][contact]!
20+
21+
22+
[pulls]: /v3/pulls
23+
[blog post]: https://github.com/blog/2224-change-the-base-branch-of-a-pull-request
24+
[contact]: https://github.com/contact?form%5Bsubject%5D=Change+base+on+Pull+Requests
25+

content/v3/pulls.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Name | Type | Description
8787
-----|------|-------------
8888
`title`|`string` | **Required**. The title of the pull request.
8989
`head`|`string` | **Required**. The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`.
90-
`base`|`string` | **Required**. The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository.
90+
`base`|`string` | **Required**. The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository.
9191
`body`|`string` | The contents of the pull request.
9292

9393

@@ -132,14 +132,18 @@ Name | Type | Description
132132
-----|------|--------------
133133
`title`|`string` | The title of the pull request.
134134
`body`|`string` | The contents of the pull request.
135-
`state`|`string` | State of this Pull Request. Either `open` or `closed`.
135+
`state`|`string` | State of this Pull Request. Either `open` or `closed`.{% if page.version == 'dotcom' or page.version >= 2.8 %}
136+
`base`|`string` | The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.
137+
{% endif %}
136138

137139
#### Example
138140

139141
<%= json \
140142
:title => "new title",
141143
:body => "updated body",
142-
:state => "open"
144+
:state => "open"{% if page.version == 'dotcom' or page.version >= 2.8 %},
145+
:base => "master"
146+
{% endif %}
143147
%>
144148

145149
### Response

0 commit comments

Comments
 (0)