refactor: Changelog format (#50)

This commit is contained in:
Ardalan Amini authored and GitHub committed 2022-04-29 12:39:37 +04:30
1 parent 344a191745
commit a5eab9701f
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
require('./sourcemap-register.js');(()=>{var __webpack_modules__={7412:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generate=void 0;const r=s(1912);async function generate(e){const{octokit:t,owner:s,repo:a,sha:i,tagRef:n,inputs:o}=e;const{commitTypes:p,defaultCommitType:l}=o;const d=`https://github.com/${s}/${a}`;const u={};e:for await(const{data:e}of t.paginate.iterator(t.rest.repos.listCommits,{per_page:100,owner:s,repo:a,sha:i})){for(const{sha:t,...s}of e){if(t===n)break e;const e=s.commit.message.split("\n")[0];let{type:a,category:i,title:o,flag:c}=r.COMMIT_REGEX.exec(e)?.groups??{};if(!o)continue;c=trim(c);if(c==="ignore")continue;a=trim(a);a=p[a]??l;i=i?trim(i):"";o=trim(o).replace(r.PR_REGEX,((e,t)=>`[${e}](${d}/pull/${t})`));u[a]=u[a]??{};u[a][i]=u[a][i]??[];const m=u[a][i].findIndex((e=>e.title===o));if(m===-1)u[a][i].push({title:o,commits:[t]});else u[a][i][m].commits.push(t)}}const c=unique([...Object.values(p),l]);return c.reduce(((e,t)=>{const s=u[t];if(s==null)return e;e.push(`## ${t}`);const r=Object.keys(s).sort();for(const t of r){const r=s[t];const a=t.length===0;if(!a)e.push(`* **${t}:**`);const i=a?"":" ";for(const{title:t,commits:s}of r){e.push(`${i}* ${t} (${s.map((e=>`[${e.slice(0,8)}](${d}/commit/${e})`)).join(",")})`)}}e.push("");return e}),[]).join("\n")}t.generate=generate;function trim(e){if(e==null)return e;return e.trim().replace(/ {2,}/g," ")}function unique(e){return[...new Set(e)]}},1912:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PR_REGEX=t.COMMIT_REGEX=void 0;t.COMMIT_REGEX=/^(?<type>[^)]*)(?:\((?<category>[^)]*?)\)|):(?<title>.*?)(?:\[(?<flag>[^\]]+?)\]|)\s*$/;t.PR_REGEX=/#([1-9]\d*)/g},7331:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getInputs=t.getToken=void 0;const a=s(2186);const i=r(s(918));const n=r(s(4083));function getToken(){return(0,a.getInput)("github-token",{required:true})}t.getToken=getToken;async function getInputs(){const e=n.default.parse((0,a.getInput)("commit-types",{required:true}));const t=(0,a.getInput)("default-commit-type",{required:true});const s=(0,a.getInput)("release-name",{required:true});const r=(0,a.getBooleanInput)("mention-new-contributors",{required:true});const o=(0,a.getBooleanInput)("include-compare",{required:true});const p=(0,a.getBooleanInput)("semver",{required:true});return i.default.object().keys({commitTypes:i.default.object().pattern(i.default.string(),i.default.string()).required(),defaultCommitType:i.default.string().required(),releaseName:i.default.string().required(),mentionNewContributors:i.default.boolean().required(),includeCompare:i.default.boolean().required(),semver:i.default.boolean().required()}).validateAsync({commitTypes:e,defaultCommitType:t,releaseName:s,mentionNewContributors:r,includeCompare:o,semver:p})}t.getInputs=getInputs},9283:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=s(2186);const i=s(5438);const n=s(5741);const o=r(s(1383));const p=s(9297);const l=s(7412);const d=s(7331);async function run(){const e=await(0,d.getInputs)();const t=(0,i.getOctokit)((0,d.getToken)());const{repo:{owner:s,repo:r},sha:u}=i.context;let c=null;if(e.semver){c=o.default.parse(e.releaseName,{includePrerelease:true});if(c==null)return(0,a.setFailed)(`Expected a semver compatible releaseName, got "${e.releaseName}" instead.`)}let m=false;if(c!=null)m=c.prerelease.length>0;const{sha:h,name:g}=await(0,p.getTagSha)({octokit:t,owner:s,repo:r,sha:u,semver:c,prerelease:m});let v=await(0,l.generate)({octokit:t,owner:s,repo:r,sha:u,tagRef:h,inputs:e});if(e.mentionNewContributors){const{data:a}=await t.rest.repos.generateReleaseNotes({owner:s,repo:r,tag_name:e.releaseName,previous_tag_name:g});const i=n.marked.lexer(a.body);const o=i.findIndex((e=>e.type==="heading"&&e.text==="New Contributors"));const p=i[o+1];if(p.type==="list")v+=`\n\n## New Contributors\n${p.raw}\n`}if(e.includeCompare&&g!=null){v+=`\n\n**Full Changelog**: https://github.com/${s}/${r}/compare/${g}...${e.releaseName}`}(0,a.info)(`-> prerelease: ${m}`);(0,a.setOutput)("prerelease",m);(0,a.info)(`-> changelog: "${v}"`);(0,a.setOutput)("changelog",v)}run().catch(a.setFailed)},9297:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getTagSha=void 0;const a=r(s(1383));async function getTagSha(e){const{octokit:t,owner:s,repo:r,sha:i,semver:n,prerelease:o}=e;for await(const{data:e}of t.paginate.iterator(t.rest.repos.listTags,{per_page:100,owner:s,repo:r})){for(const{name:t,commit:{sha:s}}of e){if(i===s)continue;if(n==null)return{sha:s,name:t};const e=a.default.parse(t,{includePrerelease:true});if(e==null||n.compare(e)<=0)continue;if(e.prerelease.length>0&&!Line truncated
require('./sourcemap-register.js');(()=>{var __webpack_modules__={7412:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generate=void 0;const r=s(1912);async function generate(e){const{octokit:t,owner:s,repo:a,sha:i,tagRef:n,inputs:o}=e;const{commitTypes:p,defaultCommitType:l}=o;const d=`https://github.com/${s}/${a}`;const u={};e:for await(const{data:e}of t.paginate.iterator(t.rest.repos.listCommits,{per_page:100,owner:s,repo:a,sha:i})){for(const{sha:t,...s}of e){if(t===n)break e;const e=s.commit.message.split("\n")[0];let{type:a,category:i,title:o,flag:c}=r.COMMIT_REGEX.exec(e)?.groups??{};if(!o)continue;c=trim(c);if(c==="ignore")continue;a=trim(a);a=p[a]??l;i=i?trim(i):"";o=trim(o).replace(r.PR_REGEX,((e,t)=>`${d}/pull/${t}`));u[a]=u[a]??{};u[a][i]=u[a][i]??[];const m=u[a][i].findIndex((e=>e.title===o));if(m===-1)u[a][i].push({title:o,commits:[t]});else u[a][i][m].commits.push(t)}}const c=unique([...Object.values(p),l]);return c.reduce(((e,t)=>{const s=u[t];if(s==null)return e;e.push(`## ${t}`);const r=Object.keys(s).sort();for(const t of r){const r=s[t];const a=t.length===0;if(!a)e.push(`* **${t}:**`);const i=a?"":" ";for(const{title:t,commits:s}of r){e.push(`${i}* ${t} (${s.map((e=>`${d}/commit/${e}`)).join(",")})`)}}e.push("");return e}),[]).join("\n")}t.generate=generate;function trim(e){if(e==null)return e;return e.trim().replace(/ {2,}/g," ")}function unique(e){return[...new Set(e)]}},1912:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PR_REGEX=t.COMMIT_REGEX=void 0;t.COMMIT_REGEX=/^(?<type>[^)]*)(?:\((?<category>[^)]*?)\)|):(?<title>.*?)(?:\[(?<flag>[^\]]+?)\]|)\s*$/;t.PR_REGEX=/#([1-9]\d*)/g},7331:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getInputs=t.getToken=void 0;const a=s(2186);const i=r(s(918));const n=r(s(4083));function getToken(){return(0,a.getInput)("github-token",{required:true})}t.getToken=getToken;async function getInputs(){const e=n.default.parse((0,a.getInput)("commit-types",{required:true}));const t=(0,a.getInput)("default-commit-type",{required:true});const s=(0,a.getInput)("release-name",{required:true});const r=(0,a.getBooleanInput)("mention-new-contributors",{required:true});const o=(0,a.getBooleanInput)("include-compare",{required:true});const p=(0,a.getBooleanInput)("semver",{required:true});return i.default.object().keys({commitTypes:i.default.object().pattern(i.default.string(),i.default.string()).required(),defaultCommitType:i.default.string().required(),releaseName:i.default.string().required(),mentionNewContributors:i.default.boolean().required(),includeCompare:i.default.boolean().required(),semver:i.default.boolean().required()}).validateAsync({commitTypes:e,defaultCommitType:t,releaseName:s,mentionNewContributors:r,includeCompare:o,semver:p})}t.getInputs=getInputs},9283:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=s(2186);const i=s(5438);const n=s(5741);const o=r(s(1383));const p=s(9297);const l=s(7412);const d=s(7331);async function run(){const e=await(0,d.getInputs)();const t=(0,i.getOctokit)((0,d.getToken)());const{repo:{owner:s,repo:r},sha:u}=i.context;let c=null;if(e.semver){c=o.default.parse(e.releaseName,{includePrerelease:true});if(c==null)return(0,a.setFailed)(`Expected a semver compatible releaseName, got "${e.releaseName}" instead.`)}let m=false;if(c!=null)m=c.prerelease.length>0;const{sha:h,name:g}=await(0,p.getTagSha)({octokit:t,owner:s,repo:r,sha:u,semver:c,prerelease:m});let v=await(0,l.generate)({octokit:t,owner:s,repo:r,sha:u,tagRef:h,inputs:e});if(e.mentionNewContributors){const{data:a}=await t.rest.repos.generateReleaseNotes({owner:s,repo:r,tag_name:e.releaseName,previous_tag_name:g});const i=n.marked.lexer(a.body);const o=i.findIndex((e=>e.type==="heading"&&e.text==="New Contributors"));const p=i[o+1];if(p.type==="list")v+=`\n\n## New Contributors\n${p.raw}\n`}if(e.includeCompare&&g!=null){v+=`\n\n**Full Changelog**: https://github.com/${s}/${r}/compare/${g}...${e.releaseName}`}(0,a.info)(`-> prerelease: ${m}`);(0,a.setOutput)("prerelease",m);(0,a.info)(`-> changelog: "${v}"`);(0,a.setOutput)("changelog",v)}run().catch(a.setFailed)},9297:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getTagSha=void 0;const a=r(s(1383));async function getTagSha(e){const{octokit:t,owner:s,repo:r,sha:i,semver:n,prerelease:o}=e;for await(const{data:e}of t.paginate.iterator(t.rest.repos.listTags,{per_page:100,owner:s,repo:r})){for(const{name:t,commit:{sha:s}}of e){if(i===s)continue;if(n==null)return{sha:s,name:t};const e=a.default.parse(t,{includePrerelease:true});if(e==null||n.compare(e)<=0)continue;if(e.prerelease.length>0&&!o)continue;return{sha:s,namLine truncated
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
+1 -1
View File
@@ -1 +1 @@
{"version":3,"sources":["../webpack:/auto-changelog/dist/changelog.js","../webpack:/auto-changelog/dist/constants.js","../webpack:/auto-changelog/dist/context.js","../webpack:/auto-changelog/dist/index.js","../webpack:/auto-changelog/dist/tag.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/command.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/core.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/file-command.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/markdown-summary.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/oidc-utils.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/utils.js","../webpack:/auto-changelog/node_modules/@actions/github/lib/context.js","../webpack:/auto-changelog/node_modules/@actions/github/lib/github.js","../webpack:/auto-changelog/node_modules/@actions/github/lib/internal/utils.js","../webpack:/auto-changelog/node_modules/@actions/github/lib/utils.js","../webpack:/auto-changelog/node_modules/@actions/http-client/auth.js","../webpack:/auto-changelog/node_modules/@actions/http-client/index.js","../webpack:/auto-changelog/node_modules/@actions/http-client/proxy.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/applyToDefaults.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/assert.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/clone.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/deepEqual.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/error.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/escapeHtml.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/escapeRegex.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/ignore.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/merge.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/reach.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/stringify.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/types.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/utils.js","../webpack:/auto-changelog/node_modules/@hapi/topo/lib/index.js","../webpack:/auto-changelog/node_modules/@octokit/auth-token/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/core/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/endpoint/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/graphql/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/request-error/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/request/dist-node/index.js","../webpack:/auto-changelog/node_modules/@sideway/address/lib/domain.js","../webpack:/auto-changelog/node_modules/@sideway/address/lib/email.js","../webpack:/auto-changelog/node_modules/@sideway/address/lib/errors.js","../webpack:/auto-changelog/node_modules/@sideway/address/lib/ip.js","../webpack:/auto-changelog/node_modules/@sideway/address/lib/tlds.js","../webpack:/auto-changelog/node_modules/@sideway/address/lib/uri.js","../webpack:/auto-changelog/node_modules/@sideway/formula/lib/index.js","../webpack:/auto-changelog/node_modules/@sideway/pinpoint/lib/index.js","../webpack:/auto-changelog/node_modules/before-after-hook/index.js","../webpack:/auto-changelog/node_modules/before-after-hook/lib/add.js","../webpack:/auto-changelog/node_modules/before-after-hook/lib/register.js","../webpack:/auto-changelog/node_modules/before-after-hook/lib/remove.js","../webpack:/auto-changelog/node_modules/deprecation/dist-node/index.js","../webpack:/auto-changelog/node_modules/is-plain-object/dist/is-plain-object.js","../webpack:/auto-changelog/node_modules/joi/lib/annotate.js","../webpack:/auto-changelog/node_modules/joi/lib/base.js","../webpack:/auto-changelog/node_modules/joi/lib/cache.js","../webpack:/auto-changelog/node_modules/joi/lib/common.js","../webpack:/auto-changelog/node_modules/joi/lib/compile.js","../webpack:/auto-changelog/node_modules/joi/lib/errors.js","../webpack:/auto-changelog/node_modules/joi/lib/extend.js","../webpack:/auto-changelog/node_modules/joi/lib/index.js","../webpack:/auto-changelog/node_modules/joi/lib/manifest.js","../webpack:/auto-changelog/node_modules/joi/lib/messages.js","../webpack:/auto-changelog/node_modules/joi/lib/modify.js","../webpack:/auto-changelog/node_modules/joi/lib/ref.js","../webpack:/auto-changelog/node_modules/joi/lib/schemas.js","../webpack:/auto-changelog/node_modules/joi/lib/state.js","../webpack:/auto-changelog/node_modules/joi/lib/template.js","../webpack:/auto-changelog/node_modules/joi/lib/trace.js","../webpack:/auto-changelog/node_modules/joi/lib/types/alternatives.js","../webpack:/auto-changelog/node_modules/joi/lib/types/any.js","../webpack:/auto-changelog/node_modules/joi/lib/types/array.js","../Line truncated
{"version":3,"sources":["../webpack:/auto-changelog/dist/changelog.js","../webpack:/auto-changelog/dist/constants.js","../webpack:/auto-changelog/dist/context.js","../webpack:/auto-changelog/dist/index.js","../webpack:/auto-changelog/dist/tag.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/command.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/core.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/file-command.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/markdown-summary.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/oidc-utils.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/utils.js","../webpack:/auto-changelog/node_modules/@actions/github/lib/context.js","../webpack:/auto-changelog/node_modules/@actions/github/lib/github.js","../webpack:/auto-changelog/node_modules/@actions/github/lib/internal/utils.js","../webpack:/auto-changelog/node_modules/@actions/github/lib/utils.js","../webpack:/auto-changelog/node_modules/@actions/http-client/auth.js","../webpack:/auto-changelog/node_modules/@actions/http-client/index.js","../webpack:/auto-changelog/node_modules/@actions/http-client/proxy.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/applyToDefaults.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/assert.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/clone.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/deepEqual.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/error.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/escapeHtml.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/escapeRegex.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/ignore.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/merge.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/reach.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/stringify.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/types.js","../webpack:/auto-changelog/node_modules/@hapi/hoek/lib/utils.js","../webpack:/auto-changelog/node_modules/@hapi/topo/lib/index.js","../webpack:/auto-changelog/node_modules/@octokit/auth-token/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/core/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/endpoint/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/graphql/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/request-error/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/request/dist-node/index.js","../webpack:/auto-changelog/node_modules/@sideway/address/lib/domain.js","../webpack:/auto-changelog/node_modules/@sideway/address/lib/email.js","../webpack:/auto-changelog/node_modules/@sideway/address/lib/errors.js","../webpack:/auto-changelog/node_modules/@sideway/address/lib/ip.js","../webpack:/auto-changelog/node_modules/@sideway/address/lib/tlds.js","../webpack:/auto-changelog/node_modules/@sideway/address/lib/uri.js","../webpack:/auto-changelog/node_modules/@sideway/formula/lib/index.js","../webpack:/auto-changelog/node_modules/@sideway/pinpoint/lib/index.js","../webpack:/auto-changelog/node_modules/before-after-hook/index.js","../webpack:/auto-changelog/node_modules/before-after-hook/lib/add.js","../webpack:/auto-changelog/node_modules/before-after-hook/lib/register.js","../webpack:/auto-changelog/node_modules/before-after-hook/lib/remove.js","../webpack:/auto-changelog/node_modules/deprecation/dist-node/index.js","../webpack:/auto-changelog/node_modules/is-plain-object/dist/is-plain-object.js","../webpack:/auto-changelog/node_modules/joi/lib/annotate.js","../webpack:/auto-changelog/node_modules/joi/lib/base.js","../webpack:/auto-changelog/node_modules/joi/lib/cache.js","../webpack:/auto-changelog/node_modules/joi/lib/common.js","../webpack:/auto-changelog/node_modules/joi/lib/compile.js","../webpack:/auto-changelog/node_modules/joi/lib/errors.js","../webpack:/auto-changelog/node_modules/joi/lib/extend.js","../webpack:/auto-changelog/node_modules/joi/lib/index.js","../webpack:/auto-changelog/node_modules/joi/lib/manifest.js","../webpack:/auto-changelog/node_modules/joi/lib/messages.js","../webpack:/auto-changelog/node_modules/joi/lib/modify.js","../webpack:/auto-changelog/node_modules/joi/lib/ref.js","../webpack:/auto-changelog/node_modules/joi/lib/schemas.js","../webpack:/auto-changelog/node_modules/joi/lib/state.js","../webpack:/auto-changelog/node_modules/joi/lib/template.js","../webpack:/auto-changelog/node_modules/joi/lib/trace.js","../webpack:/auto-changelog/node_modules/joi/lib/types/alternatives.js","../webpack:/auto-changelog/node_modules/joi/lib/types/any.js","../webpack:/auto-changelog/node_modules/joi/lib/types/array.js","../Line truncated
+2 -2
View File
@@ -36,7 +36,7 @@ export async function generate(input: ChangelogInputI): Promise<string> {
title = trim(title).replace(
PR_REGEX,
(match, pull) => `[${match}](${repoUrl}/pull/${pull})`,
(match, pull) => `${repoUrl}/pull/${pull}`,
);
commits[type] = commits[type] ?? {};
@@ -74,7 +74,7 @@ export async function generate(input: ChangelogInputI): Promise<string> {
for (const { title, commits } of categoryGroup) {
changelog.push(
`${baseLine}* ${title} (${commits
.map((sha) => `[${sha.slice(0, 8)}](${repoUrl}/commit/${sha})`)
.map((sha) => `${repoUrl}/commit/${sha}`)
.join(",")})`,
);
}