[CI] test committed
This commit is contained in:
parent
5ea31358e9
commit
486c8e6395
2 changed files with 11 additions and 3 deletions
13
dist/index.js
vendored
13
dist/index.js
vendored
|
@ -3080,9 +3080,16 @@ 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 recreated temp branch is not ahead of the base. This means there will be
|
||||||
|
// no pull request diff after the branch is reset. This will reset any undeleted
|
||||||
|
// branches after merging. In particular, it 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 due to different commits for the same changes.
|
||||||
|
// 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))) {
|
||||||
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 @@
|
||||||
|
1599350271
|
Loading…
Add table
Add a link
Reference in a new issue