Skip to content

Commit 4593bbd

Browse files
committed
additional fields for ActionSchedule.ToActionRun
1 parent 23d0345 commit 4593bbd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

models/actions/utils.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ func calculateDuration(started, stopped timeutil.TimeStamp, status Status) time.
8383
return timeSince(s).Truncate(time.Second)
8484
}
8585

86+
// best effort function to convert an action schedule to action run, to be used in GenerateGiteaContext
8687
func (s *ActionSchedule) ToActionRun() *ActionRun {
8788
return &ActionRun{
8889
Title: s.Title,
@@ -96,5 +97,7 @@ func (s *ActionSchedule) ToActionRun() *ActionRun {
9697
CommitSHA: s.CommitSHA,
9798
Event: s.Event,
9899
EventPayload: s.EventPayload,
100+
Created: s.Created,
101+
Updated: s.Updated,
99102
}
100103
}

0 commit comments

Comments
 (0)