Skip to content

Commit

Permalink
Use default branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
IT-VBFK committed Jan 7, 2023
1 parent 035e801 commit d9bb300
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .nuke/build.schema.json
Expand Up @@ -10,6 +10,10 @@
"type": "string",
"description": "The key to push to Nuget"
},
"BaseRef": {
"type": "string",
"description": "The target branch for the pull request"
},
"BranchSpec": {
"type": "string",
"description": "A branch specification such as develop or refs/pull/1775/merge"
Expand Down
4 changes: 3 additions & 1 deletion Build/Build.cs
Expand Up @@ -295,7 +295,9 @@ string[] Changes
{
using var repo = new Repository(GitRepository.LocalDirectory);

Tree targetBranch = repo.Branches[BaseRef].Tip.Tree;
string baseRef = BaseRef ?? "develop";

Tree targetBranch = repo.Branches[baseRef].Tip.Tree;
Tree workingDir = repo.Branches[repo.Head.FriendlyName].Tip.Tree;

return repo.Diff
Expand Down

0 comments on commit d9bb300

Please sign in to comment.