Skip to content

Commit f6ad20e

Browse files
MylesBorinsrvagg
authored andcommitted
allow for trailing slash in PR-URL (#3)
Current regular expression will not match URL that ends in a slash.
1 parent ecfd775 commit f6ad20e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commit-stream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function commitStream (ghUser, ghProject) {
3636
if (ghUser && ghProject && (m = commit.prUrl.match(/^\s*#?(\d+)\s*$/))) {
3737
commit.prUrl = 'https://github.com/' + ghUser + '/' + ghProject + '/pull/' + m[1]
3838
}
39-
if (m = commit.prUrl.match(/^(https?:\/\/.+\/([^\/]+)\/([^\/]+))\/\w+\/(\d+)$/i)) {
39+
if (m = commit.prUrl.match(/^(https?:\/\/.+\/([^\/]+)\/([^\/]+))\/\w+\/(\d+)(\/)?$/i)) {
4040
commit.ghIssue = +m[4]
4141
commit.ghUser = m[2]
4242
commit.ghProject = m[3]

0 commit comments

Comments
 (0)