Skip to content

Replace pull_request_target in PR helper with split workflows - #4878

Merged
xiang17 merged 1 commit into
mainfrom
xiang17/migrate-pull_request_target
Oct 23, 2026
Merged

xiang17 merged 1 commit into
mainfrom
xiang17/migrate-pull_request_target

Conversation

@xiang17

@xiang17 xiang17 commented Oct 22, 2026

Copy link
Copy Markdown
Member

Remove pull_request_target from the Dependabot helper while preserving
automatic dependency lockfile and license updates.

  • Generate a text patch in a read-only pull_request workflow, without
    App credentials.
  • Publish the patch through a separate workflow_run workflow that
    validates the source run, open Dependabot PR, and current head SHA.
  • Apply changes in an isolated Git index without checking out or executing
    PR code in the privileged workflow.
  • Restrict changes to regular, nonexecutable lock/license files; reject
    binary patches and patches larger than 8 MiB.
  • Push using the existing GitHub App token so normal PR CI still runs.
    Do not force-push.
  • Skip uploading and publishing when no generated changes are needed.
    Cancel superseded producer runs for the same PR.

@xiang17
xiang17 merged commit a7dc589 into main Oct 23, 2026
147 checks passed
@xiang17
xiang17 deleted the xiang17/migrate-pull_request_target branch October 23, 2026 22:50
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.

2 participants