Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for pull_request_target (v2.2.1) #30

Merged
merged 1 commit into from
Aug 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/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)
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/paths-filter@v2.2.0
- uses: dorny/paths-filter@v2.2.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