From 575cac65dc565c68e29403f4508b074808feff0c Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Wed, 9 Oct 2024 17:03:47 +0200 Subject: [PATCH] fixes --- .github/workflows/create_test_report.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create_test_report.yml b/.github/workflows/create_test_report.yml index 1a8b3938f97fd..0d99e554058e0 100644 --- a/.github/workflows/create_test_report.yml +++ b/.github/workflows/create_test_report.yml @@ -86,7 +86,7 @@ jobs: const mergeWorkflowUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`; const reportMd = await fs.promises.readFile('report.md', 'utf8'); - const commitSha = '${{ github.sha }}vs${{ github.event.workflow_run.head_commit }}'; + const commitSha = '${{ github.sha }}vs${{ github.event.workflow_run.head_commit.id }}'; const newTableRow = `| [${{ github.event.workflow_run.name }}](${mergeWorkflowUrl}) | ${commitSha} ${reportMd} [Open](${reportUrl}) |`; @@ -107,8 +107,7 @@ jobs: const headerIndex = lines.findIndex(line => line.includes(mergeReportsHeader)); const tableStartIndex = lines.findIndex((line, index) => index > headerIndex && line.includes(tableHeader)); - // Insert new row after the table header - lines.splice(tableStartIndex + 1, 0, newTableRow); + lines.splice(tableStartIndex + 2, 0, newTableRow); const updatedBody = lines.join('\n');