[CI] test built

This commit is contained in:
peter-evans 2020-09-05 08:18:57 +00:00 committed by GitHub
parent 5ea31358e9
commit 7e8d709181
2 changed files with 12 additions and 3 deletions

14
dist/index.js vendored
View file

@ -3080,9 +3080,17 @@ function createOrUpdateBranch(git, commitMessage, base, branch, branchRemoteName
core.info(`Pull request branch '${branch}' already exists as remote branch '${branchRemoteName}/${branch}'`);
// Checkout the pull request branch
yield git.checkout(branch);
if (yield hasDiff(git, branch, tempBranch)) {
// If the branch differs from the recreated temp version then the branch is reset
// For changes on base this action is similar to a rebase of the pull request branch
// Reset the branch if one of the following conditions is true.
// - If the branch differs from the recreated temp branch.
// - If the recreated temp branch is not ahead of the base AND the branch is both
// ahead AND behind the base. This catches a case where the branch was squash
// merged but not deleted. We need to reset to make sure it doesn't appear to
// have a diff with the base.
// For changes on base this reset is equivalent to a rebase of the pull request branch.
if ((yield hasDiff(git, branch, tempBranch)) ||
(!(yield isAhead(git, base, tempBranch)) &&
(yield isAhead(git, base, branch)) &&
(yield isBehind(git, base, branch)))) {
core.info(`Resetting '${branch}'`);
// Alternatively, git switch -C branch tempBranch
yield git.checkout(branch, tempBranch);

1
report.txt Normal file
View file

@ -0,0 +1 @@
1599293937