Skip to content

fix: Use pull_request_target in event name checks#3

Merged
borchero merged 2 commits intomainfrom
claude/fix-draft-releases-on-prs
Mar 1, 2026
Merged

fix: Use pull_request_target in event name checks#3
borchero merged 2 commits intomainfrom
claude/fix-draft-releases-on-prs

Conversation

@Claude
Copy link
Contributor

@Claude Claude AI commented Mar 1, 2026

The chore.yml workflow triggers on pull_request_target but was checking github.event_name == 'pull_request', causing the release-drafter to draft releases on PRs instead of only assigning labels.

Changes

  • Updated event name checks from 'pull_request' to 'pull_request_target' in:
    • check-pr-title job condition (line 16) - now runs on PRs
    • release-drafter job name conditional (line 56)
    • Release drafter step name conditional (line 62)
    • disable-releaser parameter (line 65) - critical fix preventing draft releases on PRs

Behavior

On PRs: Checks title format, assigns labels, disables release drafting
On push to main: Drafts/updates releases, skips auto-labeling

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh pr view --json number,title,body /home/REDACTED/.nvm/bash_completion /home/REDACTED/.nvm/install.sh /home/REDACTED/.nvm/nvm-exec /home/REDACTED/.nvm/nvm.sh /home/REDACTED/.nvm/package.json /home/REDACTED/.nvm/rename_test.sh /home/REDACTED/.nvm/test (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Co-authored-by: borchero <22455425+borchero@users.noreply.github.com>
@Claude Claude AI changed the title [WIP] Fix incorrect release drafting on pull requests fix: Use pull_request_target in event name checks Mar 1, 2026
@borchero borchero marked this pull request as ready for review March 1, 2026 15:44
Copilot AI review requested due to automatic review settings March 1, 2026 15:44
@github-actions github-actions bot added the fix label Mar 1, 2026
@borchero borchero merged commit a0fabad into main Mar 1, 2026
17 of 18 checks passed
@borchero borchero deleted the claude/fix-draft-releases-on-prs branch March 1, 2026 15:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Chore GitHub Actions workflow so its conditional logic matches its pull_request_target trigger, preventing release drafting on PR events while still enabling PR checks/labeling.

Changes:

  • Fixed job/step if / naming expressions to check github.event_name == 'pull_request_target' instead of 'pull_request'.
  • Ensured release-drafter disables release drafting on PR events via disable-releaser while keeping auto-labeling enabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants