From ec8cb2a8aeb505d6c8128685e661be5be8706e09 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Tue, 23 Jun 2026 15:50:08 +1000 Subject: [PATCH] fix: make SHA and Ref values links to tree in external plugin intake comments (#2100) * fix: make SHA and Ref values links to tree in external plugin intake comments Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: use plain link labels for Ref/SHA to avoid backtick markdown issues Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: escape backticks in Ref/SHA link labels Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- eng/external-plugin-intake.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/external-plugin-intake.mjs b/eng/external-plugin-intake.mjs index ade914ec..2ad459e6 100644 --- a/eng/external-plugin-intake.mjs +++ b/eng/external-plugin-intake.mjs @@ -537,8 +537,8 @@ function buildMergedIntakeComment(baseResult, qualityResult, runId, owner, repo) "", `- **Plugin:** ${baseResult.plugin?.name ?? "unknown"}`, `- **Repository:** ${baseResult.plugin?.repository ?? "unknown"}`, - baseResult.plugin?.source?.ref ? `- **Ref:** ${baseResult.plugin.source.ref}` : undefined, - baseResult.plugin?.source?.sha ? `- **SHA:** ${baseResult.plugin.source.sha}` : undefined, + baseResult.plugin?.source?.ref ? `- **Ref:** [\`${baseResult.plugin.source.ref.replaceAll('\`', '\\\`')}\`](https://github.com/${encodeRepoPath(baseResult.plugin.source.repo)}/tree/${encodeURIComponent(baseResult.plugin.source.ref).replaceAll("%2F", "/")})` : undefined, + baseResult.plugin?.source?.sha ? `- **SHA:** [\`${baseResult.plugin.source.sha.replaceAll('\`', '\\\`')}\`](https://github.com/${encodeRepoPath(baseResult.plugin.source.repo)}/tree/${encodeURIComponent(baseResult.plugin.source.sha).replaceAll("%2F", "/")})` : undefined, "", qualitySection, "", @@ -626,8 +626,8 @@ export async function evaluateExternalPluginIssue({ issue, token, runId, owner, "", `- **Plugin:** ${parsed.plugin.name}`, `- **Repository:** ${parsed.plugin.repository}`, - parsed.plugin.source.ref ? `- **Ref:** ${parsed.plugin.source.ref}` : undefined, - parsed.plugin.source.sha ? `- **SHA:** ${parsed.plugin.source.sha}` : undefined, + parsed.plugin.source.ref ? `- **Ref:** [\`${parsed.plugin.source.ref.replaceAll('\`', '\\\`')}\`](https://github.com/${encodeRepoPath(parsed.plugin.source.repo)}/tree/${encodeURIComponent(parsed.plugin.source.ref).replaceAll("%2F", "/")})` : undefined, + parsed.plugin.source.sha ? `- **SHA:** [\`${parsed.plugin.source.sha.replaceAll('\`', '\\\`')}\`](https://github.com/${encodeRepoPath(parsed.plugin.source.repo)}/tree/${encodeURIComponent(parsed.plugin.source.sha).replaceAll("%2F", "/")})` : undefined, `- **Keywords:** ${normalizedKeywords}`, "", "",