@@ -168,7 +168,7 @@ describe("messages.cjs", () => {
168168 runUrl : "https://github.com/test/repo/actions/runs/123" ,
169169 } ) ;
170170
171- expect ( result ) . toBe ( "> Generated by [Test Workflow](https://github.com/test/repo/actions/runs/123/agentic_workflow )" ) ;
171+ expect ( result ) . toBe ( "> Generated by [Test Workflow](https://github.com/test/repo/actions/runs/123)" ) ;
172172 } ) ;
173173
174174 it ( "should append triggering number when provided" , async ( ) => {
@@ -180,7 +180,7 @@ describe("messages.cjs", () => {
180180 triggeringNumber : 42 ,
181181 } ) ;
182182
183- expect ( result ) . toBe ( "> Generated by [Test Workflow](https://github.com/test/repo/actions/runs/123/agentic_workflow ) for issue #42" ) ;
183+ expect ( result ) . toBe ( "> Generated by [Test Workflow](https://github.com/test/repo/actions/runs/123) for issue #42" ) ;
184184 } ) ;
185185
186186 it ( "should use custom footer template" , async ( ) => {
@@ -255,7 +255,7 @@ describe("messages.cjs", () => {
255255 historyUrl : "https://github.com/search?q=repo:test/repo+is:issue&type=issues" ,
256256 } ) ;
257257
258- expect ( result ) . toBe ( "> Generated by [Test Workflow](https://github.com/test/repo/actions/runs/123/agentic_workflow ) · [◷](https://github.com/search?q=repo:test/repo+is:issue&type=issues)" ) ;
258+ expect ( result ) . toBe ( "> Generated by [Test Workflow](https://github.com/test/repo/actions/runs/123) · [◷](https://github.com/search?q=repo:test/repo+is:issue&type=issues)" ) ;
259259 } ) ;
260260
261261 it ( "should include both triggering number and history link when both are provided" , async ( ) => {
@@ -268,7 +268,7 @@ describe("messages.cjs", () => {
268268 historyUrl : "https://github.com/search?q=repo:test/repo+is:issue&type=issues" ,
269269 } ) ;
270270
271- expect ( result ) . toBe ( "> Generated by [Test Workflow](https://github.com/test/repo/actions/runs/123/agentic_workflow ) for issue #42 · [◷](https://github.com/search?q=repo:test/repo+is:issue&type=issues)" ) ;
271+ expect ( result ) . toBe ( "> Generated by [Test Workflow](https://github.com/test/repo/actions/runs/123) for issue #42 · [◷](https://github.com/search?q=repo:test/repo+is:issue&type=issues)" ) ;
272272 } ) ;
273273
274274 it ( "should not append history link when historyUrl is not provided" , async ( ) => {
@@ -331,7 +331,11 @@ describe("messages.cjs", () => {
331331 expect ( result ) . toBe ( "> Generated by [Test Workflow](https://github.com/test/repo/actions/runs/123/agentic_workflow)" ) ;
332332 } ) ;
333333
334- it ( "should use explicit agenticWorkflowUrl from context instead of computing from runUrl" , async ( ) => {
334+ it ( "should use explicit agenticWorkflowUrl from context in custom templates" , async ( ) => {
335+ process . env . GH_AW_SAFE_OUTPUT_MESSAGES = JSON . stringify ( {
336+ footer : "> Generated by [{workflow_name}]({agentic_workflow_url})" ,
337+ } ) ;
338+
335339 const { getFooterMessage } = await import ( "./messages.cjs" ) ;
336340
337341 const result = getFooterMessage ( {
@@ -341,7 +345,6 @@ describe("messages.cjs", () => {
341345 } ) ;
342346
343347 expect ( result ) . toBe ( "> Generated by [Test Workflow](https://github.com/test/repo/actions/runs/123/custom_path)" ) ;
344- expect ( result ) . not . toContain ( "/agentic_workflow" ) ;
345348 } ) ;
346349 } ) ;
347350
@@ -688,7 +691,7 @@ describe("messages.cjs", () => {
688691 runUrl : "https://github.com/test/repo/actions/runs/123" ,
689692 } ) ;
690693
691- expect ( result ) . toBe ( "> Generated from [Test Workflow](https://github.com/test/repo/actions/runs/123/agentic_workflow )" ) ;
694+ expect ( result ) . toBe ( "> Generated from [Test Workflow](https://github.com/test/repo/actions/runs/123)" ) ;
692695 expect ( result ) . not . toContain ( "●" ) ;
693696 } ) ;
694697
@@ -702,7 +705,7 @@ describe("messages.cjs", () => {
702705 runUrl : "https://github.com/test/repo/actions/runs/123" ,
703706 } ) ;
704707
705- expect ( result ) . toBe ( "> Generated from [Test Workflow](https://github.com/test/repo/actions/runs/123/agentic_workflow ) · ● 12.5K" ) ;
708+ expect ( result ) . toBe ( "> Generated from [Test Workflow](https://github.com/test/repo/actions/runs/123) · ● 12.5K" ) ;
706709 } ) ;
707710
708711 it ( "should include effective tokens before history link in default footer" , async ( ) => {
@@ -717,7 +720,7 @@ describe("messages.cjs", () => {
717720 historyUrl,
718721 } ) ;
719722
720- expect ( result ) . toBe ( `> Generated from [Test Workflow](https://github.com/test/repo/actions/runs/123/agentic_workflow ) · ● 5K · [◷](${ historyUrl } )` ) ;
723+ expect ( result ) . toBe ( `> Generated from [Test Workflow](https://github.com/test/repo/actions/runs/123) · ● 5K · [◷](${ historyUrl } )` ) ;
721724 } ) ;
722725
723726 it ( "should not include effective tokens in custom footer unless placeholder is used" , async ( ) => {
@@ -763,7 +766,7 @@ describe("messages.cjs", () => {
763766 runUrl : "https://github.com/test/repo/actions/runs/123" ,
764767 } ) ;
765768
766- expect ( result ) . toBe ( "> Generated from [Test Workflow](https://github.com/test/repo/actions/runs/123/agentic_workflow )" ) ;
769+ expect ( result ) . toBe ( "> Generated from [Test Workflow](https://github.com/test/repo/actions/runs/123)" ) ;
767770 expect ( result ) . not . toContain ( "●" ) ;
768771 } ) ;
769772
@@ -777,7 +780,7 @@ describe("messages.cjs", () => {
777780 runUrl : "https://github.com/test/repo/actions/runs/123" ,
778781 } ) ;
779782
780- expect ( result ) . toBe ( "> Generated from [Test Workflow](https://github.com/test/repo/actions/runs/123/agentic_workflow ) · ● 12.5K" ) ;
783+ expect ( result ) . toBe ( "> Generated from [Test Workflow](https://github.com/test/repo/actions/runs/123) · ● 12.5K" ) ;
781784 } ) ;
782785
783786 it ( "should include effective tokens before history link in default footer" , async ( ) => {
@@ -792,7 +795,7 @@ describe("messages.cjs", () => {
792795 historyUrl,
793796 } ) ;
794797
795- expect ( result ) . toBe ( `> Generated from [Test Workflow](https://github.com/test/repo/actions/runs/123/agentic_workflow ) · ● 5K · [◷](${ historyUrl } )` ) ;
798+ expect ( result ) . toBe ( `> Generated from [Test Workflow](https://github.com/test/repo/actions/runs/123) · ● 5K · [◷](${ historyUrl } )` ) ;
796799 } ) ;
797800
798801 it ( "should not include effective tokens in custom footer unless placeholder is used" , async ( ) => {
0 commit comments