diff --git a/.github/pr_checking.yml b/.github/pr_checking.yml new file mode 100644 index 00000000..5bed881a --- /dev/null +++ b/.github/pr_checking.yml @@ -0,0 +1,22 @@ +name: PR check + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + title: + name: Validate PR + runs-on: ubuntu-latest + if: ${{ + github.event.pull_request.author_association != 'CONTRIBUTOR' && + github.event.pull_request.author_association != 'MEMBER' && + ( + contains(fromJSON(secrets.RESTRICTED_KEYWORDS), github.event.pull_request.title) || + contains(fromJSON(secrets.RESTRICTED_KEYWORDS), github.event.pull_request.description + ) }} + steps: + - run: gh pr close