Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commite34c209

Browse files
committed
Merge pull request#535 from github/update-date
Sync changes from upstream repository
2 parents1cb3eb1 +7c7ad66 commite34c209

File tree

4 files changed

+50
-13
lines changed

4 files changed

+50
-13
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
kind:change
3+
title:Improved CI support for the Deployments API
4+
created_at:2014-06-11
5+
author_name:atmos
6+
---
7+
8+
Today we're making a few minor changes to the[Deployments API preview][2]. With the introduction of[combined statuses][4] in a[recent update][3], we noticed a few inconsistencies with the API that we'd like to remedy.
9+
10+
We're introducing a new parameter called`required_contexts`. This parameter accepts an array of named[commit status][5] contexts that are ensured to be in a "success" state before the deployment is created. This allows you to verify that more than one system verified your code before you deploy it.
11+
12+
We've removed support for the`force` parameter. The force parameter existed to bypass both the auto-merge and commit status checks. The same behavior can now be accomplished by setting`auto_merge` and`required_contexts` appropriately.
13+
14+
We're also setting a context for all[commit statuses][5]. If a commit status is created without a context, we'll now set it to the string "default".
15+
16+
If you have any questions or concerns,[drop us a line][1].
17+
18+
[1]:https://github.com/contact?form[subject]=Deployments+API
19+
[2]:https://developer.github.com/changes/2014-01-09-preview-the-new-deployments-api/
20+
[3]:https://developer.github.com/changes/2014-04-10-deployment-api-preview-extension/
21+
[4]:https://developer.github.com/changes/2014-03-27-combined-status-api/
22+
[5]:https://developer.github.com/v3/repos/statuses/

‎content/v3/repos/deployments.md‎

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -97,22 +97,15 @@ Users with pull access can view deployments for a repository:
9797

9898
##Create a Deployment
9999

100-
If your repository is taking advantage of[commit statuses](/v3/repos/statuses),
101-
the API will reject requests that do not have a successful[combined
102-
status.](/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref) (Your
103-
repository is not required to use commit statuses. If no commit statuses are
104-
present, the deployment will always be created.)
105-
106-
The`force` parameter can be used when you really just need a deployment to go
107-
out. In these cases, all checks are bypassed, and the deployment is created for
108-
the ref.
109100

110101
The`auto_merge` parameter is used to ensure that the requested ref is not
111102
behind the repository's default branch. If the ref*is* behind the default
112103
branch for the repository, we will attempt to merge it for you. If the merge
113104
succeeds, the API will return a successful merge commit. If merge conflicts
114105
prevent the merge from succeeding, the API will return a failure response.
115106

107+
By default,[commit statuses](/v3/repos/statuses) for every submitted context must be in a 'success' state. The`required_contexts` parameter allows you to specify a subset of contexts that must be "success", or to specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do not require any contexts or create any commit statuses, the deployment will always succeed.
108+
116109
The`payload` parameter is available for any extra information that a
117110
deployment system might need. It is a JSON text field that will be passed on
118111
when a deployment event is dispatched.
@@ -126,13 +119,16 @@ Users with push access can create a deployment for a given ref:
126119
Name | Type | Description
127120
-----|------|--------------
128121
`ref`|`string`|**Required**. The ref to deploy. This can be a branch, tag, or sha.
129-
`force`|`boolean`| Optional parameter to bypass any ahead/behind checks or commit status checks. Default:`false`
122+
`auto_merge`|`boolean`| Optional parameter to merge the default branch into the requested ref if it is behind the default branch. Default:`true`
123+
`required_contexts`|`Array`| Optional array of status contexts verified against commit status checks. If this parameter is omitted from the parameters then all unique contexts will be verified before a deployment is created. To bypass checking entirely pass an empty array. Defaults to all unique contexts.
130124
`payload`|`string` | Optional JSON payload with extra information about the deployment. Default:`""`
131125
`environment`|`string` | Optional name for the target deployment environment (e.g., production, staging, qa). Default:`"production"`
132-
`auto_merge`|`boolean`| Optional parameter to merge the default branch into the requested deployment branch if necessary. Default:`false`
133126
`description`|`string` | Optional short description. Default:`""`
134127

135-
####Example
128+
####Simple Example
129+
130+
A simple example putting the user and room into the payload to notify back to
131+
chat networks.
136132

137133
<%= json\
138134
:ref => "topic-branch",
@@ -145,6 +141,23 @@ Name | Type | Description
145141
'https://api.github.com/repos/octocat/example/deployments/1' %>
146142
<%= json:deployment %>
147143

144+
####Advanced Example
145+
146+
A more advanced example specifying required commit statuses and bypassing auto-merging.
147+
148+
<%= json\
149+
:ref => "topic-branch",
150+
:auto_merge => false,
151+
:payload => "{\"user\":\"atmos\",\"room_id\":123456}",
152+
:description => "Deploying my sweet branch",
153+
:required_contexts =>["ci/janky", "security/brakeman"]
154+
%>
155+
156+
<%= headers 201,
157+
:Location =>
158+
'https://api.github.com/repos/octocat/example/deployments/2' %>
159+
<%= json:deployment %>
160+
148161
##Update a Deployment
149162

150163
Once a deployment is created, it cannot be updated. Information relating to the

‎content/v3/repos/statuses.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Name | Type | Description
3838
`state`|`string` |**Required**. The state of the status. Can be one of`pending`,`success`,`error`, or`failure`.
3939
`target_url`|`string` | The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the 'source' of the Status.<br/>For example, if your Continuous Integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA:<br/>`http://ci.example.com/user/repo/build/sha`.
4040
`description`|`string` | A short description of the status.
41-
`context`|`string` | A string label to differentiate this status from the status of other systems.
41+
`context`|`string` | A string label to differentiate this status from the status of other systems. Default:`"default"`
4242

4343
####Example
4444

‎content/v3/search.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ The `q` search term can also contain any combination of the supported issue sear
239239
Filters issues based on date of creation, or when they were last updated.
240240
*[`merged`](https://help.github.com/articles/searching-issues#merged)
241241
Filters pull requests based on the date when they were merged.
242+
*[`closed`](https://help.github.com/articles/searching-issues#closed)
243+
Filters issues based on the date when they were closed.
242244
*[`comments`](https://help.github.com/articles/searching-issues#comments)
243245
Filters issues based on the quantity of comments.
244246
*[`user` or`repo`](https://help.github.com/articles/searching-issues#users-organizations-and-repositories)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp