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

Switch to pull_request_target #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/clabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "CLA Signature Bot"
on:
issue_comment:
types: [created]
pull_request:
pull_request_target:
types: [opened,closed,synchronize]

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- '*'
tags:
- '*'
pull_request:
pull_request_target:
branches:
- master

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ name: "CLA Signature Bot"
on:
issue_comment:
types: [created]
pull_request:
pull_request_target:
types: [opened,closed,synchronize]

jobs:
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/pullCheckRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class PullCheckRunner {
}

public async rerunLastCheck() {
if (this.settings.payloadAction === "pull_request") {
if (this.settings.payloadAction === "pull_request_target") {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a breaking change 🤔 Though maybe that's OK.

Alternatively, we could handle both events as a possible trigger.

// We don't want to re-run ourselves in an infinite loop.
return;
}
Expand All @@ -27,7 +27,7 @@ export class PullCheckRunner {
repo: this.settings.localRepositoryName,
branch: prBranch,
workflow_id: workflowId,
event: "pull_request"
event: "pull_request_target"
});
core.debug(`Found ${runs.data.total_count} previous runs.`);

Expand Down