From aec8f4c57ab5117d2062c31c439631ea41e242dc Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Fri, 2 May 2025 13:53:08 +0000 Subject: [PATCH] fix: document that /repos/{owner}/{repo}/pulls may contain nulls (#7762) The null means a server side bug prevents the pull request from being retrieved. Closes https://codeberg.org/forgejo/forgejo/issues/6571 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7762 Reviewed-by: Michael Kriese Reviewed-by: Gusted Co-authored-by: Earl Warren Co-committed-by: Earl Warren --- routers/api/v1/repo/pull.go | 2 +- templates/swagger/v1_json.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go index 0a2ff03c7e..8456dcff59 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -47,7 +47,7 @@ import ( func ListPullRequests(ctx *context.APIContext) { // swagger:operation GET /repos/{owner}/{repo}/pulls repository repoListPullRequests // --- - // summary: List a repo's pull requests + // summary: List a repo's pull requests. If a pull request is selected but fails to be retrieved for any reason, it will be a null value in the list of results. // produces: // - application/json // parameters: diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index ff9f0f15b9..c2f8538c28 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -12767,7 +12767,7 @@ "tags": [ "repository" ], - "summary": "List a repo's pull requests", + "summary": "List a repo's pull requests. If a pull request is selected but fails to be retrieved for any reason, it will be a null value in the list of results.", "operationId": "repoListPullRequests", "parameters": [ {