Skip to content

Commit d142349

Browse files
authored
Merge pull request #61 from leotsarev/patch-1
Improve message when failed to determine git branch
2 parents bee5474 + ac03769 commit d142349

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/dotnet-releaser/GitInformation.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ private GitInformation(Repository repository, Branch branch, string branchName)
4343
{
4444
logger.Error($@"Unable to retrieve the current branch from the commit {repository.Head.Tip.Sha}. The current action requires it. Please make sure that:
4545
1) The current commit is a checkout on a valid branch.
46-
2) If running on GitHub Action, you are using `actions/checkout@v2` and not v1, but also that the property `fetch-depth: 0` is correctly setup.
46+
2) If running on GitHub Action, you are using `actions/checkout@v4` and not v1, but also that the property `fetch-depth: 0` is correctly setup.
4747
3) We have found the following branches containing this commit [{string.Join(",", repository.Branches.Select(x => x.FriendlyName))}].
48+
4) You pushed only tags (`git push --tags`) and forget to push whole branch.h
4849
");
4950
return null;
5051
}
@@ -70,4 +71,4 @@ private static string GetShortBranchName(Branch branch)
7071

7172
return branchName;
7273
}
73-
}
74+
}

0 commit comments

Comments
 (0)