From 6bde00d491fe3d401d12bf3c6e266d016de53193 Mon Sep 17 00:00:00 2001 From: nollymarlonga Date: Mon, 17 Aug 2026 23:26:27 -0500 Subject: [PATCH] fix(ci): correct markdown structure of the issue-linking failure comment The "Issue Linking Required" PR comment was built with a printf whose format string had 21 %s slots for 22 arguments, and whose blank-line boundaries did not match the argument groups. On GitHub this rendered with broken lists (the Option 3 heading swallowed into the numbered list), stray blank bullets, the footer glued onto the last paragraph, and trailing garbage newlines from bash reusing the format string. Replace the printf with a quoted heredoc holding the literal markdown. Wording is unchanged; only the blank-line structure is corrected. The "Issue Linking Required" header stays byte-identical so the dedup check and the auto-removal step keep matching existing comments. Co-Authored-By: Claude Fable 5 --- .../workflows/issue_comp_link-issue-to-pr.yml | 65 ++++++++++++------- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/.github/workflows/issue_comp_link-issue-to-pr.yml b/.github/workflows/issue_comp_link-issue-to-pr.yml index b93c4d3fc968..fb90656e3038 100644 --- a/.github/workflows/issue_comp_link-issue-to-pr.yml +++ b/.github/workflows/issue_comp_link-issue-to-pr.yml @@ -575,29 +575,48 @@ jobs: exit 0 fi - comment_body=$(printf "%s\n\n%s\n\n%s\n\n%s\n%s\n%s\n%s\n%s\n%s\n\n%s\n%s\n%s\n\n%s\n%s\n%s\n%s\n%s\n\n%s\n%s\n\n%s\n%s" \ - "## ❌ Issue Linking Required" \ - "This PR could not be linked to an issue. **All PRs must be linked to an issue** for tracking purposes." \ - "### How to fix this:" \ - "**Option 1: Add keyword to PR body** (Recommended - auto-removes this comment)" \ - "Edit this PR description and add one of these lines:" \ - "- \`Fixes #123\` or \`Closes #123\` — same-repo issue" \ - "- \`Fixes org/repo#123\` or \`Closes org/repo#123\` — cross-repo or private issue" \ - "- \`Closes https://github.com/org/repo/issues/123\` — full GitHub URL" \ - "- Other supported keywords: \`fix\`, \`fixed\`, \`close\`, \`closed\`, \`resolve\`, \`resolved\`" \ - "**Option 2: Link via GitHub UI** (Note: won't clear the failed check)" \ - "1. Go to the PR → Development section (right sidebar)" \ - "2. Click \"Link issue\" and select an existing issue" \ - "3. Push a new commit or re-run the workflow to clear the failed check" \ - "**Option 3: Use branch naming**" \ - "Create a new branch with one of these patterns:" \ - "- \`123-feature-description\` (number at start)" \ - "- \`issue-123-feature-description\` (issue-number at start)" \ - "- \`feature-issue-123\` (issue-number anywhere)" \ - "### Why is this required?" \ - "Issue linking ensures proper tracking, documentation, and helps maintain project history. It connects your code changes to the problem they solve." \ - "---" \ - "*This comment was automatically generated by the issue linking workflow*") + # Static markdown body via quoted heredoc — a printf format string here + # kept drifting out of alignment with its arguments as lines were added, + # breaking list/heading rendering on GitHub. + comment_body=$(cat <<'COMMENT_EOF' + ## ❌ Issue Linking Required + + This PR could not be linked to an issue. **All PRs must be linked to an issue** for tracking purposes. + + ### How to fix this: + + **Option 1: Add keyword to PR body** (Recommended - auto-removes this comment) + + Edit this PR description and add one of these lines: + + - `Fixes #123` or `Closes #123` — same-repo issue + - `Fixes org/repo#123` or `Closes org/repo#123` — cross-repo or private issue + - `Closes https://github.com/org/repo/issues/123` — full GitHub URL + - Other supported keywords: `fix`, `fixed`, `close`, `closed`, `resolve`, `resolved` + + **Option 2: Link via GitHub UI** (Note: won't clear the failed check) + + 1. Go to the PR → Development section (right sidebar) + 2. Click "Link issue" and select an existing issue + 3. Push a new commit or re-run the workflow to clear the failed check + + **Option 3: Use branch naming** + + Create a new branch with one of these patterns: + + - `123-feature-description` (number at start) + - `issue-123-feature-description` (issue-number at start) + - `feature-issue-123` (issue-number anywhere) + + ### Why is this required? + + Issue linking ensures proper tracking, documentation, and helps maintain project history. It connects your code changes to the problem they solve. + + --- + + *This comment was automatically generated by the issue linking workflow* + COMMENT_EOF + ) curl -X POST \ -H "Accept: application/vnd.github+json" \