From 8395efdd55c722a9b4d78fc62d0bb848545a52e8 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 17 Apr 2026 17:23:04 +0800 Subject: [PATCH] enhance: replace `${BRANCH}` with current branch name if the custom action's scope is `Repository` (#2274) Signed-off-by: leo --- src/ViewModels/ExecuteCustomAction.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ViewModels/ExecuteCustomAction.cs b/src/ViewModels/ExecuteCustomAction.cs index 536f7202..98cf10ef 100644 --- a/src/ViewModels/ExecuteCustomAction.cs +++ b/src/ViewModels/ExecuteCustomAction.cs @@ -219,7 +219,7 @@ namespace SourceGit.ViewModels Models.Tag t => org.Replace("${TAG}", t.Name), Models.Remote r => org.Replace("${REMOTE}", r.Name), Models.CustomActionTargetFile f => org.Replace("${FILE}", f.File).Replace("${SHA}", f.Revision?.SHA ?? string.Empty), - _ => org + _ => org.Replace("${BRANCH}", _repo.CurrentBranch?.Name ?? "HEAD") }; }