mirror of
https://github.com/darksaid98/auto-changelog.git
synced 2026-12-04 06:28:52 +00:00
feat: Include GitHub compare link in the changelog (#48)
* feat: Include GitHub compare link in the changelog * fix: Full Changelog link markdown position
This commit is contained in:
1 parent
4f2084e0da
commit
a4aa721e58
5 files changed
+22
-13
No files matched your search
+10
-6
@@ -30,7 +30,7 @@ async function run() {
|
||||
|
||||
if (semver != null) prerelease = semver.prerelease.length > 0;
|
||||
|
||||
const tagRef = await getTagSha({
|
||||
const { sha: tagRef, name: tagName } = await getTagSha({
|
||||
octokit,
|
||||
owner,
|
||||
repo,
|
||||
@@ -39,7 +39,7 @@ async function run() {
|
||||
prerelease,
|
||||
});
|
||||
|
||||
const changelog = await generate({
|
||||
let changelog = await generate({
|
||||
octokit,
|
||||
owner,
|
||||
repo,
|
||||
@@ -48,13 +48,17 @@ async function run() {
|
||||
inputs,
|
||||
});
|
||||
|
||||
info(changelog);
|
||||
if (tagName != null) {
|
||||
changelog += `\n\n**Full Changelog**: https://github.com/${owner}/${repo}/compare/${tagName}...${inputs.releaseName}`;
|
||||
}
|
||||
|
||||
setOutput("changelog", changelog);
|
||||
|
||||
info(`prerelease: ${prerelease}`);
|
||||
info(`-> prerelease: ${prerelease}`);
|
||||
|
||||
setOutput("prerelease", prerelease);
|
||||
|
||||
info(`-> changelog: "${changelog}"`);
|
||||
|
||||
setOutput("changelog", changelog);
|
||||
}
|
||||
|
||||
run().catch(setFailed);
|
||||
Reference in new issue
Block a user