mirror of
https://github.com/darksaid98/auto-changelog.git
synced 2026-12-02 14:38:47 +00:00
refactor!: don't include the commit sha when pull request reference is included
Signed-off-by: Ardalan Amini <[email protected]>
This commit is contained in:
3 files changed
+8
-5
No files matched your search
+6
-3
@@ -71,6 +71,9 @@ export async function generateChangelog(lastSha?: string): Promise<string> {
|
||||
const { owner, repo, url } = repository();
|
||||
const defaultType = defaultCommitType();
|
||||
const typeMap = commitTypes();
|
||||
const shouldIncludePRLinks = includePRLinks();
|
||||
const shouldIncludeCommitLinks = includeCommitLinks();
|
||||
const shouldMentionAuthors = mentionAuthors();
|
||||
|
||||
const iterator = paginate.iterator(
|
||||
rest.repos.listCommits,
|
||||
@@ -142,11 +145,11 @@ export async function generateChangelog(lastSha?: string): Promise<string> {
|
||||
|
||||
const reference: string[] = [];
|
||||
|
||||
if (pr && includePRLinks()) reference.push(`${ url }/issues/${ pr }`);
|
||||
if (pr && shouldIncludePRLinks) reference.push(`${ url }/issues/${ pr }`);
|
||||
|
||||
if (includeCommitLinks()) reference.push(`${ url }/commit/${ commit.sha }`);
|
||||
if ((!pr || !shouldIncludePRLinks) && shouldIncludeCommitLinks) reference.push(`${ url }/commit/${ commit.sha }`);
|
||||
|
||||
if (commit.author?.login && mentionAuthors()) reference.push(`by @${ commit.author.login }`);
|
||||
if (commit.author?.login && shouldMentionAuthors) reference.push(`by @${ commit.author.login }`);
|
||||
|
||||
if (reference.length > 0) log.references.push(reference.join(" "));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user