Skip to content

Commit 7dc01b6

Browse files
author
Wilfried OLLIVIER
committed
Add created at date in result
1 parent 5635a86 commit 7dc01b6

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

application/result.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ type Result struct {
1515
Commit string
1616
Service string
1717
ID string
18+
CreatedAt string
1819
Inner template.HTML
1920
}
2021

@@ -31,6 +32,7 @@ func NewResultFromTask(t *task.Task, inner template.HTML, gitlabDomain string) (
3132
Commit: t.Commit,
3233
Service: t.Service,
3334
ID: t.Id.String(),
35+
CreatedAt: t.Creation.Format("2006-01-02 15:04:05"),
3436
Inner: inner,
3537
}, nil
3638
}

application/templates/result.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ <h3>Task Description</h3>
33
<ul>
44
<li>Project : <a href="{{ .GitlabDomain }}/{{ .Project }}" target="_blank">{{ .Project }}</a></li>
55
<li>Commit : <a href="{{ .GitlabDomain }}/{{ .Project }}/-/commit/{{ .Commit }}" target="_blank">{{ .Commit }}</a></li>
6+
<li>Created At : {{ .CreatedAt }}</li>
67
<li>Service : <a href="{{ .Domain }}/service/{{ .Service }}" target="_blank">{{ .Service }}</a></li>
78
<li>ID : {{ .ID }}</li>
89
</ul>

0 commit comments

Comments
 (0)