Skip to content

backport: start the merge run on push, pull_request_target is blocked #78

Done

Description

@ernolf

GitHub blocks pull_request_target by default since 2 December 2026 (changelog). The backport workflow starts its merge run on pull_request_target: closed, so a /backport to command written on an open pull request no longer runs when the pull request is merged: ernolf/files_sharing_raw#232 was merged after the enforcement and no backport opened. A command written after the merge still works, because issue_comment is not affected.

Start the merge run on the push of the merge commit to the default branch and the stable* branches instead. A push runs with the secrets of the repository also for a pull request from a fork, which is what pull_request_target was there for. The job finds the merged pull request through GET /repos/{owner}/{repo}/commits/{sha}/pulls by its merge_commit_sha, which covers squash, merge and rebase merges, and skips the push of a new branch, a force push and a deleted branch.

Activity

  1. added
    bug
    automation
    workflows
    on Dec 2, 2026
  2. self-assigned this
    on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

automationbugworkflows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions