Skip to content

Commit 90ce0cf

Browse files
authored
dependabot: auto-merge requires on pull_request_target
Auto-merge appears to function correctly with `pull_request_target`, allowing it to authenticate and operate within the context of the target repository. Without this, a 401 error is returned due to insufficient scope. Signed-off-by: Seena Fallah <seenafallah@gmail.com>
1 parent 01798c9 commit 90ce0cf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

content/code-security/tutorials/secure-your-dependencies/automating-dependabot-with-github-actions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ You can instead use {% data variables.product.prodname_actions %} and the {% dat
159159
```yaml copy
160160
{% data reusables.actions.actions-not-certified-by-github-comment %}
161161
name: Dependabot auto-merge
162-
on: pull_request
162+
on:
163+
pull_request_target:
164+
types: [opened, reopened, synchronize]
163165
164166
permissions:
165167
contents: write

0 commit comments

Comments
 (0)