Skip to content

fix: request auto-merge on pull_request instead of pull_request_target - #7

Merged
chio-labs-delivery[bot] merged 1 commit into
mainfrom
fix/pull-request-trigger
Nov 16, 2026
Merged

chio-labs-delivery[bot] merged 1 commit into
mainfrom
fix/pull-request-trigger

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

GitHub's default Actions policy blocks pull_request_target in public repositories, enforced from 2 December 2026 (https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target). A scheduled brownout already stopped this required workflow from starting on 16 November, so pull requests could not enter the merge queue.

This switches the trigger to pull_request:

  • The job checks out no pull request code. It only creates a delivery-app token and calls gh pr merge --auto.
  • It already runs only for branches in the same repository (head.repo.full_name == github.repository). Same-repository pull_request runs receive repository and organization secrets, so the delivery token still works. Fork pull requests get no secrets under pull_request, and the job skips them anyway.
  • The organization ruleset requires this file from refs/heads/main, so the merged version applies to every repository without ruleset changes.
  • merge_group handling is unchanged.

Known difference: Dependabot pull requests receive only Dependabot secrets under pull_request, so this job would not get the delivery key for them.

Verification: this can only be exercised by a real pull request once merged. The first pull request in a public repository after merging should show Request Auto-Merge running on pull_request and auto-merge being enabled.

GitHub blocks pull_request_target in public repositories by default from
2 December 2026, which stops this required workflow from starting and
keeps pull requests out of the merge queue. The job checks out no pull
request code and already skips forks, and same-repository pull_request
runs receive the secrets it needs, so pull_request is enough.
@kvlonge kvlonge closed this Nov 16, 2026
@kvlonge kvlonge reopened this Nov 16, 2026
@chio-labs-delivery
chio-labs-delivery Bot enabled auto-merge (squash) November 16, 2026 18:01
@chio-labs-delivery
chio-labs-delivery Bot merged commit a470ab1 into main Nov 16, 2026
2 checks passed
@chio-labs-delivery
chio-labs-delivery Bot deleted the fix/pull-request-trigger branch November 16, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant