Skip to content

Commit 57405c4

Browse files
committed
Comment add original request
1 parent e8c9f98 commit 57405c4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/duplicate-issue.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Copy Issue Description to Comment
1+
name: Copy Issue Description to Comment with Header
22

33
on:
44
issues:
@@ -8,18 +8,20 @@ jobs:
88
copy_description_to_comment:
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Copy issue description to comment
11+
- name: Copy issue description to comment with header
1212
uses: actions/github-script@v6
1313
with:
1414
github-token: ${{secrets.GITHUB_TOKEN}}
1515
script: |
1616
const issue = context.issue;
1717
const issueBody = context.payload.issue.body;
1818
19-
// Post a comment with the issue description
19+
// Create a comment with a header and the issue description
20+
const commentBody = `### Original Request\n\n${issueBody}`;
21+
2022
await github.rest.issues.createComment({
2123
owner: issue.owner,
2224
repo: issue.repo,
2325
issue_number: issue.number,
24-
body: issueBody
26+
body: commentBody
2527
});

0 commit comments

Comments
 (0)