Skip to content

Commit a2cc6e1

Browse files
committed
chore: send benchmark dispatch to correct repo
1 parent 0c00d9c commit a2cc6e1

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
@@ -38,7 +39,7 @@ jobs:
3839
} = context
3940
4041
if (eventName === 'pull_request' && !process.env.GITHUB_TOKEN) {
41-
console.log('No GITHUB_TOKEN - from fork pull request, exiting')
42+
core.info('No GITHUB_TOKEN - from fork pull request, exiting')
4243
return
4344
}
4445
@@ -49,7 +50,7 @@ jobs:
4950
username: payload.comment.user.login,
5051
})
5152
if (res.data.permission !== 'admin') {
52-
console.log(`Commenter is not an admin, exiting`)
53+
core.info(`Commenter is not an admin, exiting`)
5354
return
5455
}
5556
@@ -67,14 +68,21 @@ jobs:
6768
repo,
6869
pull_number: number,
6970
}).then(r => r.data)
71+
72+
core.info(`Pull request: ${pullRequest.number}`)
73+
core.info(`Base ref: ${pullRequest.base.ref}`)
7074
7175
const matchesRelease = pullRequest.base.ref.match(/^release\/v(\d+)$/)
7276
const targetSpec = matchesRelease ? matchesRelease[1] : 'latest'
77+
core.info(`Target spec: ${targetSpec}`)
78+
79+
const eventType = `"${eventName} ${owner}/${repo}#${pullRequest.number}"`
80+
core.info(`Event type: ${eventType}`)
7381
7482
await github.rest.repos.createDispatchEvent({
75-
owner,
76-
repo,
77-
event_type: `"${eventName} ${owner}/${repo}#${number}"`,
83+
owner: 'npm',
84+
repo: 'benchmarks',
85+
event_type: eventType,
7886
client_payload: {
7987
owner,
8088
repo,

0 commit comments

Comments
 (0)