Create failo #49
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto close pull requests | |
on: | |
pull_request_target: | |
types: [opened, labeled, unlabeled, reopened] | |
jobs: | |
auto_close: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Close PR if not pre-approved | |
if: ${{ !(contains(github.event.pull_request.labels.*.name, 'pre-approved')) && !(contains(github.event.pull_request.body, 'alfredodeza')) }} | |
run: | | |
MESSAGE="This repository doesn't accept pull requests. Please fork the repository and make changes there. If you really need this PR to be merged you must be an admin and label this pr with the 'pre-approved' label *or* tag Alfredo Deza (`@alfredodeza`) to take a look." | |
gh pr close ${{ github.event.pull_request.number }} --repo education/codespaces-project-template-js --comment "$MESSAGE" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |