Skip to content

Commit 4606da2

Browse files
committed
link comparison workflow
1 parent b24dc66 commit 4606da2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

dev-packages/size-limit-gh-action/index.mjs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ async function run() {
210210
let base;
211211
let current;
212212
let baseIsNotLatest = false;
213+
let baseWorkflowRun;
213214

214215
try {
215216
const artifacts = await getArtifactsForBranchAndWorkflow(octokit, {
@@ -219,12 +220,12 @@ async function run() {
219220
workflowName: `${process.env.GITHUB_WORKFLOW || ''}`,
220221
});
221222

222-
core.info(`Artifacts: ${JSON.stringify(artifacts, null, 2)}`);
223-
224223
if (!artifacts) {
225224
throw new Error('No artifacts found');
226225
}
227226

227+
baseWorkflowRun = artifacts.workflowRun;
228+
228229
await downloadOtherWorkflowArtifact(octokit, {
229230
...repo,
230231
artifactName: ARTIFACT_NAME,
@@ -271,6 +272,10 @@ async function run() {
271272

272273
bodyParts.push(markdownTable(limit.formatResults(base, current)));
273274

275+
if (baseWorkflowRun) {
276+
bodyParts.push(`[View base workflow run](${baseWorkflowRun.html_url})`);
277+
}
278+
274279
const body = bodyParts.join('\r\n');
275280

276281
try {

0 commit comments

Comments
 (0)