Skip to content

Commit

Permalink
Only return to branch on non closed events
Browse files Browse the repository at this point in the history
  • Loading branch information
Sauloxd committed Sep 2, 2020
1 parent 20553a8 commit c59800f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/action/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10125,9 +10125,6 @@ async function createReviewApp() {
});
}

core.debug('Return to original state');
await exec('git', ['fetch', 'origin', branchName]);
await exec('git', ['checkout', branchName]);
}


Expand Down Expand Up @@ -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]);
}


Expand Down
3 changes: 0 additions & 3 deletions packages/action/src/create-review-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,4 @@ async function createReviewApp() {
});
}

core.debug('Return to original state');
await exec('git', ['fetch', 'origin', branchName]);
await exec('git', ['checkout', branchName]);
}
3 changes: 3 additions & 0 deletions packages/action/src/other-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}

0 comments on commit c59800f

Please sign in to comment.