Fix ListWorkflowRuns OpenAPI response model. (#35026)

Change the OpenAPI response of `ListWorkflowRuns` to `WorkflowRunsList`
like it is supposed to be.

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Scion 2025-07-09 22:58:07 -07:00 committed by GitHub
parent ea809a5220
commit af0196c145
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View File

@ -57,7 +57,7 @@ type Repository struct {
Private bool `json:"private"` Private bool `json:"private"`
Fork bool `json:"fork"` Fork bool `json:"fork"`
Template bool `json:"template"` Template bool `json:"template"`
Parent *Repository `json:"parent"` Parent *Repository `json:"parent,omitempty"`
Mirror bool `json:"mirror"` Mirror bool `json:"mirror"`
Size int `json:"size"` Size int `json:"size"`
Language string `json:"language"` Language string `json:"language"`
@ -114,7 +114,7 @@ type Repository struct {
ObjectFormatName string `json:"object_format_name"` ObjectFormatName string `json:"object_format_name"`
// swagger:strfmt date-time // swagger:strfmt date-time
MirrorUpdated time.Time `json:"mirror_updated"` MirrorUpdated time.Time `json:"mirror_updated"`
RepoTransfer *RepoTransfer `json:"repo_transfer"` RepoTransfer *RepoTransfer `json:"repo_transfer,omitempty"`
Topics []string `json:"topics"` Topics []string `json:"topics"`
Licenses []string `json:"licenses"` Licenses []string `json:"licenses"`
} }

View File

@ -747,7 +747,7 @@ func (Action) ListWorkflowRuns(ctx *context.APIContext) {
// type: integer // type: integer
// responses: // responses:
// "200": // "200":
// "$ref": "#/responses/ArtifactsList" // "$ref": "#/responses/WorkflowRunsList"
// "400": // "400":
// "$ref": "#/responses/error" // "$ref": "#/responses/error"
// "404": // "404":

View File

@ -251,7 +251,7 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR
RepoTransfer: transfer, RepoTransfer: transfer,
Topics: util.SliceNilAsEmpty(repo.Topics), Topics: util.SliceNilAsEmpty(repo.Topics),
ObjectFormatName: repo.ObjectFormatName, ObjectFormatName: repo.ObjectFormatName,
Licenses: repoLicenses.StringList(), Licenses: util.SliceNilAsEmpty(repoLicenses.StringList()),
} }
} }

View File

@ -5165,7 +5165,7 @@
], ],
"responses": { "responses": {
"200": { "200": {
"$ref": "#/responses/ArtifactsList" "$ref": "#/responses/WorkflowRunsList"
}, },
"400": { "400": {
"$ref": "#/responses/error" "$ref": "#/responses/error"