Skip to content

Commit 8c4c58c

Browse files
committed
fix: revert to pull_request event, remove pull_request_target comment
1 parent a38b92f commit 8c4c58c

3 files changed

Lines changed: 4 additions & 10 deletions

File tree

.github/actions/check-codeowner/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/check-codeowner/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function getActor(): string {
1010
const { eventName, payload } = github.context;
1111

1212
switch (eventName) {
13-
case "pull_request_target":
13+
case "pull_request":
1414
return payload.pull_request?.user?.login ?? "";
1515
case "issue_comment":
1616
case "pull_request_review_comment":

.github/workflows/bonk.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
types: [created]
88
pull_request_review:
99
types: [submitted]
10-
pull_request_target:
10+
pull_request:
1111
types: [opened]
1212

1313
concurrency:
@@ -91,14 +91,9 @@ jobs:
9191

9292
bonk-auto-triage:
9393
needs: check-codeowner
94-
# pull_request_target is used so the workflow always runs from the production
95-
# branch, preventing PR authors from modifying bonk's behaviour. Secrets are
96-
# available even for fork PRs, but the fork guard below ensures this never
97-
# runs on forks. The checkout pins to the base ref — we do NOT check out or
98-
# execute the PR's code. Bonk reads PR context via the GitHub API only.
9994
if: |
10095
needs.check-codeowner.outputs.is-codeowner == 'true' &&
101-
github.event_name == 'pull_request_target' &&
96+
github.event_name == 'pull_request' &&
10297
github.event.sender.type != 'Bot' &&
10398
github.event.pull_request.head.repo.full_name == github.repository
10499
runs-on: ubuntu-latest
@@ -112,7 +107,6 @@ jobs:
112107
- name: Checkout repository
113108
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
114109
with:
115-
ref: ${{ github.event.pull_request.base.ref }}
116110
fetch-depth: 1
117111

118112
- name: Set up pnpm

0 commit comments

Comments
 (0)