diff --git a/.github/workflows/declined-pr.yml b/.github/workflows/declined-pr.yml new file mode 100644 index 0000000..01d782d --- /dev/null +++ b/.github/workflows/declined-pr.yml @@ -0,0 +1,52 @@ +name: Decline PR +on: + pull_request: + types: + - labeled +jobs: + unlink-issue: + if: "github.event.label.name == 'status: declined'" + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - name: Remove closing keywords + uses: actions/github-script@v9 + with: + script: | + const prBody = context.payload.pull_request?.body ?? '' + const regex = /(?