Skip to content

Add generated asset links to conclusion job comment updates - #5940

Merged
pelikhan merged 8 commits into
mainfrom
copilot/update-comment-message-links
Dec 9, 2025
Merged

Add generated asset links to conclusion job comment updates#5940
pelikhan merged 8 commits into
mainfrom
copilot/update-comment-message-links

Conversation

Copilot AI commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

The conclusion job now includes direct links to created assets (issues, PRs, comments, branches, etc.) in the workflow completion comment, eliminating the need to search through logs.

Changes

Backend (pkg/workflow/notify_comment.go)

  • Added buildSafeOutputJobsEnvVars() to map safe output jobs to their URL outputs and generate corresponding environment variables
  • Modified buildConclusionJob() to pass job metadata and URL expressions as env vars to the conclusion script
  • Supports: create_issue, add_comment, create_pull_request, create_discussion, create_pr_review_comment, close_issue, close_pull_request, close_discussion, create_agent_task, push_to_pull_request_branch

Frontend (pkg/workflow/js/notify_comment_error.cjs)

  • Added collectGeneratedAssets() to extract URLs from environment variables using the job metadata mapping
  • Appends generated asset URLs directly to the comment message for GitHub's automatic rich preview rendering

Example

Given a workflow that creates an issue, a PR, and pushes to a branch, the conclusion comment now displays:

🎉 Yo ho ho! [Workflow Name](run-url) found the treasure and completed successfully! ⚓💰

https://github.com/owner/repo/issues/42
https://github.com/owner/repo/pull/5
https://github.com/owner/repo/tree/feature-branch

GitHub automatically renders these URLs with rich preview cards showing the issue/PR title, status, labels, branch details, and other metadata.

The implementation passes URL outputs through GitHub Actions expressions (${{ needs.job.outputs.url }}), maintaining the existing job dependency model without additional API calls.

[!WARNING]

Original prompt

The comment message update in the conclusion job should also include links to generate assets like new issues, PRs, comments, commits...


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Changeset

  • Type: patch
  • Description: Adds generated asset links (issues, PRs, comments, etc.) to the conclusion job's workflow completion comment so created assets appear as direct links with GitHub rich previews.

🏴‍☠️ Ahoy! This treasure was crafted by Changeset Generator


Changeset

  • Type: patch
  • Description: Adds generated asset links (issues, PRs, comments, etc.) to the conclusion job's workflow completion comment so created assets appear as direct links with GitHub rich previews.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator

Copilot AI and others added 2 commits December 9, 2025 12:18
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Modified notify_comment.go to pass safe output job information
- Added buildSafeOutputJobsEnvVars helper to generate env vars for URLs
- Updated notify_comment_error.cjs to collect and display asset URLs
- Added collectGeneratedAssets function to process job outputs
- Added comprehensive tests for both Go and JavaScript changes
- All tests passing

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
// Collect generated asset URLs from safe output jobs
const generatedAssets = collectGeneratedAssets();
if (generatedAssets.length > 0) {
message += "\n\n### Generated Assets\n\n";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot remove title

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 29f37d2. Removed the "### Generated Assets" heading - URLs are now displayed directly.

if (generatedAssets.length > 0) {
message += "\n\n### Generated Assets\n\n";
generatedAssets.forEach(asset => {
message += `- ${asset.label}: ${asset.url}\n`;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot just put the link and github will pretty render it. Remove custom label code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 29f37d2. Removed all custom labels - now displaying just the raw URLs so GitHub can render them with rich previews.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update comment message to include asset generation links Add generated asset links to conclusion job comment updates Dec 9, 2025
Copilot AI requested a review from pelikhan December 9, 2025 12:46
Remove "Generated Assets" heading and custom labels per PR feedback.
Now displays just the URLs so GitHub can render them with rich previews.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot Playwright is now investigating this pull request. Sources say the story is developing...

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

💥 WHOOSH! Smoke Claude springs into action on this pull request! [Panel 1 begins...]

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

📰🚀🔍👀📡🕵️ https://github.com/githubnext/gh-aw/actions/runs/20064257991

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

🔮 The ancient spirits stir... Smoke Codex awakens to divine this pull request...

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

Copilot Smoke Test Results

PR Titles: ❌ (GitHub MCP connection error)
File Writing:
Bash Tool:
Serena MCP: ❌ (not tested - GitHub MCP prerequisite failed)
safeinputs-gh: ❌ (HTTP/HTTPS client error)

Overall Status: ❌ FAIL

Issues: GitHub API connection failures preventing MCP and gh tool testing.

📰🔥📋 https://github.com/githubnext/gh-aw/actions/runs/20064257991 fer issue #5940 🗺️

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

Smoke Test Results for Copilot Engine

Status: PASS

📰 BREAKING: Report filed by Smoke Copilot fer issue #5940 🗺️

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

Smoke Test Results - Run 20064257950

Playwright MCP: Successfully navigated to https://github.com - page title verified as "GitHub · Change is constant. GitHub keeps you ahead. · GitHub"
Cache Memory: Successfully created /tmp/gh-aw/cache-memory/smoke-test-20064257950.txt with correct content
safeinputs-gh Tool: Failed with "http: server gave HTTP response to HTTPS client" error

Overall Status: FAIL (1/3 tests passed)

📰 BREAKING: Report filed by Smoke Copilot Playwright fer issue #5940 🗺️

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

Smoke Test Results - Claude Engine

Last 2 Merged PRs:

Test Results:

  • ✅ GitHub MCP: Retrieved recent PRs
  • ✅ File Writing: Created /tmp/gh-aw/agent/smoke-test-claude-20064257989.txt
  • ✅ Bash Tool: Verified file contents
  • ✅ Playwright MCP: Navigated to GitHub, title contains "GitHub"
  • ✅ Cache Memory: Created /tmp/gh-aw/cache-memory/smoke-test-20064257989.txt

Status: PASS

💥 [THE END] — Illustrated by Smoke Claude fer issue #5940 🗺️

@pelikhan

pelikhan commented Dec 9, 2025

Copy link
Copy Markdown
Collaborator

@copilot add support for commit for push to pull request branch

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

Recent merged PRs:

  • Convert safe outputs MCP server to node process with individual module files
  • [WIP] Add daily agentic workflow for specification updates
    GitHub MCP ✅
    Agent file write/read ✅
    Cache memory ✅
    Playwright title ✅
    safeinputs-gh issues list ❌ (command not found)
    Overall: FAIL

🔮 The oracle has spoken through Smoke Codex fer issue #5940 🗺️

Add push_to_pull_request_branch to safe output jobs that display URLs.
The job outputs push_url which links to the branch tree view.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Dec 9, 2025

Copy link
Copy Markdown
Contributor Author

@copilot add support for commit for push to pull request branch

Done in da4dd99. Added support for push_to_pull_request_branch - it will now display the push_url (branch tree view link) in the conclusion comment.

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

🔮 The ancient spirits stir... Smoke Codex awakens to divine this pull request...

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

📰🚀🔍👀📡🕵️ https://github.com/githubnext/gh-aw/actions/runs/20064608016

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

💥 WHOOSH! Smoke Claude springs into action on this pull request! [Panel 1 begins...]

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot Playwright is now investigating this pull request. Sources say the story is developing...

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

Smoke Test Results (Claude - Run 20064608018)

Recent PRs:

Test Results:
✅ GitHub MCP - Retrieved recent PRs
✅ File Writing - Created agent test file
✅ Bash Tool - Verified file creation
✅ Playwright MCP - Navigated to GitHub, title verified
✅ Cache Memory - Created and verified cache file
❌ Safe Inputs gh Tool - Not authenticated in workflow

Status: PASS (5/6 tests passed - gh CLI not available in this context)

💥 [THE END] — Illustrated by Smoke Claude fer issue #5940 🗺️

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

Smoke Test Results (Run 20064608017)

Playwright: GitHub page loaded, title verified
Cache Memory: Test file created successfully
safeinputs-gh: HTTP/HTTPS protocol mismatch

Overall: FAIL (1/3 tests failed)

📰 BREAKING: Report filed by Smoke Copilot Playwright fer issue #5940 🗺️

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

Smoke Test Results

PR #5940

Test Results:

  • ❌ GitHub MCP Testing (safeinputs-gh tool failed with HTTP/HTTPS error)
  • ✅ File Writing Testing
  • ✅ Bash Tool Testing
  • ⏭️ Serena MCP Testing (skipped - MCP tool unavailable)
  • ❌ Safe Input gh Tool Testing (HTTP/HTTPS client error)

Overall Status: FAIL

Note: safeinputs-gh tool experiencing connectivity issues with GitHub API.

📰🔥📋 https://github.com/githubnext/gh-aw/actions/runs/20064608016 fer issue #5940 🗺️

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

Smoke Test Results - Run 20064608010

GitHub MCP - PR #5943: [WIP] Format message footer to use emoji as link text
GitHub MCP - PR #5919: Convert safe outputs MCP server to node process
File Writing - Created test file successfully
Bash Tools - Verified file contents
Default Toolsets - get_me not available as expected (403 error confirms)
Cache Memory - Test file created and verified

Tools Available: bash, view, edit, create, glob, grep, github-* (repos/issues/PRs/search), safeoutputs-* (create_issue/add_comment/add_labels/noop/missing_tool)

Overall Status: PASS

📰 BREAKING: Report filed by Smoke Copilot fer issue #5940 🗺️

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

Recent merged PRs: [WIP] Format message footer to use emoji as link text; [docs] Update documentation for features from December 8-9, 2025
GitHub MCP: ✅
File write/read: ✅
Playwright title: ✅
Cache memory: ✅
safeinputs-gh: ❌ (tool unavailable here)
Overall: FAIL

🔮 The oracle has spoken through Smoke Codex fer issue #5940 🗺️

@pelikhan
pelikhan marked this pull request as ready for review December 9, 2025 13:15
@pelikhan
pelikhan merged commit 8cec2c8 into main Dec 9, 2025
14 of 15 checks passed
@pelikhan
pelikhan deleted the copilot/update-comment-message-links branch December 9, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants