mirror of
https://github.com/darksaid98/auto-changelog.git
synced 2026-12-01 14:38:47 +00:00
fix: generating broken markdown
This commit is contained in:
4 files changed
+4
-4
No files matched your search
+1
-1
@@ -70,7 +70,7 @@ export async function generateFooter(previousTagName?: string): Promise<string>
|
||||
if (includeCompareLink() && previousTagName) {
|
||||
let link = `${ url }/compare/${ previousTagName }...${ tagName }`;
|
||||
|
||||
if (!useGitHubAutolink() || releaseNamePrefix()) link = `[\`${ previousTagName }...${ tagName }\`](${ url }/compare/${ previousTagName }...${ tagName })`;
|
||||
if (!useGitHubAutolink() || releaseNamePrefix()) link = `[${ previousTagName }...${ tagName }](${ url }/compare/${ previousTagName }...${ tagName })`;
|
||||
|
||||
footer.push(`**Full Changelog**: ${ link }`);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ export class CommitHashNode extends Node {
|
||||
if (shouldUseGithubAutolink) return sha;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
||||
return `[\`${ sha.slice(0, 7) }\`](${ repo.url }/commit/${ sha })`;
|
||||
return `[${ sha.slice(0, 7) }](${ repo.url }/commit/${ sha })`;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -138,7 +138,7 @@ it("should generate the changelog footer with the full changelog link", async ()
|
||||
|
||||
const result = await generateFooter(info.previous.name);
|
||||
|
||||
expect(result).toEqual(`\n\n**Full Changelog**: [\`${ info.previous.name }...${ releaseNameInputValue }\`](${ url }/compare/${ info.previous.name }...${ releaseNameInputValue })`);
|
||||
expect(result).toEqual(`\n\n**Full Changelog**: [${ info.previous.name }...${ releaseNameInputValue }](${ url }/compare/${ info.previous.name }...${ releaseNameInputValue })`);
|
||||
|
||||
expect(getInput).toHaveBeenCalledTimes(1);
|
||||
|
||||
|
||||
@@ -84,5 +84,5 @@ it("should print the sha with the link (not using autolink)", () => {
|
||||
expect(commitHashNode.shouldUseGithubAutolink).toBe(false);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
||||
expect(commitHashNode.print()).toBe(`[\`${ sha.slice(0, 7) }\`](${ context.serverUrl }/${ repo.owner }/${ repo.repo }/commit/${ sha })`);
|
||||
expect(commitHashNode.print()).toBe(`[${ sha.slice(0, 7) }](${ context.serverUrl }/${ repo.owner }/${ repo.repo }/commit/${ sha })`);
|
||||
});
|
||||
Reference in new issue
Block a user