blob: 1f75f2f1f0ce74181051ae9bf6f92508489ecccf [file] [log] [blame]
name: Auto close issue when PR is merged
on:
pull_request_target:
types: [ closed ]
jobs:
close-issue:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Auto issue closer"
uses: ./.github/actions/Auto_close_associate_issue/
id: Closer
with:
prbody: ${{ github.event.pull_request.body }}
- name: Close Issue
uses: peter-evans/close-issue@v2
if: ${{ github.event.pull_request.merged && steps.Closer.outputs.issueNumber != -1 }}
with:
issue-number: ${{ steps.Closer.outputs.issueNumber }}
comment: The associated PR has been merged, this issue is automatically closed, you can reopend if necessary.
env:
Github_Token: ${{ secrets.GITHUB_TOKEN }}
PRNUM: ${{ github.event.pull_request.number }}