From 36bd5d70cd390d59d1440b2e68bd3170d6af7ca2 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 20 Dec 2020 07:46:28 +0800 Subject: Fix feed push tag (#14064) * Fix dashboard feed bug when push tag * Fix variable name * Fix delete tag Co-authored-by: 6543 <6543@obermui.de> --- models/action.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'models/action.go') diff --git a/models/action.go b/models/action.go index e702a4263c..5546409241 100644 --- a/models/action.go +++ b/models/action.go @@ -242,6 +242,11 @@ func (a *Action) GetBranch() string { return strings.TrimPrefix(a.RefName, git.BranchPrefix) } +// GetTag returns the action's repository tag. +func (a *Action) GetTag() string { + return strings.TrimPrefix(a.RefName, git.TagPrefix) +} + // GetContent returns the action's content. func (a *Action) GetContent() string { return a.Content -- cgit v1.2.3