mirror of
https://github.com/darksaid98/auto-changelog.git
synced 2026-12-01 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
+1
-1
@@ -1,4 +1,4 @@
|
||||
require('./sourcemap-register.js');(()=>{var __webpack_modules__={1932:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateChangelog=void 0;const s=a(7733);const r=a(9034);function trim(e){if(e==null)return e;return e.trim().replace(/ {2,}/g," ")}function unique(e){return[...new Set(e)]}function sortBy(e,t){return e.sort(((e,a)=>e[t].localeCompare(a[t])))}async function generateChangelog(e){const{paginate:t,rest:a}=(0,r.octokit)();const{owner:i,repo:p,url:n}=(0,r.repository)();const o=(0,r.defaultCommitType)();const d=(0,r.commitTypes)();const l=t.iterator(a.repos.listCommits,{per_page:100,sha:(0,r.sha)(),owner:i,repo:p});const u=[];e:for await(const{data:t}of l){for(const a of t){if(a.sha===e)break e;const t=a.commit.message.split("\n")[0];(0,s.debug)(`commit message -> ${t}`);let{type:i,scope:p,description:l,pr:m,flag:c}=(0,r.parseCommitMessage)(t);if(!l)continue;l=trim(l);c=trim(c);if(c==="ignore")continue;i=d[trim(i??"")]??o;let h=u.find((e=>e.type===i));if(h==null){h={type:i,scopes:[]};u.push(h)}p=trim(p??"");let v=h.scopes.find((e=>e.scope===p));if(v==null){v={scope:p,logs:[]};h.scopes.push(v)}let g=v.logs.find((e=>e.description===l));if(g==null){g={description:l,references:[]};v.logs.push(g)}const w=[];if(m&&(0,r.includePRLinks)())w.push(`${n}/issues/${m}`);if((0,r.includeCommitLinks)())w.push(`${n}/commit/${a.sha}`);if(a.author?.login&&(0,r.mentionAuthors)())w.push(`by @${a.author.login}`);if(w.length>0)g.references.push(w.join(" "))}}const m=unique(Object.values(d).concat(o));const c=[];for(const e of m){const t=u.find((t=>t.type===e));if(t==null)continue;c.push(`## ${e}`);sortBy(t.scopes,"scope");for(const{scope:e,logs:a}of t.scopes){let t="";if(e.length>0){c.push(`* **${e}:**`);t=" "}for(const{description:e,references:s}of a){let a=`${t}* ${e}`;if(s.length>0)a+=` (${s.join(", ")})`;c.push(a)}}c.push("")}return c.join("\n")}t.generateChangelog=generateChangelog},8251:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateFooter=void 0;const s=a(9206);const r=a(9034);async function generateFooter(e){const{owner:t,repo:a,url:i}=(0,r.repository)();const p=(0,r.releaseName)();const n=[];if((0,r.mentionNewContributors)()){const{rest:i}=(0,r.octokit)();const{data:o}=await i.repos.generateReleaseNotes({owner:t,repo:a,tag_name:p,previous_tag_name:e});const d=s.marked.lexer(o.body);const l=d.findIndex((e=>e.type==="heading"&&e.text==="New Contributors"));const u=d[l+1];if(u.type==="list")n.push(`## New Contributors\n${u.raw}\n`)}if((0,r.includeCompareLink)()&&e)n.push(`**Full Changelog**: ${i}/compare/${e}...${p}`);if(n.length>0)n.unshift("");return n.join("\n\n")}t.generateFooter=generateFooter},2263:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getTagInfo=void 0;const s=a(9034);async function getTagInfo(){const{paginate:e,rest:t}=(0,s.octokit)();const{owner:a,repo:r}=(0,s.repository)();const i={releaseId:"latest",prerelease:false};let p=null;if((0,s.semver)()){p=(0,s.parseSemVer)();if(p==null)throw new Error(`Expected a semver compatible releaseName, got "${(0,s.releaseName)()}" instead.`);i.prerelease=p.prerelease.length>0;if(i.prerelease)i.releaseId=`${p.prerelease[0]}`}const n=e.iterator(t.repos.listTags,{per_page:100,owner:a,repo:r});e:for await(const{data:e}of n){for(const{name:t,commit:a}of e){if((0,s.sha)()===a.sha)continue;if(p==null){i.previous={name:t,sha:a.sha};break e}const e=(0,s.parseSemVer)(t);if(e==null||p.compare(e)<=0)continue;if(e.prerelease.length>0&&!i.prerelease)continue;i.previous={name:t,sha:a.sha};break e}}return i}t.getTagInfo=getTagInfo},6243:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.booleanInput=void 0;const s=a(7733);const r=a(927);function booleanInput(e,t=true){return(0,r.cache)(e,(()=>(0,s.getBooleanInput)(e,{required:t})))}t.booleanInput=booleanInput},927:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.cache=void 0;const a=new Map;function cache(e,t,s=false){if(!a.has(e)||s)a.set(e,t());return a.get(e)}t.cache=cache},9034:function(e,t,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,a,s){if(s===undefined)s=a;var r=Object.getOwnPropertyDescriptor(t,a);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,s,r)}:function(e,t,a,s){if(s===undefined)s=a;e[s]=t[a]});var r=this&&this.__exportStar||function(e,t){for(var a in e)if(a!=="default"&&!Object.prototype.hasOwnProperty.call(t,a))s(t,e,a)};Object.defineProperty(t,"__esModule",{value:true});r(a(8714),t);r(a(2435),t);r(a(6243),t);r(a(927),t);r(a(7557),t);r(a(1810),t);r(a(9839),t);r(a(3954),t);r(a(2574),t);r(a(615),t);r(a(3648),t)},7557:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.input=void 0;const s=a(7733);const r=a(927);function input(e,t=(e=>e),a=true){return(0,r.cache)(e,(()=>t((0,s.getInput)(e,{required:a}))))}t.input=input},6816:funLine truncated
|
||||
require('./sourcemap-register.js');(()=>{var __webpack_modules__={1932:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateChangelog=void 0;const s=a(7733);const r=a(9034);function trim(e){if(e==null)return e;return e.trim().replace(/ {2,}/g," ")}function unique(e){return[...new Set(e)]}function sortBy(e,t){return e.sort(((e,a)=>e[t].localeCompare(a[t])))}async function generateChangelog(e){const{paginate:t,rest:a}=(0,r.octokit)();const{owner:i,repo:p,url:n}=(0,r.repository)();const o=(0,r.defaultCommitType)();const d=(0,r.commitTypes)();const l=(0,r.includePRLinks)();const u=(0,r.includeCommitLinks)();const m=(0,r.mentionAuthors)();const c=t.iterator(a.repos.listCommits,{per_page:100,sha:(0,r.sha)(),owner:i,repo:p});const h=[];e:for await(const{data:t}of c){for(const a of t){if(a.sha===e)break e;const t=a.commit.message.split("\n")[0];(0,s.debug)(`commit message -> ${t}`);let{type:i,scope:p,description:c,pr:v,flag:g}=(0,r.parseCommitMessage)(t);if(!c)continue;c=trim(c);g=trim(g);if(g==="ignore")continue;i=d[trim(i??"")]??o;let w=h.find((e=>e.type===i));if(w==null){w={type:i,scopes:[]};h.push(w)}p=trim(p??"");let y=w.scopes.find((e=>e.scope===p));if(y==null){y={scope:p,logs:[]};w.scopes.push(y)}let E=y.logs.find((e=>e.description===c));if(E==null){E={description:c,references:[]};y.logs.push(E)}const b=[];if(v&&l)b.push(`${n}/issues/${v}`);if((!v||!l)&&u)b.push(`${n}/commit/${a.sha}`);if(a.author?.login&&m)b.push(`by @${a.author.login}`);if(b.length>0)E.references.push(b.join(" "))}}const v=unique(Object.values(d).concat(o));const g=[];for(const e of v){const t=h.find((t=>t.type===e));if(t==null)continue;g.push(`## ${e}`);sortBy(t.scopes,"scope");for(const{scope:e,logs:a}of t.scopes){let t="";if(e.length>0){g.push(`* **${e}:**`);t=" "}for(const{description:e,references:s}of a){let a=`${t}* ${e}`;if(s.length>0)a+=` (${s.join(", ")})`;g.push(a)}}g.push("")}return g.join("\n")}t.generateChangelog=generateChangelog},8251:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateFooter=void 0;const s=a(9206);const r=a(9034);async function generateFooter(e){const{owner:t,repo:a,url:i}=(0,r.repository)();const p=(0,r.releaseName)();const n=[];if((0,r.mentionNewContributors)()){const{rest:i}=(0,r.octokit)();const{data:o}=await i.repos.generateReleaseNotes({owner:t,repo:a,tag_name:p,previous_tag_name:e});const d=s.marked.lexer(o.body);const l=d.findIndex((e=>e.type==="heading"&&e.text==="New Contributors"));const u=d[l+1];if(u.type==="list")n.push(`## New Contributors\n${u.raw}\n`)}if((0,r.includeCompareLink)()&&e)n.push(`**Full Changelog**: ${i}/compare/${e}...${p}`);if(n.length>0)n.unshift("");return n.join("\n\n")}t.generateFooter=generateFooter},2263:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getTagInfo=void 0;const s=a(9034);async function getTagInfo(){const{paginate:e,rest:t}=(0,s.octokit)();const{owner:a,repo:r}=(0,s.repository)();const i={releaseId:"latest",prerelease:false};let p=null;if((0,s.semver)()){p=(0,s.parseSemVer)();if(p==null)throw new Error(`Expected a semver compatible releaseName, got "${(0,s.releaseName)()}" instead.`);i.prerelease=p.prerelease.length>0;if(i.prerelease)i.releaseId=`${p.prerelease[0]}`}const n=e.iterator(t.repos.listTags,{per_page:100,owner:a,repo:r});e:for await(const{data:e}of n){for(const{name:t,commit:a}of e){if((0,s.sha)()===a.sha)continue;if(p==null){i.previous={name:t,sha:a.sha};break e}const e=(0,s.parseSemVer)(t);if(e==null||p.compare(e)<=0)continue;if(e.prerelease.length>0&&!i.prerelease)continue;i.previous={name:t,sha:a.sha};break e}}return i}t.getTagInfo=getTagInfo},6243:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.booleanInput=void 0;const s=a(7733);const r=a(927);function booleanInput(e,t=true){return(0,r.cache)(e,(()=>(0,s.getBooleanInput)(e,{required:t})))}t.booleanInput=booleanInput},927:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.cache=void 0;const a=new Map;function cache(e,t,s=false){if(!a.has(e)||s)a.set(e,t());return a.get(e)}t.cache=cache},9034:function(e,t,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,a,s){if(s===undefined)s=a;var r=Object.getOwnPropertyDescriptor(t,a);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,s,r)}:function(e,t,a,s){if(s===undefined)s=a;e[s]=t[a]});var r=this&&this.__exportStar||function(e,t){for(var a in e)if(a!=="default"&&!Object.prototype.hasOwnProperty.call(t,a))s(t,e,a)};Object.defineProperty(t,"__esModule",{value:true});r(a(8714),t);r(a(2435),t);r(a(6243),t);r(a(927),t);r(a(7557),t);r(a(1810),t);r(a(9839),t);r(a(3954),t);r(a(2574),t);r(a(615),t);r(a(3648),t)},7557:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.input=void 0;const s=a(7733);const r=a(927);function input(e,t=(e=>e),a=true){return(0,r.cache)(e,(()=>t((0,s.getInput)(e,Line truncated
|
||||
/*!
|
||||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||||
*
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"sources":["../webpack:/auto-changelog/dist/changelog.js","../webpack:/auto-changelog/dist/footer.js","../webpack:/auto-changelog/dist/tag.js","../webpack:/auto-changelog/dist/utils/boolean-input.js","../webpack:/auto-changelog/dist/utils/cache.js","../webpack:/auto-changelog/dist/utils/index.js","../webpack:/auto-changelog/dist/utils/input.js","../webpack:/auto-changelog/dist/utils/inputs/commit-types.js","../webpack:/auto-changelog/dist/utils/inputs/default-commit-type.js","../webpack:/auto-changelog/dist/utils/inputs/include-commit-links.js","../webpack:/auto-changelog/dist/utils/inputs/include-compare-link.js","../webpack:/auto-changelog/dist/utils/inputs/include-pr-links.js","../webpack:/auto-changelog/dist/utils/inputs/index.js","../webpack:/auto-changelog/dist/utils/inputs/mention-authors.js","../webpack:/auto-changelog/dist/utils/inputs/mention-new-contributors.js","../webpack:/auto-changelog/dist/utils/inputs/release-name.js","../webpack:/auto-changelog/dist/utils/inputs/semver.js","../webpack:/auto-changelog/dist/utils/inputs/token.js","../webpack:/auto-changelog/dist/utils/octokit.js","../webpack:/auto-changelog/dist/utils/output.js","../webpack:/auto-changelog/dist/utils/outputs/index.js","../webpack:/auto-changelog/dist/utils/outputs/set-changelog.js","../webpack:/auto-changelog/dist/utils/outputs/set-prerelease.js","../webpack:/auto-changelog/dist/utils/outputs/set-release-id.js","../webpack:/auto-changelog/dist/utils/parse-commit-message.js","../webpack:/auto-changelog/dist/utils/parse-semver.js","../webpack:/auto-changelog/dist/utils/repository.js","../webpack:/auto-changelog/dist/utils/sha.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/core/lib/command.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/core/lib/core.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/core/lib/file-command.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/core/lib/oidc-utils.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/core/lib/path-utils.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/core/lib/summary.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/core/lib/utils.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/github/lib/context.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/github/lib/github.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/github/lib/internal/utils.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/github/lib/utils.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/http-client/lib/auth.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/http-client/lib/index.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/http-client/lib/proxy.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@octokit/auth-token/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@octokit/core/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@octokit/endpoint/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@octokit/graphql/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@octokit/request-error/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@octokit/request/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/[email protected]/node_modules/before-after-hook/index.js","../webpack:/auto-changelog/node_modules/.pnpm/[email protected]/node_modules/before-after-hook/lib/add.js","../webpack:/auto-changelog/node_modules/.pnpm/[email protected]/node_modules/before-after-hook/lib/register.js","../webpack:/auto-changelog/node_modules/.pnpm/[email protected]/node_modules/before-after-hook/lib/remove.js","../webpack:/auto-changelog/node_modules/.pnpm/[email protected]/node_modules/deprecation/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/[email protected]/node_modules/iLine truncated
|
||||
{"version":3,"sources":["../webpack:/auto-changelog/dist/changelog.js","../webpack:/auto-changelog/dist/footer.js","../webpack:/auto-changelog/dist/tag.js","../webpack:/auto-changelog/dist/utils/boolean-input.js","../webpack:/auto-changelog/dist/utils/cache.js","../webpack:/auto-changelog/dist/utils/index.js","../webpack:/auto-changelog/dist/utils/input.js","../webpack:/auto-changelog/dist/utils/inputs/commit-types.js","../webpack:/auto-changelog/dist/utils/inputs/default-commit-type.js","../webpack:/auto-changelog/dist/utils/inputs/include-commit-links.js","../webpack:/auto-changelog/dist/utils/inputs/include-compare-link.js","../webpack:/auto-changelog/dist/utils/inputs/include-pr-links.js","../webpack:/auto-changelog/dist/utils/inputs/index.js","../webpack:/auto-changelog/dist/utils/inputs/mention-authors.js","../webpack:/auto-changelog/dist/utils/inputs/mention-new-contributors.js","../webpack:/auto-changelog/dist/utils/inputs/release-name.js","../webpack:/auto-changelog/dist/utils/inputs/semver.js","../webpack:/auto-changelog/dist/utils/inputs/token.js","../webpack:/auto-changelog/dist/utils/octokit.js","../webpack:/auto-changelog/dist/utils/output.js","../webpack:/auto-changelog/dist/utils/outputs/index.js","../webpack:/auto-changelog/dist/utils/outputs/set-changelog.js","../webpack:/auto-changelog/dist/utils/outputs/set-prerelease.js","../webpack:/auto-changelog/dist/utils/outputs/set-release-id.js","../webpack:/auto-changelog/dist/utils/parse-commit-message.js","../webpack:/auto-changelog/dist/utils/parse-semver.js","../webpack:/auto-changelog/dist/utils/repository.js","../webpack:/auto-changelog/dist/utils/sha.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/core/lib/command.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/core/lib/core.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/core/lib/file-command.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/core/lib/oidc-utils.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/core/lib/path-utils.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/core/lib/summary.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/core/lib/utils.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/github/lib/context.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/github/lib/github.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/github/lib/internal/utils.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/github/lib/utils.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/http-client/lib/auth.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/http-client/lib/index.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@actions/http-client/lib/proxy.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@octokit/auth-token/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@octokit/core/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@octokit/endpoint/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@octokit/graphql/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@octokit/request-error/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/@[email protected]/node_modules/@octokit/request/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/[email protected]/node_modules/before-after-hook/index.js","../webpack:/auto-changelog/node_modules/.pnpm/[email protected]/node_modules/before-after-hook/lib/add.js","../webpack:/auto-changelog/node_modules/.pnpm/[email protected]/node_modules/before-after-hook/lib/register.js","../webpack:/auto-changelog/node_modules/.pnpm/[email protected]/node_modules/before-after-hook/lib/remove.js","../webpack:/auto-changelog/node_modules/.pnpm/[email protected]/node_modules/deprecation/dist-node/index.js","../webpack:/auto-changelog/node_modules/.pnpm/[email protected]/node_modules/iLine truncated
|
||||
+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