From 34ecc028c4d83ef56ec1ddb45e9809fd06917e53 Mon Sep 17 00:00:00 2001 From: Michal Dorner Date: Thu, 13 Aug 2020 21:49:37 +0200 Subject: [PATCH] Add support for pull_request_target Complements previous commit: - adds modified index.js - bumps version to 2.2.1 --- CHANGELOG.md | 3 +++ README.md | 4 ++-- dist/index.js | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da33177d..4f591ac2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## v2.2.1 +- [Add support for pull_request_target](https://github.com/dorny/paths-filter/pull/29) + ## v2.2.0 - [Improve change detection for feature branches](https://github.com/dorny/paths-filter/pull/16) diff --git a/README.md b/README.md index a771d094..dadbf7ad 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: dorny/paths-filter@v2.2.0 + - uses: dorny/paths-filter@v2.2.1 id: filter with: # inline YAML or path to separate file (e.g.: .github/filters.yaml) @@ -100,7 +100,7 @@ jobs: frontend: ${{ steps.filter.outputs.frontend }} steps: # For pull requests it's not necessary to checkout the code - - uses: dorny/paths-filter@v2.2.0 + - uses: dorny/paths-filter@v2.2.1 id: filter with: # Filters stored in own yaml file diff --git a/dist/index.js b/dist/index.js index 9f57a0b6..78e4d51c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4538,7 +4538,7 @@ function getConfigFileContent(configPath) { } function getChangedFiles(token) { return __awaiter(this, void 0, void 0, function* () { - if (github.context.eventName === 'pull_request') { + if (github.context.eventName === 'pull_request' || github.context.eventName === 'pull_request_target') { const pr = github.context.payload.pull_request; return token ? yield getChangedFilesFromApi(token, pr) : yield getChangedFilesFromGit(pr.base.sha); }