Skip to content

Commit 9ce9c1e

Browse files
committed
fix: add support to trailing slash in Fixes
1 parent 968275f commit 9ce9c1e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/rules/fixes-url.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const id = 'fixes-url'
22
const github = new RegExp('^https://github\\.com/[\\w-]+/[\\w-]+/' +
3-
'(issues|pull)/\\d+(#issuecomment-\\d+|#discussion_r\\d+)?$'
3+
'(issues|pull)/\\d+(#issuecomment-\\d+|#discussion_r\\d+)?\/?$'
44
)
55

66
export default {

test/rules/fixes-url.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ test('rule: fixes-url', (t) => {
2424
const valid = [
2525
['GitHub issue URL',
2626
'https://github.com/nodejs/node/issues/1234'],
27+
['GitHub issue URL with trailing slash',
28+
'https://github.com/nodejs/node/issues/1234/'],
2729
['GitHub issue URL containing hyphen',
2830
'https://github.com/nodejs/node-report/issues/1234'],
2931
['GitHub issue URL containing hyphen with comment',

0 commit comments

Comments
 (0)