Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 42 additions & 23 deletions .github/workflows/issue_comp_link-issue-to-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
Loading