Do not try to update head of current branch

This commit is contained in:
Michal Dorner 2021-03-08 15:29:27 +01:00
parent 68792bf56a
commit 8801c887e9
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
2 changed files with 2 additions and 2 deletions

2
dist/index.js vendored
View file

@ -3875,7 +3875,7 @@ async function getChangesSinceMergeBase(baseRef, ref, initialFetchDepth) {
let lastCommitCount = await getCommitCount();
let depth = Math.max(lastCommitCount * 2, initialFetchDepth);
while (!(await hasMergeBase())) {
await exec_1.default('git', ['fetch', `--depth=${depth}`, 'origin', `${baseRef}:${baseRef}`, `${ref}:${ref}`]);
await exec_1.default('git', ['fetch', `--depth=${depth}`, 'origin', `${baseRef}:${baseRef}`, `${ref}`]);
const commitCount = await getCommitCount();
if (commitCount === lastCommitCount) {
core.info('No more commits were fetched');