We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4808ad2 commit 11674b4Copy full SHA for 11674b4
@commitlint/parse/src/index.test.js
@@ -140,3 +140,20 @@ test('parses references leading subject', async t => {
140
const {references: [actual]} = await parse(message, undefined, opts);
141
t.is(actual.issue, '1');
142
});
143
+
144
+test('parses custom references', async t => {
145
+ const message = '#1 some subject PREFIX-2';
146
+ const {references} = await parse(message, undefined, {
147
+ issuePrefixes: ['PREFIX-']
148
+ });
149
150
+ t.falsy(references.find(ref => ref.issue === '1'));
151
+ t.deepEqual(references.find(ref => ref.issue === '2'), {
152
+ action: null,
153
+ issue: '2',
154
+ owner: null,
155
+ prefix: 'PREFIX-',
156
+ raw: '#1 some subject PREFIX-2',
157
+ repository: null
158
159
+});
0 commit comments