1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 02:38:35 +00:00

Add API to get file commit history (#17652)

Adds an API endpoint `api/v1/repos/{owner}/{repo}/git/history/{filepath}` to get the commits affecting the given file or directory.

Closes https://github.com/go-gitea/gitea/issues/16206 and closes https://github.com/go-gitea/gitea/issues/16703
This commit is contained in:
qwerty287
2021-12-22 07:17:33 +01:00
committed by GitHub
parent d155ffc610
commit a9ed1c5c7c
3 changed files with 81 additions and 26 deletions

View File

@@ -2950,6 +2950,12 @@
"name": "sha",
"in": "query"
},
{
"type": "string",
"description": "filepath of a file/dir",
"name": "path",
"in": "query"
},
{
"type": "integer",
"description": "page number of results to return (1-based)",
@@ -2958,7 +2964,7 @@
},
{
"type": "integer",
"description": "page size of results",
"description": "page size of results (ignored if used with 'path')",
"name": "limit",
"in": "query"
}