diff --git a/.github/workflows/audit-workflows.lock.yml b/.github/workflows/audit-workflows.lock.yml index a9580818d39..4ba03324b3a 100644 --- a/.github/workflows/audit-workflows.lock.yml +++ b/.github/workflows/audit-workflows.lock.yml @@ -7666,7 +7666,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -7707,7 +7707,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/copilot-pr-nlp-analysis.lock.yml b/.github/workflows/copilot-pr-nlp-analysis.lock.yml index 516748888a2..140bd7d8985 100644 --- a/.github/workflows/copilot-pr-nlp-analysis.lock.yml +++ b/.github/workflows/copilot-pr-nlp-analysis.lock.yml @@ -8559,7 +8559,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -8600,7 +8600,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/copilot-session-insights.lock.yml b/.github/workflows/copilot-session-insights.lock.yml index 5b46430e5c4..2b6ba31969a 100644 --- a/.github/workflows/copilot-session-insights.lock.yml +++ b/.github/workflows/copilot-session-insights.lock.yml @@ -8651,7 +8651,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -8692,7 +8692,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/daily-copilot-token-report.lock.yml b/.github/workflows/daily-copilot-token-report.lock.yml index b6979e94a52..8fca0b5605a 100644 --- a/.github/workflows/daily-copilot-token-report.lock.yml +++ b/.github/workflows/daily-copilot-token-report.lock.yml @@ -8649,7 +8649,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -8690,7 +8690,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/daily-file-diet.lock.yml b/.github/workflows/daily-file-diet.lock.yml index 84014dc3697..210a9f50261 100644 --- a/.github/workflows/daily-file-diet.lock.yml +++ b/.github/workflows/daily-file-diet.lock.yml @@ -8815,7 +8815,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -8856,7 +8856,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/daily-firewall-report.lock.yml b/.github/workflows/daily-firewall-report.lock.yml index 2323ebd731c..ab79737b3d4 100644 --- a/.github/workflows/daily-firewall-report.lock.yml +++ b/.github/workflows/daily-firewall-report.lock.yml @@ -8332,7 +8332,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -8373,7 +8373,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/daily-issues-report.lock.yml b/.github/workflows/daily-issues-report.lock.yml index 60f9e41a905..ba2972217e8 100644 --- a/.github/workflows/daily-issues-report.lock.yml +++ b/.github/workflows/daily-issues-report.lock.yml @@ -9206,7 +9206,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -9247,7 +9247,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/daily-multi-device-docs-tester.lock.yml b/.github/workflows/daily-multi-device-docs-tester.lock.yml index 4230120e460..dca4d3da817 100644 --- a/.github/workflows/daily-multi-device-docs-tester.lock.yml +++ b/.github/workflows/daily-multi-device-docs-tester.lock.yml @@ -7266,7 +7266,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -7307,7 +7307,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/daily-news.lock.yml b/.github/workflows/daily-news.lock.yml index d7ac8f6ae0d..5021ff09e5c 100644 --- a/.github/workflows/daily-news.lock.yml +++ b/.github/workflows/daily-news.lock.yml @@ -8454,7 +8454,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -8495,7 +8495,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/daily-performance-summary.lock.yml b/.github/workflows/daily-performance-summary.lock.yml index 1c0dd9ac8bb..7681eadf9f7 100644 --- a/.github/workflows/daily-performance-summary.lock.yml +++ b/.github/workflows/daily-performance-summary.lock.yml @@ -10277,7 +10277,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -10318,7 +10318,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/daily-repo-chronicle.lock.yml b/.github/workflows/daily-repo-chronicle.lock.yml index 943b93059ea..7ff0a27ddfe 100644 --- a/.github/workflows/daily-repo-chronicle.lock.yml +++ b/.github/workflows/daily-repo-chronicle.lock.yml @@ -8375,7 +8375,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -8416,7 +8416,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/deep-report.lock.yml b/.github/workflows/deep-report.lock.yml index 86dec525176..75965528401 100644 --- a/.github/workflows/deep-report.lock.yml +++ b/.github/workflows/deep-report.lock.yml @@ -8374,7 +8374,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -8415,7 +8415,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/docs-noob-tester.lock.yml b/.github/workflows/docs-noob-tester.lock.yml index 092022fa95b..c707d2ad9a9 100644 --- a/.github/workflows/docs-noob-tester.lock.yml +++ b/.github/workflows/docs-noob-tester.lock.yml @@ -7842,7 +7842,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -7883,7 +7883,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/github-mcp-structural-analysis.lock.yml b/.github/workflows/github-mcp-structural-analysis.lock.yml index 7c5e9318666..b92a5a28d4d 100644 --- a/.github/workflows/github-mcp-structural-analysis.lock.yml +++ b/.github/workflows/github-mcp-structural-analysis.lock.yml @@ -8004,7 +8004,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -8045,7 +8045,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/intelligence.lock.yml b/.github/workflows/intelligence.lock.yml index 9d8e5e216a4..c865d19c013 100644 --- a/.github/workflows/intelligence.lock.yml +++ b/.github/workflows/intelligence.lock.yml @@ -8805,7 +8805,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -8846,7 +8846,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/org-health-report.lock.yml b/.github/workflows/org-health-report.lock.yml index 38f1957f13d..86c8b33e999 100644 --- a/.github/workflows/org-health-report.lock.yml +++ b/.github/workflows/org-health-report.lock.yml @@ -8485,7 +8485,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -8526,7 +8526,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/poem-bot.lock.yml b/.github/workflows/poem-bot.lock.yml index 61b58f4abc6..bfe6ae1a7bb 100644 --- a/.github/workflows/poem-bot.lock.yml +++ b/.github/workflows/poem-bot.lock.yml @@ -13341,7 +13341,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -13382,7 +13382,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/portfolio-analyst.lock.yml b/.github/workflows/portfolio-analyst.lock.yml index 7b767db7789..d7f8bdaa2bd 100644 --- a/.github/workflows/portfolio-analyst.lock.yml +++ b/.github/workflows/portfolio-analyst.lock.yml @@ -8480,7 +8480,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -8521,7 +8521,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/python-data-charts.lock.yml b/.github/workflows/python-data-charts.lock.yml index 9ea3e506985..be14f4f9c58 100644 --- a/.github/workflows/python-data-charts.lock.yml +++ b/.github/workflows/python-data-charts.lock.yml @@ -8777,7 +8777,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -8818,7 +8818,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/stale-repo-identifier.lock.yml b/.github/workflows/stale-repo-identifier.lock.yml index 37ea70372af..85514f6f4fd 100644 --- a/.github/workflows/stale-repo-identifier.lock.yml +++ b/.github/workflows/stale-repo-identifier.lock.yml @@ -8287,7 +8287,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -8328,7 +8328,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/technical-doc-writer.lock.yml b/.github/workflows/technical-doc-writer.lock.yml index 3340d3b4616..1bda54f75fe 100644 --- a/.github/workflows/technical-doc-writer.lock.yml +++ b/.github/workflows/technical-doc-writer.lock.yml @@ -8809,7 +8809,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -8850,7 +8850,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/unbloat-docs.lock.yml b/.github/workflows/unbloat-docs.lock.yml index 7f6c90f06e3..420094d182a 100644 --- a/.github/workflows/unbloat-docs.lock.yml +++ b/.github/workflows/unbloat-docs.lock.yml @@ -9016,7 +9016,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -9057,7 +9057,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/.github/workflows/weekly-issue-summary.lock.yml b/.github/workflows/weekly-issue-summary.lock.yml index a3a50351512..632cf88ad20 100644 --- a/.github/workflows/weekly-issue-summary.lock.yml +++ b/.github/workflows/weekly-issue-summary.lock.yml @@ -8283,7 +8283,7 @@ jobs: await exec.exec(`git rm -rf .`); await exec.exec(`git clean -fdx`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { try { const { fileName, sha, size, targetFileName } = asset; if (!fileName || !sha || !targetFileName) { @@ -8324,7 +8324,7 @@ jobs: core.summary.addRaw("## Assets").addRaw(`Successfully uploaded **${uploadCount}** assets to branch \`${normalizedBranchName}\``).addRaw(""); core.info(`Successfully uploaded ${uploadCount} assets to branch ${normalizedBranchName}`); } - for (const asset of uploadAssetItems) { + for (const asset of allUploadItems) { if (asset.fileName && asset.sha && asset.size && asset.url) { core.summary.addRaw(`- [\`${asset.fileName}\`](${asset.url}) → \`${asset.targetFileName}\` (${asset.size} bytes)`); } diff --git a/cmd/gh-aw/argument_syntax_test.go b/cmd/gh-aw/argument_syntax_test.go new file mode 100644 index 00000000000..7fc9b77b4c8 --- /dev/null +++ b/cmd/gh-aw/argument_syntax_test.go @@ -0,0 +1,437 @@ +//go:build integration + +package main + +import ( + "regexp" + "strings" + "testing" + + "github.com/githubnext/gh-aw/pkg/campaign" + "github.com/githubnext/gh-aw/pkg/cli" + "github.com/spf13/cobra" +) + +// TestArgumentSyntaxConsistency verifies that command argument syntax is consistent with validators +func TestArgumentSyntaxConsistency(t *testing.T) { + tests := []struct { + name string + command *cobra.Command + expectedUse string + argsValidator string // Description of the Args validator + shouldValidate func(*cobra.Command) error + }{ + // Commands with required arguments (using angle brackets <>) + { + name: "run command requires workflow", + command: runCmd, + expectedUse: "run ...", + argsValidator: "MinimumNArgs(1)", + shouldValidate: func(cmd *cobra.Command) error { return cmd.Args(cmd, []string{"test"}) }, + }, + { + name: "audit command requires run-id", + command: cli.NewAuditCommand(), + expectedUse: "audit ", + argsValidator: "ExactArgs(1)", + shouldValidate: func(cmd *cobra.Command) error { return cmd.Args(cmd, []string{"123456"}) }, + }, + { + name: "trial command requires workflow-spec", + command: cli.NewTrialCommand(validateEngine), + expectedUse: "trial ...", + argsValidator: "MinimumNArgs(1)", + shouldValidate: func(cmd *cobra.Command) error { return cmd.Args(cmd, []string{"test"}) }, + }, + { + name: "add command requires workflow", + command: cli.NewAddCommand(validateEngine), + expectedUse: "add ...", + argsValidator: "MinimumNArgs(1)", + shouldValidate: func(cmd *cobra.Command) error { return cmd.Args(cmd, []string{"test"}) }, + }, + { + name: "campaign new requires campaign-id", + command: findSubcommand(campaign.NewCommand(), "new"), + expectedUse: "new ", + argsValidator: "MaximumNArgs(1) with custom validation", + shouldValidate: nil, // Skip validation as it has custom error handling + }, + + // Commands with optional arguments (using square brackets []) + { + name: "new command has optional workflow", + command: newCmd, + expectedUse: "new [workflow]", + argsValidator: "MaximumNArgs(1)", + shouldValidate: func(cmd *cobra.Command) error { return cmd.Args(cmd, []string{}) }, + }, + { + name: "remove command has optional pattern", + command: removeCmd, + expectedUse: "remove [pattern]", + argsValidator: "no validator (all optional)", + shouldValidate: func(cmd *cobra.Command) error { return nil }, + }, + { + name: "enable command has optional workflow", + command: enableCmd, + expectedUse: "enable [workflow]...", + argsValidator: "no validator (all optional)", + shouldValidate: func(cmd *cobra.Command) error { return nil }, + }, + { + name: "disable command has optional workflow", + command: disableCmd, + expectedUse: "disable [workflow]...", + argsValidator: "no validator (all optional)", + shouldValidate: func(cmd *cobra.Command) error { return nil }, + }, + { + name: "compile command has optional workflow", + command: compileCmd, + expectedUse: "compile [workflow]...", + argsValidator: "no validator (all optional)", + shouldValidate: func(cmd *cobra.Command) error { return nil }, + }, + { + name: "logs command has optional workflow", + command: cli.NewLogsCommand(), + expectedUse: "logs [workflow]", + argsValidator: "no validator (all optional)", + shouldValidate: func(cmd *cobra.Command) error { return nil }, + }, + { + name: "fix command has optional workflow", + command: cli.NewFixCommand(), + expectedUse: "fix [workflow]...", + argsValidator: "no validator (all optional)", + shouldValidate: func(cmd *cobra.Command) error { return nil }, + }, + { + name: "update command has optional workflow", + command: cli.NewUpdateCommand(validateEngine), + expectedUse: "update [workflow]...", + argsValidator: "no validator (all optional)", + shouldValidate: func(cmd *cobra.Command) error { return nil }, + }, + { + name: "status command has optional pattern", + command: cli.NewStatusCommand(), + expectedUse: "status [pattern]", + argsValidator: "no validator (all optional)", + shouldValidate: func(cmd *cobra.Command) error { return nil }, + }, + { + name: "campaign command has optional filter", + command: campaign.NewCommand(), + expectedUse: "campaign [filter]", + argsValidator: "MaximumNArgs(1)", + shouldValidate: func(cmd *cobra.Command) error { return cmd.Args(cmd, []string{}) }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + // Check Use pattern + use := tt.command.Use + if use != tt.expectedUse { + t.Errorf("Command Use=%q, expected %q", use, tt.expectedUse) + } + + // Validate the Use pattern format + if !isValidUseSyntax(use) { + t.Errorf("Command Use=%q has invalid syntax", use) + } + + // Skip validation check if not provided + if tt.shouldValidate == nil { + return + } + + // Validate that the Args validator works as expected + if err := tt.shouldValidate(tt.command); err != nil { + t.Errorf("Args validator failed for command %q: %v", tt.command.Name(), err) + } + }) + } +} + +// TestMCPSubcommandArgumentSyntax verifies MCP subcommands have consistent syntax +func TestMCPSubcommandArgumentSyntax(t *testing.T) { + mcpCmd := cli.NewMCPCommand() + + tests := []struct { + name string + subcommand string + expectedUse string + }{ + { + name: "mcp list has optional workflow", + subcommand: "list", + expectedUse: "list [workflow]", + }, + { + name: "mcp inspect has optional workflow", + subcommand: "inspect", + expectedUse: "inspect [workflow]", + }, + { + name: "mcp add has optional workflow and server", + subcommand: "add", + expectedUse: "add [workflow] [server]", + }, + { + name: "mcp list-tools requires server with optional workflow", + subcommand: "list-tools", + expectedUse: "list-tools [workflow]", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + // Find the subcommand + var foundCmd *cobra.Command + for _, cmd := range mcpCmd.Commands() { + if cmd.Name() == tt.subcommand { + foundCmd = cmd + break + } + } + + if foundCmd == nil { + t.Fatalf("MCP subcommand %q not found", tt.subcommand) + } + + use := foundCmd.Use + if use != tt.expectedUse { + t.Errorf("MCP subcommand Use=%q, expected %q", use, tt.expectedUse) + } + + // Validate the Use pattern format + if !isValidUseSyntax(use) { + t.Errorf("MCP subcommand Use=%q has invalid syntax", use) + } + }) + } +} + +// TestPRSubcommandArgumentSyntax verifies PR subcommands have consistent syntax +func TestPRSubcommandArgumentSyntax(t *testing.T) { + prCmd := cli.NewPRCommand() + + tests := []struct { + name string + subcommand string + expectedUse string + }{ + { + name: "pr transfer requires pr-url", + subcommand: "transfer", + expectedUse: "transfer ", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + // Find the subcommand + var foundCmd *cobra.Command + for _, cmd := range prCmd.Commands() { + if cmd.Name() == tt.subcommand { + foundCmd = cmd + break + } + } + + if foundCmd == nil { + t.Fatalf("PR subcommand %q not found", tt.subcommand) + } + + use := foundCmd.Use + if use != tt.expectedUse { + t.Errorf("PR subcommand Use=%q, expected %q", use, tt.expectedUse) + } + + // Validate the Use pattern format + if !isValidUseSyntax(use) { + t.Errorf("PR subcommand Use=%q has invalid syntax", use) + } + }) + } +} + +// TestCampaignSubcommandArgumentSyntax verifies campaign subcommands have consistent syntax +func TestCampaignSubcommandArgumentSyntax(t *testing.T) { + campaignCmd := campaign.NewCommand() + + tests := []struct { + name string + subcommand string + expectedUse string + }{ + { + name: "campaign status has optional filter", + subcommand: "status", + expectedUse: "status [filter]", + }, + { + name: "campaign new requires campaign-id", + subcommand: "new", + expectedUse: "new ", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + // Find the subcommand + var foundCmd *cobra.Command + for _, cmd := range campaignCmd.Commands() { + if cmd.Name() == tt.subcommand { + foundCmd = cmd + break + } + } + + if foundCmd == nil { + t.Fatalf("Campaign subcommand %q not found", tt.subcommand) + } + + use := foundCmd.Use + if use != tt.expectedUse { + t.Errorf("Campaign subcommand Use=%q, expected %q", use, tt.expectedUse) + } + + // Validate the Use pattern format + if !isValidUseSyntax(use) { + t.Errorf("Campaign subcommand Use=%q has invalid syntax", use) + } + }) + } +} + +// findSubcommand finds a subcommand by name in a command +func findSubcommand(cmd *cobra.Command, name string) *cobra.Command { + for _, subcmd := range cmd.Commands() { + if subcmd.Name() == name { + return subcmd + } + } + return nil +} + +// isValidUseSyntax validates the Use syntax pattern +func isValidUseSyntax(use string) bool { + // Pattern: command-name [|[optional]] [...] + // Required arguments use angle brackets: + // Optional arguments use square brackets: [arg] + // Multiple arguments indicated with ellipsis: ... + + parts := strings.Fields(use) + if len(parts) == 0 { + return false + } + + // First part should be the command name (no brackets or special chars except hyphen) + commandName := parts[0] + if !regexp.MustCompile(`^[a-z][a-z0-9-]*$`).MatchString(commandName) { + return false + } + + // Check argument patterns + for i := 1; i < len(parts); i++ { + arg := parts[i] + + // Check for valid patterns: + // - (required) + // - ... (required multiple) + // - [arg] (optional) + // - [arg]... (optional multiple) + + validPatterns := []string{ + `^<[a-z][a-z0-9-]*>$`, // + `^<[a-z][a-z0-9-]*>\.\.\.$`, // ... + `^\[[a-z][a-z0-9-]*\]$`, // [optional] + `^\[[a-z][a-z0-9-]*\]\.\.\.$`, // [optional]... + } + + isValid := false + for _, pattern := range validPatterns { + if regexp.MustCompile(pattern).MatchString(arg) { + isValid = true + break + } + } + + if !isValid { + return false + } + } + + return true +} + +// TestArgumentNamingConventions verifies that argument names follow conventions +func TestArgumentNamingConventions(t *testing.T) { + // Collect all commands + commands := []*cobra.Command{ + newCmd, + removeCmd, + enableCmd, + disableCmd, + compileCmd, + runCmd, + cli.NewAddCommand(validateEngine), + cli.NewUpdateCommand(validateEngine), + cli.NewTrialCommand(validateEngine), + cli.NewLogsCommand(), + cli.NewAuditCommand(), + cli.NewFixCommand(), + cli.NewStatusCommand(), + cli.NewMCPCommand(), + cli.NewPRCommand(), + campaign.NewCommand(), + } + + // Also collect subcommands + for _, cmd := range commands { + commands = append(commands, cmd.Commands()...) + } + + // Define naming conventions + conventions := map[string]string{ + "workflow": "Workflow-related commands should use 'workflow' for consistency", + "pattern": "Filter/search commands should use 'pattern' or 'filter'", + "run-id": "Audit command should use 'run-id' for clarity", + "workflow-spec": "Trial command should use 'workflow-spec' to indicate special format", + "campaign-id": "Campaign new should use 'campaign-id' for clarity", + "pr-url": "PR transfer should use 'pr-url' for clarity", + "server": "MCP commands should use 'server' for MCP server names", + } + + for _, cmd := range commands { + use := cmd.Use + parts := strings.Fields(use) + + for i := 1; i < len(parts); i++ { + arg := parts[i] + + // Extract the argument name (remove brackets and ellipsis) + argName := arg + argName = strings.TrimPrefix(argName, "<") + argName = strings.TrimPrefix(argName, "[") + argName = strings.TrimSuffix(argName, "...") + argName = strings.TrimSuffix(argName, ">") + argName = strings.TrimSuffix(argName, "]") + + // Verify argument name follows conventions + if reason, exists := conventions[argName]; exists { + t.Logf("✓ Command %q uses conventional argument name %q: %s", cmd.Name(), argName, reason) + } + + // Argument names should be lowercase with hyphens + if !regexp.MustCompile(`^[a-z][a-z0-9-]*$`).MatchString(argName) { + t.Errorf("Command %q has argument %q with invalid naming (should be lowercase with hyphens)", cmd.Name(), argName) + } + } + } +} diff --git a/cmd/gh-aw/main.go b/cmd/gh-aw/main.go index 9e5ea83b1b7..1dd743af150 100644 --- a/cmd/gh-aw/main.go +++ b/cmd/gh-aw/main.go @@ -56,7 +56,7 @@ For detailed help on any command, use: } var newCmd = &cobra.Command{ - Use: "new [workflow-id]", + Use: "new [workflow]", Short: "Create a new workflow Markdown file with example configuration", Long: `Create a new workflow Markdown file with commented examples and explanations of all available options. @@ -107,7 +107,7 @@ Examples: } var removeCmd = &cobra.Command{ - Use: "remove [workflow-id-pattern]", + Use: "remove [pattern]", Short: "Remove agentic workflow files matching the given name prefix", Long: `Remove workflow files matching the given workflow-id pattern. @@ -128,7 +128,7 @@ Examples: } var enableCmd = &cobra.Command{ - Use: "enable [workflow-id]...", + Use: "enable [workflow]...", Short: "Enable agentic workflows", Long: `Enable one or more workflows by ID, or all workflows if no IDs are provided. @@ -147,7 +147,7 @@ Examples: } var disableCmd = &cobra.Command{ - Use: "disable [workflow-id]...", + Use: "disable [workflow]...", Short: "Disable agentic workflows and cancel any in-progress runs", Long: `Disable one or more workflows by ID, or all workflows if no IDs are provided. @@ -166,7 +166,7 @@ Examples: } var compileCmd = &cobra.Command{ - Use: "compile [workflow-id]...", + Use: "compile [workflow]...", Short: "Compile agentic workflow Markdown to GitHub Actions YAML", Long: `Compile one or more agentic workflows to YAML workflows. @@ -276,7 +276,7 @@ Examples: } var runCmd = &cobra.Command{ - Use: "run ...", + Use: "run ...", Short: "Run one or more agentic workflows on GitHub Actions", Long: `Run one or more agentic workflows on GitHub Actions using the workflow_dispatch trigger. diff --git a/pkg/campaign/command.go b/pkg/campaign/command.go index ab8efa851c0..d9f042ecc5a 100644 --- a/pkg/campaign/command.go +++ b/pkg/campaign/command.go @@ -86,7 +86,7 @@ Examples: // Subcommand: campaign new newCmd := &cobra.Command{ - Use: "new ", + Use: "new ", Short: "Create a new Markdown campaign spec under .github/workflows/", Long: `Create a new campaign spec Markdown file under .github/workflows/. diff --git a/pkg/cli/audit.go b/pkg/cli/audit.go index e70c991965c..75d24fb758d 100644 --- a/pkg/cli/audit.go +++ b/pkg/cli/audit.go @@ -23,8 +23,8 @@ var auditLog = logger.New("cli:audit") // NewAuditCommand creates the audit command func NewAuditCommand() *cobra.Command { - auditCmd := &cobra.Command{ - Use: "audit ", + cmd := &cobra.Command{ + Use: "audit ", Short: "Investigate a single GitHub Actions workflow run and generate a concise report", Long: `Audit a single workflow run by downloading artifacts and logs, detecting errors, analyzing MCP tool usage, and generating a concise Markdown report suitable for AI agents. @@ -72,14 +72,14 @@ Examples: } // Add flags to audit command - addOutputFlag(auditCmd, defaultLogsOutputDir) - addJSONFlag(auditCmd) - auditCmd.Flags().Bool("parse", false, "Run JavaScript parsers on agent logs and firewall logs, writing Markdown to log.md and firewall.md") + addOutputFlag(cmd, defaultLogsOutputDir) + addJSONFlag(cmd) + cmd.Flags().Bool("parse", false, "Run JavaScript parsers on agent logs and firewall logs, writing Markdown to log.md and firewall.md") // Register completions for audit command - RegisterDirFlagCompletion(auditCmd, "output") + RegisterDirFlagCompletion(cmd, "output") - return auditCmd + return cmd } // extractRunID extracts the run ID from either a numeric string or a GitHub Actions URL diff --git a/pkg/cli/fix_command.go b/pkg/cli/fix_command.go index ebb8e4b727b..93f7e800561 100644 --- a/pkg/cli/fix_command.go +++ b/pkg/cli/fix_command.go @@ -30,7 +30,7 @@ func RunFix(config FixConfig) error { // NewFixCommand creates the fix command func NewFixCommand() *cobra.Command { cmd := &cobra.Command{ - Use: "fix [workflow-id]...", + Use: "fix [workflow]...", Short: "Apply automatic codemod-style fixes to agentic workflow files", Long: `Apply automatic codemod-style fixes to agentic workflow Markdown files. diff --git a/pkg/cli/logs_command.go b/pkg/cli/logs_command.go index a526aa5e5d2..8cbe706190c 100644 --- a/pkg/cli/logs_command.go +++ b/pkg/cli/logs_command.go @@ -23,7 +23,7 @@ import ( // NewLogsCommand creates the logs command func NewLogsCommand() *cobra.Command { logsCmd := &cobra.Command{ - Use: "logs [workflow-id]", + Use: "logs [workflow]", Short: "Download and analyze agentic workflow logs with aggregated metrics", Long: `Download workflow run logs and artifacts from GitHub Actions for agentic workflows. diff --git a/pkg/cli/mcp_add.go b/pkg/cli/mcp_add.go index 659781aeabb..7b47872e2ac 100644 --- a/pkg/cli/mcp_add.go +++ b/pkg/cli/mcp_add.go @@ -302,7 +302,7 @@ func NewMCPAddSubcommand() *cobra.Command { var customToolID string cmd := &cobra.Command{ - Use: "add [workflow-id-or-file] [mcp-server-name]", + Use: "add [workflow] [server]", Short: "Add an MCP tool to an agentic workflow", Long: `Add an MCP tool to an agentic workflow by searching the MCP registry. diff --git a/pkg/cli/mcp_inspect.go b/pkg/cli/mcp_inspect.go index e46426c60a3..e7cbde8118e 100644 --- a/pkg/cli/mcp_inspect.go +++ b/pkg/cli/mcp_inspect.go @@ -873,7 +873,7 @@ func NewMCPInspectSubcommand() *cobra.Command { var checkSecrets bool cmd := &cobra.Command{ - Use: "inspect [workflow-id-or-file]", + Use: "inspect [workflow]", Short: "Inspect MCP servers and list available tools, resources, and roots", Long: `Inspect MCP servers used by a workflow and display available tools, resources, and roots. diff --git a/pkg/cli/mcp_list.go b/pkg/cli/mcp_list.go index 32663eb0292..ac95c51a7ee 100644 --- a/pkg/cli/mcp_list.go +++ b/pkg/cli/mcp_list.go @@ -220,7 +220,7 @@ func listWorkflowsWithMCPServers(workflowsDir string, verbose bool) error { // NewMCPListSubcommand creates the mcp list subcommand func NewMCPListSubcommand() *cobra.Command { cmd := &cobra.Command{ - Use: "list [workflow-id-or-file]", + Use: "list [workflow]", Short: "List MCP servers defined in agentic workflows", Long: `List MCP servers defined in agentic workflows. diff --git a/pkg/cli/mcp_list_test.go b/pkg/cli/mcp_list_test.go index 887a97e4b9f..ff87321592c 100644 --- a/pkg/cli/mcp_list_test.go +++ b/pkg/cli/mcp_list_test.go @@ -158,8 +158,8 @@ on: func TestNewMCPListSubcommand(t *testing.T) { cmd := NewMCPListSubcommand() - if cmd.Use != "list [workflow-id-or-file]" { - t.Errorf("Expected Use to be 'list [workflow-id-or-file]', got %s", cmd.Use) + if cmd.Use != "list [workflow]" { + t.Errorf("Expected Use to be 'list [workflow]', got %s", cmd.Use) } if cmd.Short != "List MCP servers defined in agentic workflows" { diff --git a/pkg/cli/mcp_list_tools.go b/pkg/cli/mcp_list_tools.go index c4be539320d..c6f76f21790 100644 --- a/pkg/cli/mcp_list_tools.go +++ b/pkg/cli/mcp_list_tools.go @@ -165,7 +165,7 @@ func displayToolsList(info *parser.MCPServerInfo, verbose bool) { // NewMCPListToolsSubcommand creates the mcp list-tools subcommand func NewMCPListToolsSubcommand() *cobra.Command { cmd := &cobra.Command{ - Use: "list-tools [workflow-id-or-file]", + Use: "list-tools [workflow]", Short: "List available tools for a specific MCP server", Long: `List available tools for a specific MCP server. diff --git a/pkg/cli/mcp_list_tools_test.go b/pkg/cli/mcp_list_tools_test.go index 77f21756fd3..ab986a33e53 100644 --- a/pkg/cli/mcp_list_tools_test.go +++ b/pkg/cli/mcp_list_tools_test.go @@ -320,8 +320,8 @@ func TestDisplayToolsList(t *testing.T) { func TestNewMCPListToolsSubcommand(t *testing.T) { cmd := NewMCPListToolsSubcommand() - if cmd.Use != "list-tools [workflow-id-or-file]" { - t.Errorf("Expected Use to be 'list-tools [workflow-id-or-file]', got: %s", cmd.Use) + if cmd.Use != "list-tools [workflow]" { + t.Errorf("Expected Use to be 'list-tools [workflow]', got: %s", cmd.Use) } if cmd.Short != "List available tools for a specific MCP server" { diff --git a/pkg/cli/pr_command.go b/pkg/cli/pr_command.go index b7d250ab92b..de266f9edf0 100644 --- a/pkg/cli/pr_command.go +++ b/pkg/cli/pr_command.go @@ -58,7 +58,7 @@ Available subcommands: // NewPRTransferSubcommand creates the pr transfer subcommand func NewPRTransferSubcommand() *cobra.Command { cmd := &cobra.Command{ - Use: "transfer ", + Use: "transfer ", Short: "Transfer a pull request to another repository", Long: `Transfer a pull request from one repository to another. diff --git a/pkg/cli/pr_command_test.go b/pkg/cli/pr_command_test.go index 190e97ea59b..985f1a872ab 100644 --- a/pkg/cli/pr_command_test.go +++ b/pkg/cli/pr_command_test.go @@ -150,7 +150,7 @@ func TestNewPRCommand(t *testing.T) { subcommands := cmd.Commands() found := false for _, subcmd := range subcommands { - if subcmd.Use == "transfer " { + if subcmd.Use == "transfer " { found = true break } @@ -165,8 +165,8 @@ func TestNewPRCommand(t *testing.T) { func TestNewPRTransferSubcommand(t *testing.T) { cmd := NewPRTransferSubcommand() - if cmd.Use != "transfer " { - t.Errorf("Expected command use to be 'transfer ', got %s", cmd.Use) + if cmd.Use != "transfer " { + t.Errorf("Expected command use to be 'transfer ', got %s", cmd.Use) } if cmd.Short != "Transfer a pull request to another repository" { diff --git a/pkg/cli/update_command.go b/pkg/cli/update_command.go index a0d157f64a4..49c7edab811 100644 --- a/pkg/cli/update_command.go +++ b/pkg/cli/update_command.go @@ -15,7 +15,7 @@ var updateLog = logger.New("cli:update_command") // NewUpdateCommand creates the update command func NewUpdateCommand(validateEngine func(string) error) *cobra.Command { cmd := &cobra.Command{ - Use: "update [workflow-id]...", + Use: "update [workflow]...", Short: "Update agentic workflows from their source repositories and check for gh-aw updates", Long: `Update one or more workflows from their source repositories and check for gh-aw updates.