83a3ce3 fix(ci): use pull_request_target for auto-label write permissions
📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝.github/workflows/auto-label.yml (+1 -1)
📄 Description
Summary
Switch pull_request → pull_request_target in auto-label workflow
Fixes 403 "Resource not accessible by integration" when labeling fork PRs (failed run)
Root cause
GitHub downgrades GITHUB_TOKEN to read-only for pull_request events from forks. pull_request_target runs in the base repo context, granting the declared issues: write and pull-requests: write permissions.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1153
**Author:** [@profvjreddi](https://github.com/profvjreddi)
**Created:** 2/4/2026
**Status:** ✅ Merged
**Merged:** 2/4/2026
**Merged by:** [@profvjreddi](https://github.com/profvjreddi)
**Base:** `dev` ← **Head:** `fix/auto-label-permissions`
---
### 📝 Commits (1)
- [`83a3ce3`](https://github.com/harvard-edge/cs249r_book/commit/83a3ce3712c9985605ecf1cbe48b0514dc843a6c) fix(ci): use pull_request_target for auto-label write permissions
### 📊 Changes
**1 file changed** (+1 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `.github/workflows/auto-label.yml` (+1 -1)
</details>
### 📄 Description
## Summary
- Switch `pull_request` → `pull_request_target` in auto-label workflow
- Fixes 403 "Resource not accessible by integration" when labeling fork PRs ([failed run](https://github.com/harvard-edge/cs249r_book/actions/runs/21643621058))
## Root cause
GitHub downgrades `GITHUB_TOKEN` to read-only for `pull_request` events from forks. `pull_request_target` runs in the base repo context, granting the declared `issues: write` and `pull-requests: write` permissions.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1153
Author: @profvjreddi
Created: 2/4/2026
Status: ✅ Merged
Merged: 2/4/2026
Merged by: @profvjreddi
Base:
dev← Head:fix/auto-label-permissions📝 Commits (1)
83a3ce3fix(ci): use pull_request_target for auto-label write permissions📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
.github/workflows/auto-label.yml(+1 -1)📄 Description
Summary
pull_request→pull_request_targetin auto-label workflowRoot cause
GitHub downgrades
GITHUB_TOKENto read-only forpull_requestevents from forks.pull_request_targetruns in the base repo context, granting the declaredissues: writeandpull-requests: writepermissions.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.