Skip to content

Commit 5ad1b38

Browse files
authored
metadata: remove file hashes from passed url
Fixes: #206
1 parent bccf30c commit 5ad1b38

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/git/metadata.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ const PR_RE = new RegExp(
6363
'([0-9]+)(?:/(?:files)?)?$');
6464

6565
function handler(argv) {
66+
// remove hashes from PR link
67+
argv.identifier = argv.identifier.replace(/#.*$/, '');
68+
6669
const parsed = {};
6770
const prid = Number.parseInt(argv.identifier);
6871
if (!Number.isNaN(prid)) {

0 commit comments

Comments
 (0)