ci/github-script/commits: fix job_url
This broke when we moved the check-cherry-picks workflow into the bigger PR workflow. At this time, the "workflow run" became the whole PR workflow, which includes many more than just 1 job, thus the assumption in `jobs[0]` doesn't hold anymore.
This commit is contained in:
@@ -13,11 +13,12 @@ module.exports = async function ({ github, context, core, dry }) {
|
||||
const job_url =
|
||||
context.runId &&
|
||||
(
|
||||
await github.rest.actions.listJobsForWorkflowRun({
|
||||
await github.paginate(github.rest.actions.listJobsForWorkflowRun, {
|
||||
...context.repo,
|
||||
run_id: context.runId,
|
||||
per_page: 100,
|
||||
})
|
||||
).data.jobs[0].html_url +
|
||||
).find(({ name }) => name == 'Check / cherry-pick').html_url +
|
||||
'?pr=' +
|
||||
pull_number
|
||||
|
||||
|
||||
Reference in New Issue
Block a user