File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ type ViewResponse struct {
5151 Run struct {
5252 Link string `json:"link"`
5353 Title string `json:"title"`
54+ Status string `json:"status"`
5455 CanCancel bool `json:"canCancel"`
5556 CanApprove bool `json:"canApprove"` // the run needs an approval and the doer has permission to approve
5657 Done bool `json:"done"`
@@ -111,6 +112,7 @@ func ViewPost(ctx *context_module.Context) {
111112 resp .State .Run .CanApprove = run .NeedApproval && ctx .Repo .CanWrite (unit .TypeActions )
112113 resp .State .Run .Done = run .Status .IsDone ()
113114 resp .State .Run .Jobs = make ([]* ViewJob , 0 , len (jobs )) // marshal to '[]' instead fo 'null' in json
115+ resp .State .Run .Status = run .Status .String ()
114116 for _ , v := range jobs {
115117 resp .State .Run .Jobs = append (resp .State .Run .Jobs , & ViewJob {
116118 ID : v .ID ,
Original file line number Diff line number Diff line change 22 <div class =" action-view-container" >
33 <div class =" action-view-header" >
44 <div class =" action-info-summary" >
5- {{ run.title }}
5+ <SvgIcon name =" octicon-check-circle-fill" size =" 20" class =" green" v-if =" run.status === 'success'" />
6+ <SvgIcon name =" octicon-clock" size =" 20" class =" ui text yellow" v-else-if =" run.status === 'waiting'" />
7+ <SvgIcon name =" octicon-meter" size =" 20" class =" ui text yellow" class-name =" job-status-rotate" v-else-if =" run.status === 'running'" />
8+ <SvgIcon name =" octicon-x-circle-fill" size =" 20" class =" red" v-else />
9+ <div class =" action-title" >
10+ {{ run.title }}
11+ </div >
612 <button class =" run_approve" @click =" approveRun()" v-if =" run.canApprove" >
713 <i class =" play circle outline icon" />
814 </button >
@@ -99,6 +105,7 @@ const sfc = {
99105 run: {
100106 link: ' ' ,
101107 title: ' ' ,
108+ status: ' ' ,
102109 canCancel: false ,
103110 canApprove: false ,
104111 done: false ,
@@ -327,7 +334,11 @@ export function initRepositoryActionView() {
327334.action - info- summary {
328335 font- size: 150 % ;
329336 height: 20px ;
330- padding: 0 10px ;
337+ display: flex;
338+
339+ .action - title {
340+ padding: 0 5px ;
341+ }
331342}
332343
333344// ================
You can’t perform that action at this time.
0 commit comments