1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-05 18:05:19 +02:00

fix: rename api.{List,}ActionRun to api.{List,}RepoActionRun (#8066)

This variable name conflict happened because both

https://codeberg.org/forgejo/forgejo/pulls/7699

and

https://codeberg.org/forgejo/forgejo/pulls/7508

introduced the same names in different places and were merged at the same time.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8066
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
Earl Warren 2025-06-04 07:09:06 +02:00 committed by Earl Warren
parent 4dd0514022
commit 2529923dea
6 changed files with 86 additions and 86 deletions

View file

@ -748,7 +748,7 @@ func ListActionRuns(ctx *context.APIContext) {
// type: string
// responses:
// "200":
// "$ref": "#/responses/ActionRunList"
// "$ref": "#/responses/RepoActionRunList"
// "400":
// "$ref": "#/responses/error"
// "403":
@ -779,12 +779,12 @@ func ListActionRuns(ctx *context.APIContext) {
return
}
res := new(api.ListActionRunResponse)
res := new(api.ListRepoActionRunResponse)
res.TotalCount = total
res.Entries = make([]*api.ActionRun, len(runs))
res.Entries = make([]*api.RepoActionRun, len(runs))
for i, r := range runs {
cr, err := convert.ToActionRun(ctx, r)
cr, err := convert.ToRepoActionRun(ctx, r)
if err != nil {
ctx.Error(http.StatusInternalServerError, "ToActionRun", err)
return
@ -821,7 +821,7 @@ func GetActionRun(ctx *context.APIContext) {
// required: true
// responses:
// "200":
// "$ref": "#/responses/ActionRun"
// "$ref": "#/responses/RepoActionRun"
// "400":
// "$ref": "#/responses/error"
// "403":
@ -844,9 +844,9 @@ func GetActionRun(ctx *context.APIContext) {
return
}
res, err := convert.ToActionRun(ctx, run)
res, err := convert.ToRepoActionRun(ctx, run)
if err != nil {
ctx.Error(http.StatusInternalServerError, "ToActionRun", err)
ctx.Error(http.StatusInternalServerError, "ToRepoActionRun", err)
return
}