Skip to content

Commit

Permalink
Treat different React versions as separate runs
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Jun 25, 2024
1 parent b2fc0f6 commit 1863989
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,15 @@ module.exports = defineConfig({
let runTitle: string | undefined = undefined;
if (process.env.CI || process.env.REACT_VERSION) {
const commitTitle = execSync(`git log -1 --pretty="format:%s"`).toString().trim();
runTitle = `${commitTitle} (React ${process.env.REACT_VERSION})`;
const reactVersion = process.env.REACT_VERSION!;
runTitle = `${commitTitle} (React ${reactVersion})`;

console.log("Commit title: ", commitTitle, "run title: ", runTitle);
process.env.RECORD_REPLAY_METADATA_SOURCE_COMMIT_TITLE = runTitle;
const commitHash = process.env.GITHUB_SHA!;
const runId = `${commitHash}-${reactVersion}`;
// Force the UI to treat these as separate runs
process.env.REPLAY_METADATA_TEST_RUN_ID = runId;
}

replayPlugin(on, config, {
Expand Down

0 comments on commit 1863989

Please sign in to comment.