From 0dc63323f6566e6c94e03044c03d14f9a0a5142c Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Tue, 12 Sep 2023 18:41:44 -0700 Subject: [PATCH] chore: send benchmark dispatch to correct repo --- .github/workflows/benchmark.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 40f07027e1762..0560d2ceb1415 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -6,6 +6,7 @@ on: - '*' paths: - lib/** + - workspaces/**/lib/** issue_comment: types: - created @@ -36,7 +37,7 @@ jobs: } = context if (eventName === 'pull_request' && !process.env.GITHUB_TOKEN) { - console.log('No GITHUB_TOKEN - from fork pull request, exiting') + core.info('No GITHUB_TOKEN - from fork pull request, exiting') return } @@ -47,7 +48,7 @@ jobs: username: payload.comment.user.login, }) if (res.data.permission !== 'admin') { - console.log(`Commenter is not an admin, exiting`) + core.info(`Commenter is not an admin, exiting`) return } @@ -65,14 +66,21 @@ jobs: repo, pull_number: number, }).then(r => r.data) + + core.info(`Pull request: ${pullRequest.number}`) + core.info(`Base ref: ${pullRequest.base.ref}`) const matchesRelease = pullRequest.base.ref.match(/^release\/v(\d+)$/) const targetSpec = matchesRelease ? matchesRelease[1] : 'latest' + core.info(`Target spec: ${targetSpec}`) + + const eventType = `"${eventName} ${owner}/${repo}#${pullRequest.number}"` + core.info(`Event type: ${eventType}`) await github.rest.repos.createDispatchEvent({ - owner, - repo, - event_type: `"${eventName} ${owner}/${repo}#${number}"`, + owner: 'npm', + repo: 'benchmarks', + event_type: eventType, client_payload: { owner, repo,