Skip to content

Fix npm URL format in cli-version-checker workflow#3496

Merged
pelikhan merged 2 commits intomainfrom
copilot/fix-npm-url-format
Nov 8, 2025
Merged

Fix npm URL format in cli-version-checker workflow#3496
pelikhan merged 2 commits intomainfrom
copilot/fix-npm-url-format

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 8, 2025

The cli-version-checker workflow was generating malformed npm URLs with backticks around package names. The AI agent interpreted the @package-name placeholder as code that should be wrapped with markdown backticks, producing URLs like:

https://www.npmjs.com/package/`@github/copilot`

Instead of:

https://www.npmjs.com/package/@github/copilot

Changes

Enhanced URL formatting guidance (lines 100-104):

  • Replaced generic rules with explicit CORRECT/INCORRECT examples
  • Shows proper format: https://www.npmjs.com/package/@github/copilot
  • Shows incorrect formats with backticks to avoid

Updated template placeholder (lines 119-120):

  • Changed heading from "Changelog Links" to "Package Links"
  • Replaced @package-name with package-name-here to prevent backtick wrapping

The @ symbol in the original placeholder triggered markdown formatting interpretation, causing the AI to treat package names as inline code.

Fixes #3482

Original prompt

This section details on the original issue you should resolve

<issue_title>[q] Fix npm URL format in cli-version-checker workflow</issue_title>
<issue_description># Q Workflow Optimization Report

Issue Found

Workflow: cli-version-checker
Issue Number: #3482
Problem: The workflow was generating npm URLs with backticks around package names, resulting in malformed URLs like:

(redacted)

Instead of the correct format:

(redacted)

Root Cause

The issue template in the workflow prompt used @package-name as a placeholder, which the AI interpreted as needing backticks for code formatting when substituting actual package names.

Changes Made

.github/workflows/cli-version-checker.md

  1. Enhanced URL Formatting Rules (lines 100-105):

    • Added explicit CORRECT/INCORRECT examples
    • Changed from generic guidance to concrete examples
    • CORRECT: `(redacted)
    • INCORRECT: `(redacted)
  2. Updated Template Section (lines 117-120):

    • Changed heading from "Changelog Links" to "Package Links"
    • Changed placeholder from @package-name to package-name-here
    • Removed the @ symbol to avoid confusion with scoped packages

Expected Improvements

  • Future issues created by the cli-version-checker workflow will have properly formatted npm URLs
  • No more backticks around package names in URLs
  • Clearer guidance for the AI agent on URL formatting

Validation

✅ Workflow compiled successfully using gh aw compile cli-version-checker
✅ No compilation errors or warnings
✅ Changes are minimal and surgical - only affecting the problematic template section

Note: .lock.yml file will be regenerated automatically after merge.

References

AI generated by Q


[!NOTE]
This was originally intended as a pull request, but the git push operation failed.

Workflow Run: View run details and download patch artifact

The patch file is available as an artifact (aw.patch) in the workflow run linked above.
To apply the patch locally:

# Download the artifact from the workflow run https://github.com/githubnext/gh-aw/actions/runs/19195890013
# (Use GitHub MCP tools if gh CLI is not available)
gh run download 19195890013 -n aw.patch
# Apply the patch
git am aw.patch
Show patch preview (53 of 53 lines)
From 8d7bb18da013b23a50daa240d5c0a618856e31be Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Sat, 8 Nov 2025 16:57:38 +0000
Subject: [PATCH] Fix npm URL format in cli-version-checker workflow

Fixes issue githubnext/gh-aw#3482 where npm URLs were being generated with backticks
around package names (e.g., `@anthropic-ai/claude-code`) instead of
plain URLs.

Changes:
- Updated URL formatting rules with explicit CORRECT/INCORRECT examples
- Changed template from '@package-name' to 'package-name-here'
- Added clearer guidance about not using markdown formatting in URLs
---
 .github/workflows/cli-version-checker.md | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/cli-version-checker.md b/.github/workflows/cli-version-checker.md
index ef5ac11..8c9d6fe 100644
--- a/.github/workflows/cli-version-checker.md
+++ b/.github/workflows/cli-version-checker.md
@@ -98,9 +98,11 @@ Include for each updated CLI:
 - **CLI Changes**: New commands, flags, or removed features discovered via help
 
 **URL Formatting Rules**:
-- Use plain URLs: `https://www.npmjs.com/package/@package-name`
-- Do NOT use backticks in URLs
-- Package names in URLs should not be wrapped in backticks
+- Use plain URLs without any markdown formatting
+- Do NOT wrap package names in backticks
+- CORRECT: https://www.npmjs.com/package/@anthropic-ai/claude-code
+- INCORRECT: https://www.npmjs.com/package/`@anthropic-ai/claude-code`
+- Package names should be part of the URL, not formatted as code
 
 Template structure:

@@ -115,9 +117,9 @@ Template structure:

  • Impact: Risk [Low/Medium/High], affects [features]
  • Migration: [Yes/No - details if yes]

-## Changelog Links
-- NPM Package: https://www.npmjs.com/package/@package-name
-- Repository: [GitHub URL if available]
+### Package Links
+- NPM Package: https://www.npmjs.com/package/package-name-here
+- Repository: [URL to repository if available]

... (truncated)


</details></issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


</details>

- Fixes githubnext/gh-aw#3493

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 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](https://gh.io/copilot-coding-agent-tips) in the docs.

- Enhanced URL Formatting Rules section with explicit CORRECT/INCORRECT examples
- Changed "Changelog Links" heading to "Package Links"
- Changed placeholder from @package-name to package-name-here
- Removes @ symbol to avoid confusion with scoped packages
- Prevents AI from wrapping package names with backticks in URLs

Fixes #3482

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix npm URL format in cli-version-checker workflow Fix npm URL format in cli-version-checker workflow Nov 8, 2025
Copilot AI requested a review from pelikhan November 8, 2025 19:12
@pelikhan pelikhan marked this pull request as ready for review November 8, 2025 19:19
Copilot AI review requested due to automatic review settings November 8, 2025 19:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves the documentation for URL formatting rules in the CLI version checker workflow. The changes clarify how to format URLs correctly by using concrete examples instead of abstract descriptions, and updates the section heading from "Changelog Links" to the more accurate "Package Links".

Key Changes

  • Enhanced URL formatting rules with concrete CORRECT/INCORRECT examples to prevent backtick misuse
  • Renamed "Changelog Links" section to "Package Links" for better accuracy
  • Simplified placeholder text from @package-name to package-name-here for clarity

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/cli-version-checker.md Updated documentation with clearer URL formatting rules, concrete examples, and corrected section heading
.github/workflows/cli-version-checker.lock.yml Synchronized changes from the source workflow file to the compiled lock file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pelikhan pelikhan merged commit 083c029 into main Nov 8, 2025
76 of 80 checks passed
@pelikhan pelikhan deleted the copilot/fix-npm-url-format branch November 8, 2025 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ca] Update Agentic CLI Tools: Claude Code 2.0.36, Codex 0.56.0

3 participants