Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 11, 2025

Implementation Complete

  • Create JavaScript helper function removeDuplicateTitleFromDescription(title, description) in pkg/workflow/js/remove_duplicate_title.cjs
  • Add comprehensive test suite in pkg/workflow/js/remove_duplicate_title.test.cjs (50 tests)
  • Apply helper to create_issue.cjs, create_discussion.cjs, create_pull_request.cjs
  • Apply helper to update_issue.cjs and update_pull_request.cjs via update_runner.cjs
  • Register helper in script registry and bundler
    • Added //go:embed directive for remove_duplicate_title.cjs in pkg/workflow/js.go
    • Added entry to GetJavaScriptSources() map for bundling
    • Helper is now automatically bundled into all scripts that require it
  • All tests pass (JavaScript: 2054, Go unit tests pass)
  • Build, format, lint successful

Changes

The helper function is now properly registered in the bundler system:

  • File: pkg/workflow/js.go
  • Added //go:embed js/remove_duplicate_title.cjs directive
  • Added "remove_duplicate_title.cjs": removeDuplicateTitleScript to GetJavaScriptSources() map
  • Verified bundling works for all 5 scripts that use the helper (create_issue, create_discussion, create_pull_request, update_issue, update_pull_request)
Original prompt

When creating an issue/discussion/pull request (any item with a title and description), add a JavaScript function that removes the duplicate title in the description

If the the title is T, and description start with # T, trim out the title in the description as it is already shown with the title

Create a JavaScript helper function that takes title/description and remove title from description , add extensive test suite

Any header level can be removed as long as it is be starting text

Apply to safe outputs that have title and description


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


Changeset

  • Type: patch
  • Description: Add JavaScript helper to remove duplicate titles from safe output descriptions and register it in the JS bundler; applied to create/update scripts for issues, discussions, and PRs.

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

@pelikhan
Copy link
Contributor

@copilot register helper in script registry, bundler

@github-actions

This comment has been minimized.

Copilot AI changed the title [WIP] Add function to remove duplicate title from description Add title deduplication for safe output descriptions Dec 11, 2025
Copilot AI requested a review from pelikhan December 11, 2025 03:58
@pelikhan
Copy link
Contributor

@copilot review bundling to make sure the new helper gets treated as GitHub script and bundled

@github-actions
Copy link
Contributor

Test Hide Older Comments - Run Complete ✅

Workflow Run ID: 20121471273
Timestamp: 2025-12-11T04:00:46.470Z

This comment was generated to test the hide-older-comments field. When this workflow runs again, previous comments from the same workflow should be hidden automatically.


This is an automated test comment

Ahoy! This treasure was crafted by 🏴‍☠️ Test Hide Older Comments fer issue #6088 🗺️

Copy link
Contributor Author

Copilot AI commented Dec 11, 2025

@copilot register helper in script registry, bundler

Done in cdf1997. The remove_duplicate_title.cjs helper is now registered in the script registry and bundler:

  • Added //go:embed directive in pkg/workflow/js.go
  • Added entry to GetJavaScriptSources() map
  • Helper is now automatically bundled into all scripts that use it (verified for create_issue, create_discussion, create_pull_request, update_issue, update_pull_request)

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 11, 2025

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

fc80ace

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

Last 2 PRs: #6073 (hide-older-comments), #6083 (runtime-import)
✅ File write: /tmp/gh-aw/agent/smoke-test-copilot-20121774263.txt
✅ Bash: File verified
✅ GitHub MCP: Listed PRs (default toolset works)
❌ get_me: Not available (expected - not in default toolset)
✅ Cache memory: /tmp/gh-aw/cache-memory/smoke-test-20121774263.txt

Status: PASS

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

@github-actions
Copy link
Contributor

Smoke test results:

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

@github-actions
Copy link
Contributor

Smoke Test Results

Recent PRs:

Test Results:

  • ✅ GitHub MCP: Retrieved 2 merged PRs
  • ✅ File Writing: Created /tmp/gh-aw/agent/smoke-test-claude-20121774250.txt
  • ✅ Bash Tool: Verified file content successfully
  • ✅ Playwright MCP: Navigated to GitHub, title contains "GitHub"
  • ✅ Cache Memory: Created /tmp/gh-aw/cache-memory/smoke-test-20121774250.txt
  • ❌ Safe Input gh Tool: Tool not available

Status: PASS (5/6 tests passed)

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

@github-actions
Copy link
Contributor

Smoke Test Results (Run 20121774253)

Playwright MCP: Successfully navigated to https://github.com - page title verified: "GitHub · Change is constant. GitHub keeps you ahead. · GitHub"
Cache Memory: Test file created and verified at /tmp/gh-aw/cache-memory/smoke-test-20121774253.txt
Safe Inputs gh: Failed with API connection error (HTTP/HTTPS mismatch)

Status: FAIL (1/3 tests passed)

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

@github-actions
Copy link
Contributor

Smoke Test Results (Run #20121774251)

Test Results:

  • ❌ GitHub MCP: safeinputs-gh tool failed (HTTP/HTTPS client error)
  • ✅ File Writing: Created test file successfully
  • ✅ Bash Tool: Verified file creation
  • ❌ Serena MCP: gh-aw binary not available
  • ❌ Safe Input gh: safeinputs-gh tool connectivity issue

Overall Status: FAIL

The safeinputs-gh tool has configuration issues preventing GitHub API access.

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

@pelikhan pelikhan marked this pull request as ready for review December 11, 2025 04:22
@pelikhan pelikhan merged commit 087f2c3 into main Dec 11, 2025
8 of 10 checks passed
@pelikhan pelikhan deleted the copilot/add-remove-title-from-description-function branch December 11, 2025 04:22
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.

2 participants