[CI] test built
This commit is contained in:
parent
5ea31358e9
commit
d3b398b230
2 changed files with 10 additions and 3 deletions
12
dist/index.js
vendored
12
dist/index.js
vendored
|
@ -3080,9 +3080,15 @@ function createOrUpdateBranch(git, commitMessage, base, branch, branchRemoteName
|
||||||
core.info(`Pull request branch '${branch}' already exists as remote branch '${branchRemoteName}/${branch}'`);
|
core.info(`Pull request branch '${branch}' already exists as remote branch '${branchRemoteName}/${branch}'`);
|
||||||
// Checkout the pull request branch
|
// Checkout the pull request branch
|
||||||
yield git.checkout(branch);
|
yield git.checkout(branch);
|
||||||
if (yield hasDiff(git, branch, tempBranch)) {
|
// Reset the branch if one of the following conditions is true.
|
||||||
// If the branch differs from the recreated temp version then the branch is reset
|
// - If the branch differs from the recreated temp branch
|
||||||
// For changes on base this action is similar to a rebase of the pull request branch
|
// - If the branch is both ahead AND behind the base
|
||||||
|
// For changes on base this reset is equivalent to a rebase of the pull request branch.
|
||||||
|
// The second condition makes sure we catch a case where the branch was squash merged
|
||||||
|
// and we need to reset to make sure it doesn't appear to have a diff with the base.
|
||||||
|
if ((yield hasDiff(git, branch, tempBranch)) ||
|
||||||
|
((yield isAhead(git, base, branch)) &&
|
||||||
|
(yield isBehind(git, base, branch)))) {
|
||||||
core.info(`Resetting '${branch}'`);
|
core.info(`Resetting '${branch}'`);
|
||||||
// Alternatively, git switch -C branch tempBranch
|
// Alternatively, git switch -C branch tempBranch
|
||||||
yield git.checkout(branch, tempBranch);
|
yield git.checkout(branch, tempBranch);
|
||||||
|
|
1
report.txt
Normal file
1
report.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
1599284177
|
Loading…
Add table
Add a link
Reference in a new issue