Commit f4d0a23c authored by Alex Kalderimis's avatar Alex Kalderimis

Merge branch 'jivanvl-add-iid-pipeline-entity' into 'master'

Expose iid in the pipelines entity

See merge request gitlab-org/gitlab!67365
parents eb46b11c 6ec7689c
......@@ -7,6 +7,7 @@ class Ci::PipelineEntity < Grape::Entity
delegate :name, :failure_reason, to: :presented_pipeline
expose :id
expose :iid
expose :user, using: UserEntity
expose :active?, as: :active
......
......@@ -52,6 +52,7 @@ Example of response
[
{
"id": 47,
"iid": 12,
"project_id": 1,
"status": "pending",
"ref": "new-pipeline",
......@@ -62,6 +63,7 @@ Example of response
},
{
"id": 48,
"iid": 13,
"project_id": 1,
"status": "pending",
"ref": "new-pipeline",
......@@ -93,6 +95,7 @@ Example of response
```json
{
"id": 46,
"iid": 11,
"project_id": 1,
"status": "success",
"ref": "main",
......@@ -281,6 +284,7 @@ Example of response
```json
{
"id": 61,
"iid": 21,
"project_id": 1,
"sha": "384c444e840a515b23f21915ee5766b87068a70d",
"ref": "main",
......@@ -328,6 +332,7 @@ Response:
```json
{
"id": 46,
"iid": 11,
"project_id": 1,
"status": "pending",
"ref": "main",
......@@ -375,6 +380,7 @@ Response:
```json
{
"id": 46,
"iid": 11,
"project_id": 1,
"status": "canceled",
"ref": "main",
......
......@@ -18,7 +18,7 @@ RSpec.describe Ci::PipelineEntity do
let(:pipeline) { create(:ci_empty_pipeline) }
it 'contains required fields' do
expect(subject).to include :id, :user, :path, :coverage, :source
expect(subject).to include :id, :iid, :user, :path, :coverage, :source
expect(subject).to include :ref, :commit
expect(subject).to include :updated_at, :created_at
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment