Skip to content

Commit e04661c

Browse files
committed
Rename run.RefName to run.RefTooltip
1 parent 6619da9 commit e04661c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

models/actions/run.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ func (run *ActionRun) PrettyRef() string {
102102
return refName.ShortName()
103103
}
104104

105-
// RefName return ShortName
106-
func (run *ActionRun) RefName() string {
105+
// RefTooltip return a tooltop of run's ref. For pull request, it's the title of the PR, otherwise it's the ShortName.
106+
func (run *ActionRun) RefTooltip() string {
107107
payload, err := run.GetPullRequestEventPayload()
108108
if err == nil && payload != nil && payload.PullRequest != nil {
109109
return payload.PullRequest.Title

templates/repo/actions/runs_list.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
</div>
2929
<div class="flex-item-trailing">
3030
{{if $run.IsRefDeleted}}
31-
<span class="ui label run-list-ref gt-ellipsis tw-line-through" data-tooltip-content="{{$run.RefName}}">{{$run.PrettyRef}}</span>
31+
<span class="ui label run-list-ref gt-ellipsis tw-line-through" data-tooltip-content="{{$run.RefTooltip}}">{{$run.PrettyRef}}</span>
3232
{{else}}
33-
<a class="ui label run-list-ref gt-ellipsis" href="{{$run.RefLink}}" data-tooltip-content="{{$run.RefName}}">{{$run.PrettyRef}}</a>
33+
<a class="ui label run-list-ref gt-ellipsis" href="{{$run.RefLink}}" data-tooltip-content="{{$run.RefTooltip}}">{{$run.PrettyRef}}</a>
3434
{{end}}
3535
<div class="run-list-item-right">
3636
<div class="run-list-meta">{{svg "octicon-calendar" 16}}{{DateUtils.TimeSince $run.Updated}}</div>

0 commit comments

Comments
 (0)