Skip to content

Commit 8af7ad5

Browse files
authored
docs: add usage to use pull_request_target as workflow triggers (#64)
1 parent 914f9fe commit 8af7ad5

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,25 @@ jobs:
2121
configuration-path: '.github/some_name_for_configs.yml' # Only needed if you use something other than .github/auto_assign.yml
2222
```
2323
24+
Change event that triggers a workflow to the `pull_request_target` if you want to enable the auto-assign action when opening pull requests from fork repositories or bots like Dependabot.
25+
26+
Using dangerous misuse of the `pull_request_target` event can be a security risk, so make sure you understand pros and cons before using it.
27+
28+
See below for details:
29+
30+
- [Events that trigger workflows / Pull request target - GitHub Docs](https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#pull_request_target)
31+
- [Events that trigger workflows / Pull request events for forked repositories - GitHub Docs](https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#pull-request-events-for-forked-repositories)
32+
33+
```diff
34+
name: 'Auto Assign'
35+
on:
36+
- pull_request:
37+
+ pull_request_target:
38+
types: [opened, ready_for_review]
39+
40+
jobs:
41+
```
42+
2443
Create a separate configuration file for the auto-assign action (e.g. `.github/auto_assign.yml`).
2544

2645
### Single Reviewers List

0 commit comments

Comments
 (0)