@@ -130,6 +130,7 @@ import path from "path";
130
130
* @property {string } name
131
131
* @property {string } summary
132
132
* @property {"pending" | keyof typeof CheckConclusion } result
133
+ * @property {string } [target_url]
133
134
*/
134
135
135
136
// Placing these configuration items here until we decide another way to pull them in.
@@ -298,6 +299,9 @@ export default async function summarizeChecks({ github, context, core }) {
298
299
const targetBranch = context . payload . pull_request ?. base ?. ref ;
299
300
core . info ( `PR target branch: ${ targetBranch } ` ) ;
300
301
302
+ // Default target is this run itself
303
+ const target_url = `https://github.com/${ context . repo . owner } /${ context . repo . repo } /actions/runs/${ context . runId } ` ;
304
+
301
305
await summarizeChecksImpl (
302
306
github ,
303
307
core ,
@@ -307,6 +311,7 @@ export default async function summarizeChecks({ github, context, core }) {
307
311
head_sha ,
308
312
context . eventName ,
309
313
targetBranch ,
314
+ target_url ,
310
315
) ;
311
316
}
312
317
@@ -341,6 +346,7 @@ export function outputRunDetails(core, requiredCheckRuns, fyiCheckRuns) {
341
346
* @param {string } head_sha
342
347
* @param {string } event_name
343
348
* @param {string } targetBranch
349
+ * @param {string } target_url
344
350
* @returns {Promise<void> }
345
351
*/
346
352
export async function summarizeChecksImpl (
@@ -352,6 +358,7 @@ export async function summarizeChecksImpl(
352
358
head_sha ,
353
359
event_name ,
354
360
targetBranch ,
361
+ target_url ,
355
362
) {
356
363
core . info ( `Handling ${ event_name } event for PR #${ issue_number } in ${ owner } /${ repo } .` ) ;
357
364
@@ -428,6 +435,8 @@ export async function summarizeChecksImpl(
428
435
impactAssessment !== undefined ,
429
436
) ;
430
437
438
+ automatedChecksMet . target_url = target_url ;
439
+
431
440
core . info (
432
441
`Updating comment '${ NEXT_STEPS_COMMENT_ID } ' on ${ owner } /${ repo } #${ issue_number } with body: ${ commentBody } ` ,
433
442
) ;
@@ -482,7 +491,7 @@ export async function updateCommitStatus(github, core, owner, repo, head_sha, ch
482
491
? checkResult . summary . substring ( 0 , 137 ) + "..."
483
492
: checkResult . summary ,
484
493
context : checkResult . name ,
485
- // target_url: undefined, // Optional: add a URL if you want to link to more details
494
+ target_url : checkResult . target_url ,
486
495
} ) ;
487
496
488
497
core . info (
0 commit comments