aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/actions/view.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/actions/view.go')
-rw-r--r--routers/web/repo/actions/view.go14
1 files changed, 10 insertions, 4 deletions
diff --git a/routers/web/repo/actions/view.go b/routers/web/repo/actions/view.go
index e4ca6a7198..a9c2858303 100644
--- a/routers/web/repo/actions/view.go
+++ b/routers/web/repo/actions/view.go
@@ -486,8 +486,9 @@ type ArtifactsViewResponse struct {
}
type ArtifactsViewItem struct {
- Name string `json:"name"`
- Size int64 `json:"size"`
+ Name string `json:"name"`
+ Size int64 `json:"size"`
+ Status string `json:"status"`
}
func ArtifactsView(ctx *context_module.Context) {
@@ -510,9 +511,14 @@ func ArtifactsView(ctx *context_module.Context) {
Artifacts: make([]*ArtifactsViewItem, 0, len(artifacts)),
}
for _, art := range artifacts {
+ status := "completed"
+ if art.Status == int64(actions_model.ArtifactStatusExpired) {
+ status = "expired"
+ }
artifactsResponse.Artifacts = append(artifactsResponse.Artifacts, &ArtifactsViewItem{
- Name: art.ArtifactName,
- Size: art.FileSize,
+ Name: art.ArtifactName,
+ Size: art.FileSize,
+ Status: status,
})
}
ctx.JSON(http.StatusOK, artifactsResponse)