Skip to content

Commit

Permalink
address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayali Warule committed Nov 25, 2024
1 parent 6f4f3c9 commit bfbbee3
Show file tree
Hide file tree
Showing 9 changed files with 188 additions and 225 deletions.
10 changes: 5 additions & 5 deletions action/dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -35994,7 +35994,7 @@ var run = async () => {
if (numVisualTestFailures > diffFileCount) {
(0, import_core6.setFailed)(VISUAL_TEST_EXECUTION_FAILURE);
if (!commitHash) return;
octokit.rest.repos.createCommitStatus({
return octokit.rest.repos.createCommitStatus({
sha: commitHash,
context: VISUAL_REGRESSION_CONTEXT,
state: "failure",
Expand All @@ -36010,15 +36010,15 @@ var run = async () => {
(0, import_core6.warning)(
"Disabling auto merge because this is a retry attempt. This is to avoid auto merging prematurely."
);
await disableAutoMerge(hash);
await disableAutoMerge(commitHash);
} else if (latestVisualRegressionStatus?.state === "failure") {
(0, import_core6.info)(
"Skipping status update since Visual Regression status has already been set to failed."
);
return;
}
return octokit.rest.repos.createCommitStatus({
sha: hash,
sha: commitHash,
context: VISUAL_REGRESSION_CONTEXT,
state: "success",
description: `Visual tests passed${isRetry ? " on retry" : ""}!`,
Expand All @@ -36041,7 +36041,7 @@ var run = async () => {
await uploadBaseImages(newFilePaths);
if (!commitHash) return;
return octokit.rest.repos.createCommitStatus({
sha: hash,
sha: commitHash,
context: VISUAL_REGRESSION_CONTEXT,
state: "success",
description: "New base images were created!",
Expand All @@ -36051,7 +36051,7 @@ var run = async () => {
await uploadAllImages(hash);
if (!commitHash) return;
await octokit.rest.repos.createCommitStatus({
sha: hash,
sha: commitHash,
context: VISUAL_REGRESSION_CONTEXT,
state: "failure",
description: "A visual regression was detected. Check Comparadise!",
Expand Down
2 changes: 1 addition & 1 deletion action/dist/main.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions action/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const run = async () => {
}

return octokit.rest.repos.createCommitStatus({
sha: hash,
sha: commitHash,
context: VISUAL_REGRESSION_CONTEXT,
state: 'success',
description: `Visual tests passed${isRetry ? ' on retry' : ''}!`,
Expand Down Expand Up @@ -142,7 +142,7 @@ export const run = async () => {
await uploadBaseImages(newFilePaths);
if (!commitHash) return;
return octokit.rest.repos.createCommitStatus({
sha: hash,
sha: commitHash,
context: VISUAL_REGRESSION_CONTEXT,
state: 'success',
description: 'New base images were created!',
Expand All @@ -153,7 +153,7 @@ export const run = async () => {
await uploadAllImages(hash);
if (!commitHash) return;
await octokit.rest.repos.createCommitStatus({
sha: hash,
sha: commitHash,
context: VISUAL_REGRESSION_CONTEXT,
state: 'failure',
description: 'A visual regression was detected. Check Comparadise!',
Expand Down
207 changes: 0 additions & 207 deletions action/test/run-with-diff-id.test.ts

This file was deleted.

Loading

0 comments on commit bfbbee3

Please sign in to comment.