From 1c5f05638f74b3d499ee1e3702bba16f61c43757 Mon Sep 17 00:00:00 2001 From: Keith Williams Date: Tue, 23 Dec 2025 17:51:14 -0300 Subject: [PATCH] fix: search by branch instead of SHA in E2E report workflow_dispatch (#26168) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .github/workflows/e2e-report.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e-report.yml b/.github/workflows/e2e-report.yml index b2f351934f..c992f0c7d1 100644 --- a/.github/workflows/e2e-report.yml +++ b/.github/workflows/e2e-report.yml @@ -67,23 +67,27 @@ jobs: } console.log('Found PR Update workflow ID:', prUpdateWorkflow.id); - // Find the most recent run for this SHA with blob-report artifacts + // Find the most recent completed run for this branch with blob-report artifacts + // We search by branch instead of SHA to handle cases where: + // 1. The PR was updated after E2E tests ran (artifacts exist for older SHA) + // 2. The current run for the SHA is still queued/in-progress const { data: runs } = await github.rest.actions.listWorkflowRuns({ owner: context.repo.owner, repo: context.repo.repo, workflow_id: prUpdateWorkflow.id, - head_sha: headSha, - per_page: 10 + branch: headBranch, + status: 'completed', + per_page: 20 }); - console.log('Found', runs.workflow_runs.length, 'runs for SHA'); + console.log('Found', runs.workflow_runs.length, 'completed runs for branch', headBranch); // Find a run with blob-report artifacts let selectedRun = null; let hasBlobReports = false; for (const run of runs.workflow_runs) { - console.log('Checking run', run.id, 'status:', run.status, 'conclusion:', run.conclusion); + console.log('Checking run', run.id, 'conclusion:', run.conclusion); const { data: artifacts } = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner,