Skip to content

Commit

Permalink
fix: support pull_request_target event
Browse files Browse the repository at this point in the history
  • Loading branch information
KengoTODA committed Aug 12, 2021
1 parent 9029893 commit d2b7181
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9573,7 +9573,8 @@ function run(getInput, activateProject, deactivateProject) {
githubToken = getInput("github-token", { required: true });
rtd = new rtd_1.default(rtdToken);
context = github.context;
if (context.eventName !== "pull_request") {
if (context.eventName !== "pull_request" &&
context.eventName !== "pull_request_target") {
core.warning("This Action does not support the given event " + context.eventName + ".");
return [2 /*return*/];
}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ export async function run(

// Check if head repo is same with base repo
const context = github.context;
if (context.eventName !== "pull_request") {
if (
context.eventName !== "pull_request" &&
context.eventName !== "pull_request_target"
) {
core.warning(
`This Action does not support the given event ${context.eventName}.`
);
Expand Down

0 comments on commit d2b7181

Please sign in to comment.