Skip to content

Commit 5c9df5e

Browse files
Karanjot786claude
andcommitted
Fix PR automation permissions by using pull_request_target event
- Changed from pull_request to pull_request_target to fix fork permissions - Added explicit PR head SHA checkout for proper code validation - Resolves 'Resource not accessible by integration' errors - Enables label adding and comment posting from forked PRs This allows automation to work correctly for external contributors. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ad17276 commit 5c9df5e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/pr-automation.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 🤖 PR Automation
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
types: [opened, synchronize, reopened]
66
branches: [main]
77

@@ -23,6 +23,7 @@ jobs:
2323
- name: 📥 Checkout code
2424
uses: actions/checkout@v4
2525
with:
26+
ref: ${{ github.event.pull_request.head.sha }}
2627
fetch-depth: 0
2728

2829
- name: 🔍 Get changed files

0 commit comments

Comments
 (0)