diff options
author | Jason Song <i@wolfogre.com> | 2023-02-01 06:46:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-31 22:46:10 +0000 |
commit | b6145bfaa348cb90364837a0fa86421d26f93463 (patch) | |
tree | 7d8afb04597ab4e698f6d2937d5786a67f00b7b7 /routers/web/repo/actions/view.go | |
parent | 707ecec71514fbadb09bdbe915129a9badf0755c (diff) | |
download | gitea-b6145bfaa348cb90364837a0fa86421d26f93463.tar.gz gitea-b6145bfaa348cb90364837a0fa86421d26f93463.zip |
Use relative url in actions view (#22675)
Use relative url in actions view.
Diffstat (limited to 'routers/web/repo/actions/view.go')
-rw-r--r-- | routers/web/repo/actions/view.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/repo/actions/view.go b/routers/web/repo/actions/view.go index e83494f64a..5370310e8d 100644 --- a/routers/web/repo/actions/view.go +++ b/routers/web/repo/actions/view.go @@ -49,7 +49,7 @@ type ViewRequest struct { type ViewResponse struct { State struct { Run struct { - HTMLURL string `json:"htmlurl"` + Link string `json:"link"` Title string `json:"title"` CanCancel bool `json:"canCancel"` Done bool `json:"done"` @@ -105,7 +105,7 @@ func ViewPost(ctx *context_module.Context) { resp := &ViewResponse{} resp.State.Run.Title = run.Title - resp.State.Run.HTMLURL = run.HTMLURL() + resp.State.Run.Link = run.Link() resp.State.Run.CanCancel = !run.Status.IsDone() && ctx.Repo.CanWrite(unit.TypeActions) resp.State.Run.Done = run.Status.IsDone() resp.State.Run.Jobs = make([]*ViewJob, 0, len(jobs)) // marshal to '[]' instead fo 'null' in json |