diff --git a/src/historical.ts b/src/historical.ts index 98f5728e..672df973 100644 --- a/src/historical.ts +++ b/src/historical.ts @@ -56,6 +56,7 @@ export async function generateHistoricSummary( const limitedSummaryRows = summaryRows.slice(0, rows) const summaryTable = ` + | Build ๐Ÿ—๏ธ | Result ๐Ÿงช | Tests ๐Ÿ“ | Passed โœ… | Failed โŒ | Skipped โญ๏ธ | Pending โณ | Other โ“ | Flaky ๐Ÿ‚ | Duration โฑ๏ธ | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ${limitedSummaryRows.join('\n')} @@ -105,8 +106,9 @@ async function fetchPreviousRuns( run.pull_requests.some( (pr: any) => pr.number === githubProperties.pullRequestNumber ) + const isWorkflowNameMatch = run.name === githubProperties.workflowName; - if (isBranchMatch || isPRMatch) { + if ((isBranchMatch || isPRMatch) && isWorkflowNameMatch) { console.log( `Match found for workflow ${run.name} with run number ${run.run_number}` ) @@ -116,7 +118,7 @@ async function fetchPreviousRuns( ) } - return isBranchMatch || isPRMatch + return (isBranchMatch || isPRMatch) && isWorkflowNameMatch; } ) diff --git a/types/ctrf.d.ts b/types/ctrf.d.ts index 88ab14c1..89687fcd 100644 --- a/types/ctrf.d.ts +++ b/types/ctrf.d.ts @@ -32,6 +32,7 @@ export interface CtrfTest { suite?: string message?: string trace?: string + line?: number ai?: string rawStatus?: string tags?: string[] @@ -49,6 +50,7 @@ export interface CtrfTest { } export interface CtrfEnvironment { + reportName?: string appName?: string appVersion?: string osPlatform?: string