File tree 1 file changed +5
-8
lines changed
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -18,16 +18,18 @@ jobs:
18
18
steps :
19
19
- name : Incoming Pull Request
20
20
if : |
21
- github.event_name == 'pull_request' || (
21
+ (
22
+ github.event_name == 'pull_request' &&
23
+ github.event.pull_request.head.repo.full_name == 'npm/cli'
24
+ ) || (
22
25
github.event_name == 'issue_comment' &&
23
26
github.event.issue.pull_request &&
24
27
github.event.issue.state == 'open' &&
25
28
startsWith(github.event.comment.body, '@npm-cli-bot benchmark this')
26
29
)
27
- env :
28
- GITHUB_TOKEN : ${{ secrets.BENCHMARK_DISPATCH_TOKEN }}
29
30
uses : actions/github-script@v6
30
31
with :
32
+ github-token : ${{ secrets.BENCHMARK_DISPATCH_TOKEN }}
31
33
script : |
32
34
const {
33
35
payload,
36
38
issue: { number },
37
39
} = context
38
40
39
- if (eventName === 'pull_request' && !process.env.GITHUB_TOKEN) {
40
- core.info('No GITHUB_TOKEN - from fork pull request, exiting')
41
- return
42
- }
43
-
44
41
if (eventName === 'issue_comment') {
45
42
const res = await github.rest.repos.getCollaboratorPermissionLevel({
46
43
owner,
You can’t perform that action at this time.
0 commit comments