Skip to content

ci: Fix automatic labeling for fork pull requests - #2244

Merged
iMicknl merged 1 commit into
mainfrom
codex/fix-fork-pr-autolabel
Sep 5, 2026
Merged

iMicknl merged 1 commit into
mainfrom
codex/fix-fork-pr-autolabel

Conversation

@iMicknl

@iMicknl iMicknl commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Fork pull requests currently fail the Release Drafter autolabel check with Resource not accessible by integration: GitHub downgrades the pull_request token to read-only, preventing the action from applying labels (as seen in #2233).

Use pull_request_target and update the autolabel job condition so fork PRs can receive Conventional Commit labels. The job retains only contents: read and pull-requests: write, uses the existing SHA-pinned action, and does not check out or execute contributor code. Release drafting remains restricted to pushes to main.

Validation: all pre-commit checks passed, including actionlint, mypy, and ty; 556 tests passed. Pytest printed an unclosed client session message at shutdown. Live fork-event validation requires this workflow change to reach main, followed by a new PR event.

@iMicknl
iMicknl requested a review from tetienne as a code owner September 5, 2026 23:02
Copilot AI balanced review requested due to automatic review settings September 5, 2026 23:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The narrowly scoped workflow change resolves fork labeling while retaining minimal permissions and avoiding untrusted code execution.

Pull request overview

Updates Release Drafter so fork pull requests can receive automatic Conventional Commit labels.

Changes:

  • Uses pull_request_target for base-repository write permissions.
  • Restricts the privileged job to labeling without contributor code execution.
File summaries
File Description
.github/workflows/release-drafter.yml Enables secure autolabeling for fork PRs.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@iMicknl
iMicknl merged commit f63b6da into main Sep 5, 2026
10 checks passed
@iMicknl
iMicknl deleted the codex/fix-fork-pr-autolabel branch September 5, 2026 23:04
@iMicknl iMicknl added the bug Something isn't working label Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants