diff --git a/.github/workflows/sonar-pr-from-fork-scan.yml b/.github/workflows/sonar-pr-from-fork-scan.yml index 59a443eb276ad..33768ff97109e 100644 --- a/.github/workflows/sonar-pr-from-fork-scan.yml +++ b/.github/workflows/sonar-pr-from-fork-scan.yml @@ -53,12 +53,14 @@ jobs: id: check with: script: | - const { jobs } = await github.rest.actions.listJobsForWorkflowRunAttempt({ + const { data } = await github.rest.actions.listJobsForWorkflowRunAttempt({ ...context.repo, run_id: context.runId, attempt_number: process.env.GITHUB_RUN_ATTEMPT, }); + const job_url = data.jobs[0].html_url; + const { check } = await github.rest.checks.create({ ...context.repo, name: 'Sonar Quality Pull Request Analysis', @@ -66,7 +68,7 @@ jobs: status: 'in_progress', output: { title: 'Sonar Quality Pull Request Analysis', - summary: `[Details ...](${jobs.jobs[0].html_url})` + summary: '[Details ...](' + job_url + ')' } });