Skip to content

Commit 0dc6332

Browse files
committed
chore: send benchmark dispatch to correct repo
1 parent d46d052 commit 0dc6332

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/benchmark.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- '*'
77
paths:
88
- lib/**
9+
- workspaces/**/lib/**
910
issue_comment:
1011
types:
1112
- created
@@ -36,7 +37,7 @@ jobs:
3637
} = context
3738
3839
if (eventName === 'pull_request' && !process.env.GITHUB_TOKEN) {
39-
console.log('No GITHUB_TOKEN - from fork pull request, exiting')
40+
core.info('No GITHUB_TOKEN - from fork pull request, exiting')
4041
return
4142
}
4243
@@ -47,7 +48,7 @@ jobs:
4748
username: payload.comment.user.login,
4849
})
4950
if (res.data.permission !== 'admin') {
50-
console.log(`Commenter is not an admin, exiting`)
51+
core.info(`Commenter is not an admin, exiting`)
5152
return
5253
}
5354
@@ -65,14 +66,21 @@ jobs:
6566
repo,
6667
pull_number: number,
6768
}).then(r => r.data)
69+
70+
core.info(`Pull request: ${pullRequest.number}`)
71+
core.info(`Base ref: ${pullRequest.base.ref}`)
6872
6973
const matchesRelease = pullRequest.base.ref.match(/^release\/v(\d+)$/)
7074
const targetSpec = matchesRelease ? matchesRelease[1] : 'latest'
75+
core.info(`Target spec: ${targetSpec}`)
76+
77+
const eventType = `"${eventName} ${owner}/${repo}#${pullRequest.number}"`
78+
core.info(`Event type: ${eventType}`)
7179
7280
await github.rest.repos.createDispatchEvent({
73-
owner,
74-
repo,
75-
event_type: `"${eventName} ${owner}/${repo}#${number}"`,
81+
owner: 'npm',
82+
repo: 'benchmarks',
83+
event_type: eventType,
7684
client_payload: {
7785
owner,
7886
repo,

0 commit comments

Comments
 (0)