mirror of
https://forgejo.stefka.eu/jiriks74/create-pull-request.git
synced 2025-01-18 16:01:06 +01:00
[CI] test committed
This commit is contained in:
parent
6ce4eca6b6
commit
65019e63c5
2 changed files with 4 additions and 11 deletions
10
dist/index.js
vendored
10
dist/index.js
vendored
|
@ -164,21 +164,13 @@ function createOrUpdateBranch(git, commitMessage, base, branch, branchRemoteName
|
||||||
}
|
}
|
||||||
// Stash any uncommitted tracked and untracked changes
|
// Stash any uncommitted tracked and untracked changes
|
||||||
const stashed = yield git.stashPush(['--include-untracked']);
|
const stashed = yield git.stashPush(['--include-untracked']);
|
||||||
// Perform fetch and reset the working base
|
// Reset the working base
|
||||||
// Commits made during the workflow will be removed
|
// Commits made during the workflow will be removed
|
||||||
if (workingBaseType == WorkingBaseType.Branch) {
|
if (workingBaseType == WorkingBaseType.Branch) {
|
||||||
core.info(`Resetting working base branch '${workingBase}'`);
|
core.info(`Resetting working base branch '${workingBase}'`);
|
||||||
if (branchRemoteName == 'fork') {
|
|
||||||
// If pushing to a fork we must fetch with 'unshallow' to avoid the following error on git push
|
|
||||||
// ! [remote rejected] HEAD -> tests/push-branch-to-fork (shallow update not allowed)
|
|
||||||
yield git.fetch([`${workingBase}:${workingBase}`], baseRemote, ['--force'], true);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// If the remote is 'origin' we can git reset
|
|
||||||
yield git.checkout(workingBase);
|
yield git.checkout(workingBase);
|
||||||
yield git.exec(['reset', '--hard', `${baseRemote}/${workingBase}`]);
|
yield git.exec(['reset', '--hard', `${baseRemote}/${workingBase}`]);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// If the working base is not the base, rebase the temp branch commits
|
// If the working base is not the base, rebase the temp branch commits
|
||||||
// This will also be true if the working base type is a commit
|
// This will also be true if the working base type is a commit
|
||||||
if (workingBase != base) {
|
if (workingBase != base) {
|
||||||
|
|
1
report.txt
Normal file
1
report.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
1712912432
|
Loading…
Add table
Add a link
Reference in a new issue