diff --git a/Readme.md b/Readme.md index fb0b86da..59275cc3 100644 --- a/Readme.md +++ b/Readme.md @@ -29,8 +29,15 @@ on: pull_request: types: [opened, edited, synchronize, reopened] ``` +or +[here](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#pull_request_target). +```yaml +on: + pull_request_target: + types: [opened, edited, synchronize, reopened] +``` -Triggering the action on anything other than `pull_request` will cause a failure. +Triggering the action on anything other than `pull_request` or `pull_request_target` will cause a failure. ## License The scripts and documentation in this project are released under the [MIT License](./LICENSE) diff --git a/index.js b/index.js index 8b16a4dc..f180b723 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ const core = require('@actions/core'); const github = require('@actions/github'); -const validEvent = ['pull_request']; +const validEvent = ['pull_request','pull_request_target']; function validateTitlePrefix(title, prefix, caseSensitive) { if (!caseSensitive) {