Skip to content

Commit

Permalink
Add support for pull_request_target (#30)
Browse files Browse the repository at this point in the history
Complements previous commit:
 - adds modified index.js
 - bumps version to 2.2.1
  • Loading branch information
dorny authored Aug 13, 2020
1 parent b365bd8 commit 3b817c9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dorny/[email protected].0
- uses: dorny/[email protected].1
id: filter
with:
# inline YAML or path to separate file (e.g.: .github/filters.yaml)
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
frontend: ${{ steps.filter.outputs.frontend }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/[email protected].0
- uses: dorny/[email protected].1
id: filter
with:
# Filters stored in own yaml file
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 3b817c9

Please sign in to comment.