playwright-slack-report-burak 3.2.3 → 3.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -420,8 +420,12 @@ class ResultsParser {
420
420
  },
421
421
  params: { per_page: 100 }
422
422
  });
423
+ const runPrefix = `${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}`;
423
424
  const artifact = (listResponse.data.artifacts || []).find(
424
- (a) => (a.name || '').endsWith(`-artifacts-shard-${shard}`)
425
+ (a) => {
426
+ const name = a.name || '';
427
+ return name.startsWith(runPrefix) && name.endsWith(`-artifacts-shard-${shard}`);
428
+ }
425
429
  );
426
430
  if (!artifact?.archive_download_url) return false;
427
431
  const downloadResponse = await axios.get(artifact.archive_download_url, {
@@ -437,7 +441,7 @@ class ResultsParser {
437
441
  const baseName = path.basename(entry.entryName);
438
442
  if (targetFiles.includes(baseName)) {
439
443
  fs.writeFileSync(path.join(SUMMARIES_DIR, baseName), entry.getData());
440
- console.log(`Successfully fetched ${baseName} from shard ${shard}`);
444
+ console.log(`Successfully fetched ${baseName} from artifact ${artifact.name}`);
441
445
  }
442
446
  }
443
447
  return true;
package/package.json CHANGED
@@ -33,7 +33,7 @@
33
33
  "lint-fix": "npx eslint . --ext .ts --fix"
34
34
  },
35
35
  "name": "playwright-slack-report-burak",
36
- "version": "3.2.3",
36
+ "version": "3.2.4",
37
37
  "main": "index.js",
38
38
  "types": "dist/index.d.ts",
39
39
  "author": "Burak B. <burak.boluk@hotmail.com>",