Apache DataFusion SQL Query Engine
ci: fix workflow triggering extended tests from pr comments. (#15704)
Eshed Schacham3c4bd1b1aef4
diff --git a/.github/workflows/extended.yml b/.github/workflows/extended.ymlindex a5d68ff079..d80fdb75d9 100644--- a/.github/workflows/extended.yml+++ b/.github/workflows/extended.yml@@ -47,7 +47,7 @@ on:permissions:contents: readchecks: write-+jobs:# Check crate compiles and base cargo check passes@@ -58,6 +58,7 @@ jobs:steps:- uses: actions/checkout@v4with:+ ref: ${{ github.event.inputs.pr_head_sha }} # will be empty if triggered by pushsubmodules: truefetch-depth: 1- name: Install Rust@@ -81,6 +82,7 @@ jobs:steps:- uses: actions/checkout@v4with:+ ref: ${{ github.event.inputs.pr_head_sha }} # will be empty if triggered by pushsubmodules: truefetch-depth: 1- name: Free Disk Space (Ubuntu)@@ -114,6 +116,7 @@ jobs:steps:- uses: actions/checkout@v4with:+ ref: ${{ github.event.inputs.pr_head_sha }} # will be empty if triggered by pushsubmodules: truefetch-depth: 1- name: Setup Rust toolchain@@ -134,6 +137,7 @@ jobs:steps:- uses: actions/checkout@v4with:+ ref: ${{ github.event.inputs.pr_head_sha }} # will be empty if triggered by pushsubmodules: truefetch-depth: 1- name: Setup Rust toolchain@@ -161,14 +165,14 @@ jobs:echo "workflow_status=completed" >> $GITHUB_OUTPUTecho "conclusion=success" >> $GITHUB_OUTPUTfi-+- name: Update check runuses: actions/github-script@v7with:github-token: ${{ secrets.GITHUB_TOKEN }}script: |const workflowRunUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;-+await github.rest.checks.update({owner: context.repo.owner,repo: context.repo.repo,diff --git a/.github/workflows/pr_comment_commands.yml b/.github/workflows/pr_comment_commands.ymlindex a20a5b1596..6aa6caaf34 100644--- a/.github/workflows/pr_comment_commands.yml+++ b/.github/workflows/pr_comment_commands.yml@@ -44,12 +44,12 @@ jobs:repo: context.repo.repo,pull_number: context.payload.issue.number});-+// Extract the branch nameconst branchName = pullRequest.head.ref;const headSha = pullRequest.head.sha;const workflowRunsUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions?query=workflow%3A%22Datafusion+extended+tests%22+branch%3A${branchName}`;-+// Create a check run that links to the Actions tab so the run will be visible in GitHub UIconst check = await github.rest.checks.create({owner: context.repo.owner,@@ -69,7 +69,7 @@ jobs:owner: context.repo.owner,repo: context.repo.repo,workflow_id: 'extended.yml',- ref: branchName,+ ref: 'main',inputs: {pr_number: context.payload.issue.number.toString(),check_run_id: check.data.id.toString(),@@ -77,7 +77,7 @@ jobs:}});- - name: Add reaction to comment+ - name: Add reaction to commentuses: actions/github-script@v7with:script: |@@ -86,4 +86,4 @@ jobs:repo: context.repo.repo,comment_id: context.payload.comment.id,content: 'rocket'- });\ No newline at end of file+ });