diff options
Diffstat (limited to 'models/action.go')
-rw-r--r-- | models/action.go | 5 |
1 files changed, 5 insertions, 0 deletions
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 |