Skip to content

Commit e8c9f98

Browse files
committed
duplicate issue workflow
1 parent 0f1a31c commit e8c9f98

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/duplicate-issue.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Copy Issue Description to Comment
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
copy_description_to_comment:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Copy issue description to comment
12+
uses: actions/github-script@v6
13+
with:
14+
github-token: ${{secrets.GITHUB_TOKEN}}
15+
script: |
16+
const issue = context.issue;
17+
const issueBody = context.payload.issue.body;
18+
19+
// Post a comment with the issue description
20+
await github.rest.issues.createComment({
21+
owner: issue.owner,
22+
repo: issue.repo,
23+
issue_number: issue.number,
24+
body: issueBody
25+
});

0 commit comments

Comments
 (0)