Unverified Commit c4496912 authored by Wolfgang Walther's avatar Wolfgang Walther
Browse files

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.
parent 1fbcad04
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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