File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,11 @@ func (a *Action) GetBranch() string {
242242 return strings .TrimPrefix (a .RefName , git .BranchPrefix )
243243}
244244
245+ // GetTag returns the action's repository tag.
246+ func (a * Action ) GetTag () string {
247+ return strings .TrimPrefix (a .RefName , git .TagPrefix )
248+ }
249+
245250// GetContent returns the action's content.
246251func (a * Action ) GetContent () string {
247252 return a .Content
Original file line number Diff line number Diff line change 2828 {{else if eq .GetOpType 8}}
2929 {{$.i18n.Tr "action.transfer_repo" .GetContent .GetRepoLink .ShortRepoPath | Str2html}}
3030 {{else if eq .GetOpType 9}}
31- {{ $branchLink := .GetBranch | EscapePound | Escape}}
32- {{$.i18n.Tr "action.push_tag" .GetRepoLink $branchLink .ShortRepoPath | Str2html}}
31+ {{ $tagLink := .GetTag | EscapePound | Escape}}
32+ {{$.i18n.Tr "action.push_tag" .GetRepoLink $tagLink .ShortRepoPath | Str2html}}
3333 {{else if eq .GetOpType 10}}
3434 {{ $index := index .GetIssueInfos 0}}
3535 {{$.i18n.Tr "action.comment_issue" .GetRepoLink $index .ShortRepoPath | Str2html}}
5050 {{$.i18n.Tr "action.reopen_pull_request" .GetRepoLink $index .ShortRepoPath | Str2html}}
5151 {{else if eq .GetOpType 16}}
5252 {{ $index := index .GetIssueInfos 0}}
53- {{$.i18n.Tr "action.delete_tag" .GetRepoLink (.GetBranch |Escape) .ShortRepoPath | Str2html}}
53+ {{$.i18n.Tr "action.delete_tag" .GetRepoLink (.GetTag |Escape) .ShortRepoPath | Str2html}}
5454 {{else if eq .GetOpType 17}}
5555 {{ $index := index .GetIssueInfos 0}}
5656 {{$.i18n.Tr "action.delete_branch" .GetRepoLink (.GetBranch|Escape) .ShortRepoPath | Str2html}}
You can’t perform that action at this time.
0 commit comments