@@ -67,6 +67,9 @@ type ViewResponse struct {
6767 CanRerun bool `json:"canRerun"`
6868 CanDeleteArtifact bool `json:"canDeleteArtifact"`
6969 Done bool `json:"done"`
70+ WorkflowID string `json:"workflowID"`
71+ WorkflowLink string `json:"workflowLink"`
72+ IsSchedule bool `json:"isSchedule"`
7073 Jobs []* ViewJob `json:"jobs"`
7174 Commit ViewCommit `json:"commit"`
7275 } `json:"run"`
@@ -90,12 +93,10 @@ type ViewJob struct {
9093}
9194
9295type ViewCommit struct {
93- LocaleCommit string `json:"localeCommit"`
94- LocalePushedBy string `json:"localePushedBy"`
95- ShortSha string `json:"shortSHA"`
96- Link string `json:"link"`
97- Pusher ViewUser `json:"pusher"`
98- Branch ViewBranch `json:"branch"`
96+ ShortSha string `json:"shortSHA"`
97+ Link string `json:"link"`
98+ Pusher ViewUser `json:"pusher"`
99+ Branch ViewBranch `json:"branch"`
99100}
100101
101102type ViewUser struct {
@@ -151,6 +152,9 @@ func ViewPost(ctx *context_module.Context) {
151152 resp .State .Run .CanRerun = run .Status .IsDone () && ctx .Repo .CanWrite (unit .TypeActions )
152153 resp .State .Run .CanDeleteArtifact = run .Status .IsDone () && ctx .Repo .CanWrite (unit .TypeActions )
153154 resp .State .Run .Done = run .Status .IsDone ()
155+ resp .State .Run .WorkflowID = run .WorkflowID
156+ resp .State .Run .WorkflowLink = run .WorkflowLink ()
157+ resp .State .Run .IsSchedule = run .IsSchedule ()
154158 resp .State .Run .Jobs = make ([]* ViewJob , 0 , len (jobs )) // marshal to '[]' instead fo 'null' in json
155159 resp .State .Run .Status = run .Status .String ()
156160 for _ , v := range jobs {
@@ -172,12 +176,10 @@ func ViewPost(ctx *context_module.Context) {
172176 Link : run .RefLink (),
173177 }
174178 resp .State .Run .Commit = ViewCommit {
175- LocaleCommit : ctx .Locale .TrString ("actions.runs.commit" ),
176- LocalePushedBy : ctx .Locale .TrString ("actions.runs.pushed_by" ),
177- ShortSha : base .ShortSha (run .CommitSHA ),
178- Link : fmt .Sprintf ("%s/commit/%s" , run .Repo .Link (), run .CommitSHA ),
179- Pusher : pusher ,
180- Branch : branch ,
179+ ShortSha : base .ShortSha (run .CommitSHA ),
180+ Link : fmt .Sprintf ("%s/commit/%s" , run .Repo .Link (), run .CommitSHA ),
181+ Pusher : pusher ,
182+ Branch : branch ,
181183 }
182184
183185 var task * actions_model.ActionTask
0 commit comments