Skip to content

Commit

Permalink
fix: more pr & author info (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
DekusDenial authored and jithine committed Jan 25, 2019
1 parent a65835f commit 86ef89a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,9 @@ class GitlabScm extends Scm {
ref: `merge_requests/${pr.iid}`,
username: pr.author.username,
title: pr.title,
createTime: pr.created_at
createTime: pr.created_at,
url: pr.web_url,
userProfile: pr.author.web_url
}));
});
}
Expand Down
14 changes: 10 additions & 4 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,8 @@ describe('index', function () {
project_id: 3,
title: 'test 1',
created_at: '2011-01-26T19:01:12Z',
author: { username: 'collab1' }
author: { username: 'collab1', web_url: '/collab1' },
web_url: '/merge_requests/1'
},
{
id: 2,
Expand All @@ -1628,7 +1629,8 @@ describe('index', function () {
project_id: 3,
title: 'test 2',
created_at: '2011-01-26T19:01:12Z',
author: { username: 'collab2' }
author: { username: 'collab2', web_url: '/collab2' },
web_url: '/merge_requests/2'
}
]
});
Expand All @@ -1646,14 +1648,18 @@ describe('index', function () {
ref: 'merge_requests/2',
username: 'collab1',
title: 'test 1',
createTime: '2011-01-26T19:01:12Z'
createTime: '2011-01-26T19:01:12Z',
url: '/merge_requests/1',
userProfile: '/collab1'
},
{
name: 'PR-3',
ref: 'merge_requests/3',
username: 'collab2',
title: 'test 2',
createTime: '2011-01-26T19:01:12Z'
createTime: '2011-01-26T19:01:12Z',
url: '/merge_requests/2',
userProfile: '/collab2'
}
]);
});
Expand Down

0 comments on commit 86ef89a

Please sign in to comment.