aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/swagger/repo.go
diff options
context:
space:
mode:
authorqwerty287 <80460567+qwerty287@users.noreply.github.com>2022-09-29 04:27:20 +0200
committerGitHub <noreply@github.com>2022-09-29 04:27:20 +0200
commit1dfa28ffa557720d164a351783be64c9a47a0adb (patch)
tree93c7cae9241eb71f8d377c8f089417ac7dcf448b /routers/api/v1/swagger/repo.go
parent78c15dabf33f32050757ab410266ddb348c1a863 (diff)
downloadgitea-1dfa28ffa557720d164a351783be64c9a47a0adb.tar.gz
gitea-1dfa28ffa557720d164a351783be64c9a47a0adb.zip
Add API endpoint to get changed files of a PR (#21177)
This adds an api endpoint `/files` to PRs that allows to get a list of changed files. built upon #18228, reviews there are included closes https://github.com/go-gitea/gitea/issues/654 Co-authored-by: Anton Bracke <anton@ju60.de> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers/api/v1/swagger/repo.go')
-rw-r--r--routers/api/v1/swagger/repo.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/routers/api/v1/swagger/repo.go b/routers/api/v1/swagger/repo.go
index 3522e24276..642b1b7b91 100644
--- a/routers/api/v1/swagger/repo.go
+++ b/routers/api/v1/swagger/repo.go
@@ -254,6 +254,28 @@ type swaggerCommitList struct {
Body []api.Commit `json:"body"`
}
+// ChangedFileList
+// swagger:response ChangedFileList
+type swaggerChangedFileList struct {
+ // The current page
+ Page int `json:"X-Page"`
+
+ // Commits per page
+ PerPage int `json:"X-PerPage"`
+
+ // Total commit count
+ Total int `json:"X-Total"`
+
+ // Total number of pages
+ PageCount int `json:"X-PageCount"`
+
+ // True if there is another page
+ HasMore bool `json:"X-HasMore"`
+
+ // in: body
+ Body []api.ChangedFile `json:"body"`
+}
+
// Note
// swagger:response Note
type swaggerNote struct {