Skip to content

Commit

Permalink
feat: support GitLab ! merge request prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed Jul 8, 2018
1 parent 3ddf152 commit 141c92e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,15 @@ parse('Issue description, ref user/package#1, Fix #2, Duplicate of #3 /cc @user'
const issueParser = require('issue-parser');
const parse = issueParser('gitlab');

issueParser('Issue description, ref group/user/package#1, implement #2, /duplicate #3 /cc @user');
issueParser('Issue description, ref group/user/package#1, !2, implement #3, /duplicate #4 /cc @user');
/*
{
refs: [{raw: 'group/user/package#1', slug: 'group/user/package', prefix: '#', issue: '1'}],
actions: [{raw: 'implement #2', action: 'Implement', prefix: '#', issue: '2'}],
duplicates: [{raw: 'Duplicate of #3', action: 'Duplicate of', prefix: '#', issue: '3'}],
refs: [
{raw: 'group/user/package#1', slug: 'group/user/package', prefix: '#', issue: '1'},
{raw: '!2', slug: 'group/user/package', prefix: '!', issue: '2'},
],
actions: [{raw: 'implement #3', action: 'Implement', prefix: '#', issue: '4'}],
duplicates: [{raw: 'Duplicate of #4', action: 'Duplicate of', prefix: '#', issue: '4'}],
mentions: [{raw: '@user', prefix: '@', user: 'user'}],
}
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/hosts-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = {
// https://about.gitlab.com/2016/03/08/gitlab-tutorial-its-all-connected
mentionsPrefixes: ['@'],
// https://about.gitlab.com/2016/03/08/gitlab-tutorial-its-all-connected
issuePrefixes: ['#'],
issuePrefixes: ['#', '!'],
},
default: {
referenceActions: [
Expand Down

0 comments on commit 141c92e

Please sign in to comment.