diff options
author | Gusted <williamzijl7@hotmail.com> | 2022-07-30 10:09:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-30 16:09:04 +0800 |
commit | 692707f14519b677de4601e5f40469989f82eed6 (patch) | |
tree | c59906253034305e2b5be2c6e95bcd76e99a5e51 /templates/swagger | |
parent | 2b94b02f33d472c0ae76c398aebe527ba9490ada (diff) | |
download | gitea-692707f14519b677de4601e5f40469989f82eed6.tar.gz gitea-692707f14519b677de4601e5f40469989f82eed6.zip |
Add latest commit's SHA to content response (#20398)
* Add latest commit's SHA to content response
- When requesting the contents of a filepath, add the latest commit's
SHA to the requested file.
- Resolves #12840
* Add swagger
* Fix NPE
* Fix tests
* Hook into LastCommitCache
* Move AddLastCommitCache to a common nogogit and gogit file
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Prevent NPE
Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates/swagger')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index ff0b4c6468..c0dd50a7b9 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -13779,6 +13779,10 @@ "type": "string", "x-go-name": "HTMLURL" }, + "last_commit_sha": { + "type": "string", + "x-go-name": "LastCommitSHA" + }, "name": { "type": "string", "x-go-name": "Name" |