diff --git a/packages/action/dist/index.js b/packages/action/dist/index.js index c30f8eb..8ad6903 100644 --- a/packages/action/dist/index.js +++ b/packages/action/dist/index.js @@ -10125,9 +10125,6 @@ async function createReviewApp() { }); } - core.debug('Return to original state'); - await exec('git', ['fetch', 'origin', branchName]); - await exec('git', ['checkout', branchName]); } @@ -10294,6 +10291,9 @@ async function otherEvents({ await exec('git', ['push', 'origin', ghBranch]); }); await io.rmRF('.tmp'); + core.debug('Return to original state'); + await exec('git', ['fetch', 'origin', branchName]); + await exec('git', ['checkout', branchName]); } diff --git a/packages/action/src/create-review-app.js b/packages/action/src/create-review-app.js index e5d128a..7ac2b8b 100644 --- a/packages/action/src/create-review-app.js +++ b/packages/action/src/create-review-app.js @@ -57,7 +57,4 @@ async function createReviewApp() { }); } - core.debug('Return to original state'); - await exec('git', ['fetch', 'origin', branchName]); - await exec('git', ['checkout', branchName]); } diff --git a/packages/action/src/other-events.js b/packages/action/src/other-events.js index 6dc67a3..9247f66 100644 --- a/packages/action/src/other-events.js +++ b/packages/action/src/other-events.js @@ -89,4 +89,7 @@ async function otherEvents({ await exec('git', ['push', 'origin', ghBranch]); }); await io.rmRF('.tmp'); + core.debug('Return to original state'); + await exec('git', ['fetch', 'origin', branchName]); + await exec('git', ['checkout', branchName]); }