Skip to content

Commit

Permalink
fix(ci): automerge on pull_request_target instead of pull_request
Browse files Browse the repository at this point in the history
- run automerge on pull_request_target instead of pull_request
- pull_request does not have access to repository secrets (since the CI
  runs on the pull_request code which might me malicious)
- pull_request_target instead runs on target branch code and has access
  to repository secrets
- pull_request_target is fine for automerge
- explaining [stackoverflow post](https://stackoverflow.com/a/74959635)

Signed-off-by: AtomicFS <[email protected]>
  • Loading branch information
AtomicFS committed Nov 25, 2024
1 parent 46c5296 commit b946bcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/bot--automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name: 'auto-merge'

on:
pull_request:
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review]

permissions: read-all
Expand Down

0 comments on commit b946bcf

Please sign in to comment.