diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2019-09-11 09:06:33 +0000 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-09-11 09:06:33 +0000 |
commit | 48b98b5898e15ab4bb1db47e201fef8db68dc34d (patch) | |
tree | 70edcf4953d88d542243fe1d288ff249c02c9d9f /doc/api/merge_requests.md | |
parent | bfaa96d586668678893e295062495f2c35b73c2a (diff) | |
download | gitlab-ce-48b98b5898e15ab4bb1db47e201fef8db68dc34d.tar.gz |
Enables Run Pipeline button to be rendered
In the Merge Request view, under pipelines tab
the user can see a run pipeline button
Adds axios post request to button click
Adds the logic to handle the user click,
refresh the table and disable the button while thee
request is being made
Updates UI for desktop and mobile
Adds specs
Regenerates potfile
Follow-up after review
Uses .finally to avoid code repetition
Diffstat (limited to 'doc/api/merge_requests.md')
-rw-r--r-- | doc/api/merge_requests.md | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 0d030ef30c8..c7637ad23de 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -821,6 +821,66 @@ Parameters: ] ``` +## Create MR Pipeline + +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31722) in Gitlab 12.3. + +Create a new [pipeline for a merge request](../ci/merge_request_pipelines/index.md). A pipeline created via this endpoint will not run a regular branch/tag pipeline, it requires `.gitlab-ci.yml` to be configured with `only: [merge_requests]` to create jobs. + +The new pipeline can be: + +- A detached merge request pipeline. +- A [pipeline for merged results](../ci/merge_request_pipelines/pipelines_for_merged_results/index.md) + if the [project setting is enabled](../ci/merge_request_pipelines/pipelines_for_merged_results/index.md#enabling-pipelines-for-merged-results). + +``` +POST /projects/:id/merge_requests/:merge_request_iid/pipelines +``` + +Parameters: + +- `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) +- `merge_request_iid` (required) - The internal ID of the merge request + +```json +{ + "id": 2, + "sha": "b83d6e391c22777fca1ed3012fce84f633d7fed0", + "ref": "refs/merge-requests/1/head", + "status": "pending", + "web_url": "http://localhost/user1/project1/pipelines/2", + "before_sha": "0000000000000000000000000000000000000000", + "tag": false, + "yaml_errors": null, + "user": { + "id": 1, + "name": "John Doe1", + "username": "user1", + "state": "active", + "avatar_url": "https://www.gravatar.com/avatar/c922747a93b40d1ea88262bf1aebee62?s=80&d=identicon", + "web_url": "http://example.com" + }, + "created_at": "2019-09-04T19:20:18.267Z", + "updated_at": "2019-09-04T19:20:18.459Z", + "started_at": null, + "finished_at": null, + "committed_at": null, + "duration": null, + "coverage": null, + "detailed_status": { + "icon": "status_pending", + "text": "pending", + "label": "pending", + "group": "pending", + "tooltip": "pending", + "has_details": false, + "details_path": "/user1/project1/pipelines/2", + "illustration": null, + "favicon": "/assets/ci_favicons/favicon_status_pending-5bdf338420e5221ca24353b6bff1c9367189588750632e9a871b7af09ff6a2ae.png" + } +} +``` + ## Create MR Creates a new merge request. |