You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!hasIssueReference && !hasTitleIssueReference) {
35
+
// Create the comment body
36
+
const commentBody = [
37
+
'⚠️ **PR Must Reference an Issue**',
38
+
'',
39
+
"This pull request doesn't reference any issue. Please link your PR to an existing issue by:",
40
+
'',
41
+
'1. Adding one of the following keywords in your PR description followed by the issue number:',
42
+
' - fixes #123',
43
+
' - closes #123',
44
+
' - resolves #123',
45
+
' - refs #123',
46
+
' - references #123',
47
+
'',
48
+
'2. Or including the issue number in the PR title like:',
49
+
' - [FEATURE] Add new feature #123',
50
+
' - [BUG] Fix critical bug #123',
51
+
'',
52
+
`If no issue exists for this change, please [create an issue](https://github.com/${context.repo.owner}/${context.repo.repo}/issues/new) first to describe the problem or feature request.`
53
+
].join('\n');
54
+
35
55
// Add comment asking to link an issue
36
56
await github.rest.issues.createComment({
37
57
owner: context.repo.owner,
38
58
repo: context.repo.repo,
39
59
issue_number: context.issue.number,
40
-
body: \`⚠️ **PR Must Reference an Issue**
41
-
42
-
This pull request doesn't reference any issue. Please link your PR to an existing issue by:
43
-
44
-
1. Adding one of the following keywords in your PR description followed by the issue number:
45
-
- fixes #123
46
-
- closes #123
47
-
- resolves #123
48
-
- refs #123
49
-
- references #123
50
-
51
-
2. Or including the issue number in the PR title like:
52
-
- [FEATURE] Add new feature #123
53
-
- [BUG] Fix critical bug #123
54
-
55
-
If no issue exists for this change, please [create an issue](https://github.com/\${context.repo.owner}/\${context.repo.repo}/issues/new) first to describe the problem or feature request.\`
0 commit comments