@templmf/temp-solf-lmf 0.0.109 → 0.0.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package//347/247/273/345/212/250/345/272/224/347/224/250/351/235/236/347/256/241/347/220/206/345/221/230/351/205/215/347/275/256/350/247/222/350/211/262/346/270/205/345/215/225.xlsx +0 -0
- package/gitlab-foss-8-17-stable/doc/api/README.md +0 -391
- package/gitlab-foss-8-17-stable/doc/api/access_requests.md +0 -139
- package/gitlab-foss-8-17-stable/doc/api/award_emoji.md +0 -374
- package/gitlab-foss-8-17-stable/doc/api/boards.md +0 -241
- package/gitlab-foss-8-17-stable/doc/api/branches.md +0 -260
- package/gitlab-foss-8-17-stable/doc/api/broadcast_messages.md +0 -154
- package/gitlab-foss-8-17-stable/doc/api/build_triggers.md +0 -118
- package/gitlab-foss-8-17-stable/doc/api/build_variables.md +0 -128
- package/gitlab-foss-8-17-stable/doc/api/builds.md +0 -610
- package/gitlab-foss-8-17-stable/doc/api/ci/README.md +0 -24
- package/gitlab-foss-8-17-stable/doc/api/ci/builds.md +0 -147
- package/gitlab-foss-8-17-stable/doc/api/ci/lint.md +0 -49
- package/gitlab-foss-8-17-stable/doc/api/ci/runners.md +0 -59
- package/gitlab-foss-8-17-stable/doc/api/commits.md +0 -479
- package/gitlab-foss-8-17-stable/doc/api/deploy_key_multiple_projects.md +0 -29
- package/gitlab-foss-8-17-stable/doc/api/deploy_keys.md +0 -216
- package/gitlab-foss-8-17-stable/doc/api/deployments.md +0 -218
- package/gitlab-foss-8-17-stable/doc/api/enviroments.md +0 -121
- package/gitlab-foss-8-17-stable/doc/api/groups.md +0 -484
- package/gitlab-foss-8-17-stable/doc/api/issues.md +0 -856
- package/gitlab-foss-8-17-stable/doc/api/keys.md +0 -46
- package/gitlab-foss-8-17-stable/doc/api/labels.md +0 -257
- package/gitlab-foss-8-17-stable/doc/api/members.md +0 -175
- package/gitlab-foss-8-17-stable/doc/api/merge_requests.md +0 -1158
- package/gitlab-foss-8-17-stable/doc/api/milestones.md +0 -105
- package/gitlab-foss-8-17-stable/doc/api/namespaces.md +0 -70
- package/gitlab-foss-8-17-stable/doc/api/notes.md +0 -407
- package/gitlab-foss-8-17-stable/doc/api/notification_settings.md +0 -177
- package/gitlab-foss-8-17-stable/doc/api/oauth2.md +0 -137
- package/gitlab-foss-8-17-stable/doc/api/pipelines.md +0 -259
- package/gitlab-foss-8-17-stable/doc/api/project_snippets.md +0 -118
- package/gitlab-foss-8-17-stable/doc/api/projects.md +0 -1402
- package/gitlab-foss-8-17-stable/doc/api/repositories.md +0 -200
- package/gitlab-foss-8-17-stable/doc/api/repository_files.md +0 -134
- package/gitlab-foss-8-17-stable/doc/api/runners.md +0 -322
- package/gitlab-foss-8-17-stable/doc/api/services.md +0 -812
- package/gitlab-foss-8-17-stable/doc/api/session.md +0 -56
- package/gitlab-foss-8-17-stable/doc/api/settings.md +0 -126
- package/gitlab-foss-8-17-stable/doc/api/sidekiq_metrics.md +0 -152
- package/gitlab-foss-8-17-stable/doc/api/snippets.md +0 -232
- package/gitlab-foss-8-17-stable/doc/api/system_hooks.md +0 -146
- package/gitlab-foss-8-17-stable/doc/api/tags.md +0 -191
- package/gitlab-foss-8-17-stable/doc/api/templates/gitignores.md +0 -579
- package/gitlab-foss-8-17-stable/doc/api/templates/gitlab_ci_ymls.md +0 -120
- package/gitlab-foss-8-17-stable/doc/api/templates/licenses.md +0 -147
- package/gitlab-foss-8-17-stable/doc/api/todos.md +0 -296
- package/gitlab-foss-8-17-stable/doc/api/users.md +0 -835
- package/gitlab-foss-8-17-stable/doc/api/v3_to_v4.md +0 -14
- package/gitlab-foss-8-17-stable/doc/api/version.md +0 -23
|
@@ -1,479 +0,0 @@
|
|
|
1
|
-
# Commits API
|
|
2
|
-
|
|
3
|
-
## List repository commits
|
|
4
|
-
|
|
5
|
-
Get a list of repository commits in a project.
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
GET /projects/:id/repository/commits
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
| Attribute | Type | Required | Description |
|
|
12
|
-
| --------- | ---- | -------- | ----------- |
|
|
13
|
-
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user
|
|
14
|
-
| `ref_name` | string | no | The name of a repository branch or tag or if not given the default branch |
|
|
15
|
-
| `since` | string | no | Only commits after or in this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ |
|
|
16
|
-
| `until` | string | no | Only commits before or in this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ |
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/commits"
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Example response:
|
|
23
|
-
|
|
24
|
-
```json
|
|
25
|
-
[
|
|
26
|
-
{
|
|
27
|
-
"id": "ed899a2f4b50b4370feeea94676502b42383c746",
|
|
28
|
-
"short_id": "ed899a2f4b5",
|
|
29
|
-
"title": "Replace sanitize with escape once",
|
|
30
|
-
"author_name": "Dmitriy Zaporozhets",
|
|
31
|
-
"author_email": "dzaporozhets@sphereconsultinginc.com",
|
|
32
|
-
"committer_name": "Administrator",
|
|
33
|
-
"committer_email": "admin@example.com",
|
|
34
|
-
"created_at": "2012-09-20T11:50:22+03:00",
|
|
35
|
-
"message": "Replace sanitize with escape once",
|
|
36
|
-
"allow_failure": false
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"id": "6104942438c14ec7bd21c6cd5bd995272b3faff6",
|
|
40
|
-
"short_id": "6104942438c",
|
|
41
|
-
"title": "Sanitize for network graph",
|
|
42
|
-
"author_name": "randx",
|
|
43
|
-
"author_email": "dmitriy.zaporozhets@gmail.com",
|
|
44
|
-
"committer_name": "Dmitriy",
|
|
45
|
-
"committer_email": "dmitriy.zaporozhets@gmail.com",
|
|
46
|
-
"created_at": "2012-09-20T09:06:12+03:00",
|
|
47
|
-
"message": "Sanitize for network graph",
|
|
48
|
-
"allow_failure": false
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Create a commit with multiple files and actions
|
|
54
|
-
|
|
55
|
-
> [Introduced][ce-6096] in GitLab 8.13.
|
|
56
|
-
|
|
57
|
-
Create a commit by posting a JSON payload
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
POST /projects/:id/repository/commits
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
| Attribute | Type | Required | Description |
|
|
64
|
-
| --------- | ---- | -------- | ----------- |
|
|
65
|
-
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME |
|
|
66
|
-
| `branch_name` | string | yes | The name of a branch |
|
|
67
|
-
| `commit_message` | string | yes | Commit message |
|
|
68
|
-
| `actions[]` | array | yes | An array of action hashes to commit as a batch. See the next table for what attributes it can take. |
|
|
69
|
-
| `author_email` | string | no | Specify the commit author's email address |
|
|
70
|
-
| `author_name` | string | no | Specify the commit author's name |
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
| `actions[]` Attribute | Type | Required | Description |
|
|
74
|
-
| --------------------- | ---- | -------- | ----------- |
|
|
75
|
-
| `action` | string | yes | The action to perform, `create`, `delete`, `move`, `update` |
|
|
76
|
-
| `file_path` | string | yes | Full path to the file. Ex. `lib/class.rb` |
|
|
77
|
-
| `previous_path` | string | no | Original full path to the file being moved. Ex. `lib/class1.rb` |
|
|
78
|
-
| `content` | string | no | File content, required for all except `delete`. Optional for `move` |
|
|
79
|
-
| `encoding` | string | no | `text` or `base64`. `text` is default. |
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
PAYLOAD=$(cat << 'JSON'
|
|
83
|
-
{
|
|
84
|
-
"branch_name": "master",
|
|
85
|
-
"commit_message": "some commit message",
|
|
86
|
-
"actions": [
|
|
87
|
-
{
|
|
88
|
-
"action": "create",
|
|
89
|
-
"file_path": "foo/bar",
|
|
90
|
-
"content": "some content"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"action": "delete",
|
|
94
|
-
"file_path": "foo/bar2",
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"action": "move",
|
|
98
|
-
"file_path": "foo/bar3",
|
|
99
|
-
"previous_path": "foo/bar4",
|
|
100
|
-
"content": "some content"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"action": "update",
|
|
104
|
-
"file_path": "foo/bar5",
|
|
105
|
-
"content": "new content"
|
|
106
|
-
}
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
JSON
|
|
110
|
-
)
|
|
111
|
-
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --header "Content-Type: application/json" --data "$PAYLOAD" https://gitlab.example.com/api/v3/projects/1/repository/commits
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Example response:
|
|
115
|
-
```json
|
|
116
|
-
{
|
|
117
|
-
"id": "ed899a2f4b50b4370feeea94676502b42383c746",
|
|
118
|
-
"short_id": "ed899a2f4b5",
|
|
119
|
-
"title": "some commit message",
|
|
120
|
-
"author_name": "Dmitriy Zaporozhets",
|
|
121
|
-
"author_email": "dzaporozhets@sphereconsultinginc.com",
|
|
122
|
-
"committer_name": "Dmitriy Zaporozhets",
|
|
123
|
-
"committer_email": "dzaporozhets@sphereconsultinginc.com",
|
|
124
|
-
"created_at": "2016-09-20T09:26:24.000-07:00",
|
|
125
|
-
"message": "some commit message",
|
|
126
|
-
"parent_ids": [
|
|
127
|
-
"ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba"
|
|
128
|
-
],
|
|
129
|
-
"committed_date": "2016-09-20T09:26:24.000-07:00",
|
|
130
|
-
"authored_date": "2016-09-20T09:26:24.000-07:00",
|
|
131
|
-
"stats": {
|
|
132
|
-
"additions": 2,
|
|
133
|
-
"deletions": 2,
|
|
134
|
-
"total": 4
|
|
135
|
-
},
|
|
136
|
-
"status": null
|
|
137
|
-
}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
## Get a single commit
|
|
141
|
-
|
|
142
|
-
Get a specific commit identified by the commit hash or name of a branch or tag.
|
|
143
|
-
|
|
144
|
-
```
|
|
145
|
-
GET /projects/:id/repository/commits/:sha
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Parameters:
|
|
149
|
-
|
|
150
|
-
| Attribute | Type | Required | Description |
|
|
151
|
-
| --------- | ---- | -------- | ----------- |
|
|
152
|
-
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user
|
|
153
|
-
| `sha` | string | yes | The commit hash or name of a repository branch or tag |
|
|
154
|
-
|
|
155
|
-
```bash
|
|
156
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/commits/master
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
Example response:
|
|
160
|
-
|
|
161
|
-
```json
|
|
162
|
-
{
|
|
163
|
-
"id": "6104942438c14ec7bd21c6cd5bd995272b3faff6",
|
|
164
|
-
"short_id": "6104942438c",
|
|
165
|
-
"title": "Sanitize for network graph",
|
|
166
|
-
"author_name": "randx",
|
|
167
|
-
"author_email": "dmitriy.zaporozhets@gmail.com",
|
|
168
|
-
"committer_name": "Dmitriy",
|
|
169
|
-
"committer_email": "dmitriy.zaporozhets@gmail.com",
|
|
170
|
-
"created_at": "2012-09-20T09:06:12+03:00",
|
|
171
|
-
"message": "Sanitize for network graph",
|
|
172
|
-
"committed_date": "2012-09-20T09:06:12+03:00",
|
|
173
|
-
"authored_date": "2012-09-20T09:06:12+03:00",
|
|
174
|
-
"parent_ids": [
|
|
175
|
-
"ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba"
|
|
176
|
-
],
|
|
177
|
-
"stats": {
|
|
178
|
-
"additions": 15,
|
|
179
|
-
"deletions": 10,
|
|
180
|
-
"total": 25
|
|
181
|
-
},
|
|
182
|
-
"status": "running"
|
|
183
|
-
}
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
## Cherry pick a commit
|
|
187
|
-
|
|
188
|
-
> [Introduced][ce-8047] in GitLab 8.15.
|
|
189
|
-
|
|
190
|
-
Cherry picks a commit to a given branch.
|
|
191
|
-
|
|
192
|
-
```
|
|
193
|
-
POST /projects/:id/repository/commits/:sha/cherry_pick
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
Parameters:
|
|
197
|
-
|
|
198
|
-
| Attribute | Type | Required | Description |
|
|
199
|
-
| --------- | ---- | -------- | ----------- |
|
|
200
|
-
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user
|
|
201
|
-
| `sha` | string | yes | The commit hash |
|
|
202
|
-
| `branch` | string | yes | The name of the branch |
|
|
203
|
-
|
|
204
|
-
```bash
|
|
205
|
-
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form "branch=master" "https://gitlab.example.com/api/v3/projects/5/repository/commits/master/cherry_pick"
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
Example response:
|
|
209
|
-
|
|
210
|
-
```json
|
|
211
|
-
{
|
|
212
|
-
"id": "8b090c1b79a14f2bd9e8a738f717824ff53aebad",
|
|
213
|
-
"short_id": "8b090c1b",
|
|
214
|
-
"title": "Feature added",
|
|
215
|
-
"author_name": "Dmitriy Zaporozhets",
|
|
216
|
-
"author_email": "dmitriy.zaporozhets@gmail.com",
|
|
217
|
-
"created_at": "2016-12-12T20:10:39.000+01:00",
|
|
218
|
-
"committer_name": "Administrator",
|
|
219
|
-
"committer_email": "admin@example.com",
|
|
220
|
-
"message": "Feature added\n\nSigned-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>\n"
|
|
221
|
-
}
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
## Get the diff of a commit
|
|
225
|
-
|
|
226
|
-
Get the diff of a commit in a project.
|
|
227
|
-
|
|
228
|
-
```
|
|
229
|
-
GET /projects/:id/repository/commits/:sha/diff
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
Parameters:
|
|
233
|
-
|
|
234
|
-
| Attribute | Type | Required | Description |
|
|
235
|
-
| --------- | ---- | -------- | ----------- |
|
|
236
|
-
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user
|
|
237
|
-
| `sha` | string | yes | The commit hash or name of a repository branch or tag |
|
|
238
|
-
|
|
239
|
-
```bash
|
|
240
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/commits/master/diff"
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
Example response:
|
|
244
|
-
|
|
245
|
-
```json
|
|
246
|
-
[
|
|
247
|
-
{
|
|
248
|
-
"diff": "--- a/doc/update/5.4-to-6.0.md\n+++ b/doc/update/5.4-to-6.0.md\n@@ -71,6 +71,8 @@\n sudo -u git -H bundle exec rake migrate_keys RAILS_ENV=production\n sudo -u git -H bundle exec rake migrate_inline_notes RAILS_ENV=production\n \n+sudo -u git -H bundle exec rake gitlab:assets:compile RAILS_ENV=production\n+\n ```\n \n ### 6. Update config files",
|
|
249
|
-
"new_path": "doc/update/5.4-to-6.0.md",
|
|
250
|
-
"old_path": "doc/update/5.4-to-6.0.md",
|
|
251
|
-
"a_mode": null,
|
|
252
|
-
"b_mode": "100644",
|
|
253
|
-
"new_file": false,
|
|
254
|
-
"renamed_file": false,
|
|
255
|
-
"deleted_file": false
|
|
256
|
-
}
|
|
257
|
-
]
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
## Get the comments of a commit
|
|
261
|
-
|
|
262
|
-
Get the comments of a commit in a project.
|
|
263
|
-
|
|
264
|
-
```
|
|
265
|
-
GET /projects/:id/repository/commits/:sha/comments
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
Parameters:
|
|
269
|
-
|
|
270
|
-
| Attribute | Type | Required | Description |
|
|
271
|
-
| --------- | ---- | -------- | ----------- |
|
|
272
|
-
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user
|
|
273
|
-
| `sha` | string | yes | The commit hash or name of a repository branch or tag |
|
|
274
|
-
|
|
275
|
-
```bash
|
|
276
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/commits/master/comments"
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
Example response:
|
|
280
|
-
|
|
281
|
-
```json
|
|
282
|
-
[
|
|
283
|
-
{
|
|
284
|
-
"note": "this code is really nice",
|
|
285
|
-
"author": {
|
|
286
|
-
"id": 11,
|
|
287
|
-
"username": "admin",
|
|
288
|
-
"email": "admin@local.host",
|
|
289
|
-
"name": "Administrator",
|
|
290
|
-
"state": "active",
|
|
291
|
-
"created_at": "2014-03-06T08:17:35.000Z"
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
]
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
## Post comment to commit
|
|
298
|
-
|
|
299
|
-
Adds a comment to a commit.
|
|
300
|
-
|
|
301
|
-
In order to post a comment in a particular line of a particular file, you must
|
|
302
|
-
specify the full commit SHA, the `path`, the `line` and `line_type` should be
|
|
303
|
-
`new`.
|
|
304
|
-
|
|
305
|
-
The comment will be added at the end of the last commit if at least one of the
|
|
306
|
-
cases below is valid:
|
|
307
|
-
|
|
308
|
-
- the `sha` is instead a branch or a tag and the `line` or `path` are invalid
|
|
309
|
-
- the `line` number is invalid (does not exist)
|
|
310
|
-
- the `path` is invalid (does not exist)
|
|
311
|
-
|
|
312
|
-
In any of the above cases, the response of `line`, `line_type` and `path` is
|
|
313
|
-
set to `null`.
|
|
314
|
-
|
|
315
|
-
```
|
|
316
|
-
POST /projects/:id/repository/commits/:sha/comments
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
| Attribute | Type | Required | Description |
|
|
320
|
-
| --------- | ---- | -------- | ----------- |
|
|
321
|
-
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user
|
|
322
|
-
| `sha` | string | yes | The commit SHA or name of a repository branch or tag |
|
|
323
|
-
| `note` | string | yes | The text of the comment |
|
|
324
|
-
| `path` | string | no | The file path relative to the repository |
|
|
325
|
-
| `line` | integer | no | The line number where the comment should be placed |
|
|
326
|
-
| `line_type` | string | no | The line type. Takes `new` or `old` as arguments |
|
|
327
|
-
|
|
328
|
-
```bash
|
|
329
|
-
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form "note=Nice picture man\!" --form "path=dudeism.md" --form "line=11" --form "line_type=new" https://gitlab.example.com/api/v3/projects/17/repository/commits/18f3e63d05582537db6d183d9d557be09e1f90c8/comments
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
Example response:
|
|
333
|
-
|
|
334
|
-
```json
|
|
335
|
-
{
|
|
336
|
-
"author" : {
|
|
337
|
-
"web_url" : "https://gitlab.example.com/thedude",
|
|
338
|
-
"avatar_url" : "https://gitlab.example.com/uploads/user/avatar/28/The-Big-Lebowski-400-400.png",
|
|
339
|
-
"username" : "thedude",
|
|
340
|
-
"state" : "active",
|
|
341
|
-
"name" : "Jeff Lebowski",
|
|
342
|
-
"id" : 28
|
|
343
|
-
},
|
|
344
|
-
"created_at" : "2016-01-19T09:44:55.600Z",
|
|
345
|
-
"line_type" : "new",
|
|
346
|
-
"path" : "dudeism.md",
|
|
347
|
-
"line" : 11,
|
|
348
|
-
"note" : "Nice picture man!"
|
|
349
|
-
}
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
## Commit status
|
|
353
|
-
|
|
354
|
-
Since GitLab 8.1, this is the new commit status API.
|
|
355
|
-
|
|
356
|
-
### Get the status of a commit
|
|
357
|
-
|
|
358
|
-
Get the statuses of a commit in a project.
|
|
359
|
-
|
|
360
|
-
```
|
|
361
|
-
GET /projects/:id/repository/commits/:sha/statuses
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
| Attribute | Type | Required | Description |
|
|
365
|
-
| --------- | ---- | -------- | ----------- |
|
|
366
|
-
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user
|
|
367
|
-
| `sha` | string | yes | The commit SHA
|
|
368
|
-
| `ref` | string | no | The name of a repository branch or tag or, if not given, the default branch
|
|
369
|
-
| `stage` | string | no | Filter by [build stage](../ci/yaml/README.md#stages), e.g., `test`
|
|
370
|
-
| `name` | string | no | Filter by [job name](../ci/yaml/README.md#jobs), e.g., `bundler:audit`
|
|
371
|
-
| `all` | boolean | no | Return all statuses, not only the latest ones
|
|
372
|
-
|
|
373
|
-
```bash
|
|
374
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/17/repository/commits/18f3e63d05582537db6d183d9d557be09e1f90c8/statuses
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
Example response:
|
|
378
|
-
|
|
379
|
-
```json
|
|
380
|
-
[
|
|
381
|
-
...
|
|
382
|
-
|
|
383
|
-
{
|
|
384
|
-
"status" : "pending",
|
|
385
|
-
"created_at" : "2016-01-19T08:40:25.934Z",
|
|
386
|
-
"started_at" : null,
|
|
387
|
-
"name" : "bundler:audit",
|
|
388
|
-
"allow_failure" : true,
|
|
389
|
-
"author" : {
|
|
390
|
-
"username" : "thedude",
|
|
391
|
-
"state" : "active",
|
|
392
|
-
"web_url" : "https://gitlab.example.com/thedude",
|
|
393
|
-
"avatar_url" : "https://gitlab.example.com/uploads/user/avatar/28/The-Big-Lebowski-400-400.png",
|
|
394
|
-
"id" : 28,
|
|
395
|
-
"name" : "Jeff Lebowski"
|
|
396
|
-
},
|
|
397
|
-
"description" : null,
|
|
398
|
-
"sha" : "18f3e63d05582537db6d183d9d557be09e1f90c8",
|
|
399
|
-
"target_url" : "https://gitlab.example.com/thedude/gitlab-ce/builds/91",
|
|
400
|
-
"finished_at" : null,
|
|
401
|
-
"id" : 91,
|
|
402
|
-
"ref" : "master"
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
"started_at" : null,
|
|
406
|
-
"name" : "flay",
|
|
407
|
-
"allow_failure" : false,
|
|
408
|
-
"status" : "pending",
|
|
409
|
-
"created_at" : "2016-01-19T08:40:25.832Z",
|
|
410
|
-
"target_url" : "https://gitlab.example.com/thedude/gitlab-ce/builds/90",
|
|
411
|
-
"id" : 90,
|
|
412
|
-
"finished_at" : null,
|
|
413
|
-
"ref" : "master",
|
|
414
|
-
"sha" : "18f3e63d05582537db6d183d9d557be09e1f90c8",
|
|
415
|
-
"author" : {
|
|
416
|
-
"id" : 28,
|
|
417
|
-
"name" : "Jeff Lebowski",
|
|
418
|
-
"username" : "thedude",
|
|
419
|
-
"web_url" : "https://gitlab.example.com/thedude",
|
|
420
|
-
"state" : "active",
|
|
421
|
-
"avatar_url" : "https://gitlab.example.com/uploads/user/avatar/28/The-Big-Lebowski-400-400.png"
|
|
422
|
-
},
|
|
423
|
-
"description" : null
|
|
424
|
-
},
|
|
425
|
-
|
|
426
|
-
...
|
|
427
|
-
]
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
### Post the build status to a commit
|
|
431
|
-
|
|
432
|
-
Adds or updates a build status of a commit.
|
|
433
|
-
|
|
434
|
-
```
|
|
435
|
-
POST /projects/:id/statuses/:sha
|
|
436
|
-
```
|
|
437
|
-
|
|
438
|
-
| Attribute | Type | Required | Description |
|
|
439
|
-
| --------- | ---- | -------- | ----------- |
|
|
440
|
-
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user
|
|
441
|
-
| `sha` | string | yes | The commit SHA
|
|
442
|
-
| `state` | string | yes | The state of the status. Can be one of the following: `pending`, `running`, `success`, `failed`, `canceled`
|
|
443
|
-
| `ref` | string | no | The `ref` (branch or tag) to which the status refers
|
|
444
|
-
| `name` or `context` | string | no | The label to differentiate this status from the status of other systems. Default value is `default`
|
|
445
|
-
| `target_url` | string | no | The target URL to associate with this status
|
|
446
|
-
| `description` | string | no | The short description of the status
|
|
447
|
-
|
|
448
|
-
```bash
|
|
449
|
-
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/17/statuses/18f3e63d05582537db6d183d9d557be09e1f90c8?state=success"
|
|
450
|
-
```
|
|
451
|
-
|
|
452
|
-
Example response:
|
|
453
|
-
|
|
454
|
-
```json
|
|
455
|
-
{
|
|
456
|
-
"author" : {
|
|
457
|
-
"web_url" : "https://gitlab.example.com/thedude",
|
|
458
|
-
"name" : "Jeff Lebowski",
|
|
459
|
-
"avatar_url" : "https://gitlab.example.com/uploads/user/avatar/28/The-Big-Lebowski-400-400.png",
|
|
460
|
-
"username" : "thedude",
|
|
461
|
-
"state" : "active",
|
|
462
|
-
"id" : 28
|
|
463
|
-
},
|
|
464
|
-
"name" : "default",
|
|
465
|
-
"sha" : "18f3e63d05582537db6d183d9d557be09e1f90c8",
|
|
466
|
-
"status" : "success",
|
|
467
|
-
"description" : null,
|
|
468
|
-
"id" : 93,
|
|
469
|
-
"target_url" : null,
|
|
470
|
-
"ref" : null,
|
|
471
|
-
"started_at" : null,
|
|
472
|
-
"created_at" : "2016-01-19T09:05:50.355Z",
|
|
473
|
-
"allow_failure" : false,
|
|
474
|
-
"finished_at" : "2016-01-19T09:05:50.365Z"
|
|
475
|
-
}
|
|
476
|
-
```
|
|
477
|
-
|
|
478
|
-
[ce-6096]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6096 "Multi-file commit"
|
|
479
|
-
[ce-8047]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8047
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Adding deploy keys to multiple projects
|
|
2
|
-
|
|
3
|
-
If you want to easily add the same deploy key to multiple projects in the same
|
|
4
|
-
group, this can be achieved quite easily with the API.
|
|
5
|
-
|
|
6
|
-
First, find the ID of the projects you're interested in, by either listing all
|
|
7
|
-
projects:
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
curl --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v3/projects
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Or finding the ID of a group and then listing all projects in that group:
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
curl --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v3/groups
|
|
17
|
-
|
|
18
|
-
# For group 1234:
|
|
19
|
-
curl --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v3/groups/1234
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
With those IDs, add the same deploy key to all:
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
for project_id in 321 456 987; do
|
|
26
|
-
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --header "Content-Type: application/json" \
|
|
27
|
-
--data '{"title": "my key", "key": "ssh-rsa AAAA..."}' https://gitlab.example.com/api/v3/projects/${project_id}/deploy_keys
|
|
28
|
-
done
|
|
29
|
-
```
|