File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -18,18 +18,18 @@ jobs:
1818 steps :
1919 - name : Incoming Pull Request
2020 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+ ) || (
2225 github.event_name == 'issue_comment' &&
2326 github.event.issue.pull_request &&
2427 github.event.issue.state == 'open' &&
2528 startsWith(github.event.comment.body, '@npm-cli-bot benchmark this')
2629 )
27- env :
28- # gh cli uses these env vars for owner/repo/token
29- GH_REPO : " npm/benchmarks"
30- GITHUB_TOKEN : ${{ secrets.BENCHMARK_DISPATCH_TOKEN }}
3130 uses : actions/github-script@v6
3231 with :
32+ github-token : ${{ secrets.BENCHMARK_DISPATCH_TOKEN }}
3333 script : |
3434 const {
3535 payload,
3838 issue: { number },
3939 } = context
4040
41- if (eventName === 'pull_request' && !process.env.GITHUB_TOKEN) {
42- core.info('No GITHUB_TOKEN - from fork pull request, exiting')
43- return
44- }
45-
4641 if (eventName === 'issue_comment') {
4742 const res = await github.rest.repos.getCollaboratorPermissionLevel({
4843 owner,
You can’t perform that action at this time.
0 commit comments