diff --git a/README.md b/README.md index 3f4401bf..51860f8a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # Get All Changed Files -Get all of the files changed/modified in a pull request or push's commits. +Get all of the files changed/modified in a pull request (`pull_request` or `pull_request_target`) or push's commits. You can choose to get all changed files, only added files, only modified files, only removed files, only renamed files, or all added and modified files. These outputs are available via the `steps` output context. The `steps` output context exposes the output names `all`, `added`, `modified`, `removed`, `renamed`, and `added_modified`. diff --git a/dist/index.js b/dist/index.js index 72c16629..cf953550 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3529,6 +3529,7 @@ function run() { let base; let head; switch (eventName) { + case 'pull_request_target': case 'pull_request': base = (_b = (_a = github_1.context.payload.pull_request) === null || _a === void 0 ? void 0 : _a.base) === null || _b === void 0 ? void 0 : _b.sha; head = (_d = (_c = github_1.context.payload.pull_request) === null || _c === void 0 ? void 0 : _c.head) === null || _d === void 0 ? void 0 : _d.sha; diff --git a/src/main.ts b/src/main.ts index 0f0fdd61..307b9888 100644 --- a/src/main.ts +++ b/src/main.ts @@ -26,6 +26,7 @@ async function run(): Promise { let head: string | undefined switch (eventName) { + case 'pull_request_target': case 'pull_request': base = context.payload.pull_request?.base?.sha head = context.payload.pull_request?.head?.sha