mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-20 21:01:06 +08:00
enhance: replace ${BRANCH} with current branch name if the custom action's scope is Repository (#2274)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -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")
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user