Skip to content

Commit 0e7dd68

Browse files
tablackburnclaude
andcommitted
ci: Support bot PRs by adding pull_request_target trigger
Add pull_request_target event to run CI on PRs from bots (like pre-commit.ci) and forks. Update checkout steps to use the PR head SHA to ensure the actual PR code is tested. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d93ae7f commit 0e7dd68

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/CI.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches: [main]
66
pull_request:
77
branches: [main]
8+
pull_request_target:
9+
branches: [main]
810

911
permissions:
1012
contents: read
@@ -16,6 +18,8 @@ jobs:
1618
runs-on: ubuntu-latest
1719
steps:
1820
- uses: actions/checkout@v6
21+
with:
22+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
1923

2024
- name: Cache PowerShell modules
2125
uses: actions/cache@v5
@@ -59,6 +63,8 @@ jobs:
5963
os: [ubuntu-latest, windows-latest, macOS-latest]
6064
steps:
6165
- uses: actions/checkout@v6
66+
with:
67+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
6268

6369
- name: Cache PowerShell modules
6470
uses: actions/cache@v5

0 commit comments

Comments
 (0)