Skip to content

Commit

Permalink
Create issue_manager.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ImSwordQueen committed Aug 8, 2024
1 parent 9d2dc15 commit fa3a012
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/issue_manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Issue Manager

on:
issues:
types:
- labeled

jobs:
on_duplicate:
if: github.event.label.name == 'duplicate'
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Add comment
uses: peter-evans/create-or-update-comment@5f728c3dae25f329afbe34ee4d08eef25569d79f
with:
issue-number: ${{ github.event.issue.number }}
body: |
This issue is a duplicate!
Please make sure to check for existing issues in this repository before submitting an issue.
If you believe this is a mistake, feel free to reply.
- name: Close issue
uses: actions/github-script@v6
with:
script: |
github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
state: "closed",
state_reason: "not_planned"
});

0 comments on commit fa3a012

Please sign in to comment.