Skip to content

Commit

Permalink
Merge pull request #61 from leotsarev/patch-1
Browse files Browse the repository at this point in the history
Improve message when failed to determine git branch
  • Loading branch information
xoofx authored Jul 13, 2024
2 parents bee5474 + ac03769 commit d142349
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dotnet-releaser/GitInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ private GitInformation(Repository repository, Branch branch, string branchName)
{
logger.Error($@"Unable to retrieve the current branch from the commit {repository.Head.Tip.Sha}. The current action requires it. Please make sure that:
1) The current commit is a checkout on a valid branch.
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.
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.
3) We have found the following branches containing this commit [{string.Join(",", repository.Branches.Select(x => x.FriendlyName))}].
4) You pushed only tags (`git push --tags`) and forget to push whole branch.h
");
return null;
}
Expand All @@ -70,4 +71,4 @@ private static string GetShortBranchName(Branch branch)

return branchName;
}
}
}

0 comments on commit d142349

Please sign in to comment.