Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit efaf138

Browse files
authored
Merge pull request #2 from groupon/dbushong/feature/master/fix-url
strip cruft off published repo.url
2 parents 1c85275 + a703004 commit efaf138

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

lib/common.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ function cmdLine(md) {
5555
/^git-/,
5656
'git '
5757
);
58-
return md
59-
? `[${cl}](${packageJSON.repository.url}/releases/tag/v${packageJSON.version})`
60-
: cl;
58+
if (!md) return cl;
59+
const baseUrl = packageJSON.repository.url
60+
.replace(/^git\+/)
61+
.replace(/\.git$/);
62+
return `[${cl}](${baseUrl}/releases/tag/v${packageJSON.version})`;
6163
}
6264
exports.cmdLine = cmdLine;
6365

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/pr.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ describe('pr', () => {
100100
`compare/master...${prefix}:feature/master/kittens-are-cute`,
101101
url.pathname
102102
);
103+
assert.include(
104+
'body has the footer url',
105+
'https://github.com/groupon/git-workflow/releases/tag/v',
106+
url.query.body
107+
);
103108
});
104109
});
105110
});

0 commit comments

Comments
 (0)