Skip to content

Commit d2466ae

Browse files
authored
Fix pr-main-warning.yml (#50409)
Use `pull_request_target` event trigger so the action runs in the context of the base branch and use `pull-requests: write` so it can actually post a comment to the PR.
1 parent 0b8ab33 commit d2466ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/pr-main-warning.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: PR Main Branch Warning
22
on:
3-
pull_request:
3+
pull_request_target:
44
types: [opened]
55
branches:
66
- main
77

88
permissions:
9-
issues: write
9+
pull-requests: write
1010

1111
jobs:
1212
comment:

0 commit comments

Comments
 (0)