Commit 57405c4 1 parent e8c9f98 commit 57405c4 Copy full SHA for 57405c4
File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
- name : Copy Issue Description to Comment
1
+ name : Copy Issue Description to Comment with Header
2
2
3
3
on :
4
4
issues :
8
8
copy_description_to_comment :
9
9
runs-on : ubuntu-latest
10
10
steps :
11
- - name : Copy issue description to comment
11
+ - name : Copy issue description to comment with header
12
12
uses : actions/github-script@v6
13
13
with :
14
14
github-token : ${{secrets.GITHUB_TOKEN}}
15
15
script : |
16
16
const issue = context.issue;
17
17
const issueBody = context.payload.issue.body;
18
18
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
+
20
22
await github.rest.issues.createComment({
21
23
owner: issue.owner,
22
24
repo: issue.repo,
23
25
issue_number: issue.number,
24
- body: issueBody
26
+ body: commentBody
25
27
});
You can’t perform that action at this time.
0 commit comments