Skip to content

Commit

Permalink
feat(1419): more pr info (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
DekusDenial authored Jan 10, 2019
1 parent 4f69340 commit a65835f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,10 @@ class GitlabScm extends Scm {

return prList.map(pr => ({
name: `PR-${pr.iid}`,
ref: `merge_requests/${pr.iid}`
ref: `merge_requests/${pr.iid}`,
username: pr.author.username,
title: pr.title,
createTime: pr.created_at
}));
});
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"hoek": "^5.0.3",
"joi": "^13.0.0",
"request": "^2.80.0",
"screwdriver-data-schema": "^18.13.5",
"screwdriver-scm-base": "^5.0.0"
"screwdriver-data-schema": "^18.39.1",
"screwdriver-scm-base": "^5.1.0"
},
"release": {
"debug": false,
Expand Down
20 changes: 16 additions & 4 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1615,14 +1615,20 @@ describe('index', function () {
iid: 2,
target_branch: 'master',
source_branch: 'test1',
project_id: 3
project_id: 3,
title: 'test 1',
created_at: '2011-01-26T19:01:12Z',
author: { username: 'collab1' }
},
{
id: 2,
iid: 3,
target_branch: 'master',
source_branch: 'test2',
project_id: 3
project_id: 3,
title: 'test 2',
created_at: '2011-01-26T19:01:12Z',
author: { username: 'collab2' }
}
]
});
Expand All @@ -1637,11 +1643,17 @@ describe('index', function () {
assert.deepEqual(response, [
{
name: 'PR-2',
ref: 'merge_requests/2'
ref: 'merge_requests/2',
username: 'collab1',
title: 'test 1',
createTime: '2011-01-26T19:01:12Z'
},
{
name: 'PR-3',
ref: 'merge_requests/3'
ref: 'merge_requests/3',
username: 'collab2',
title: 'test 2',
createTime: '2011-01-26T19:01:12Z'
}
]);
});
Expand Down

0 comments on commit a65835f

Please sign in to comment.