1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-03 09:07:19 +00:00

add Upload URL to release API (#26663)

- Resolves https://codeberg.org/forgejo/forgejo/issues/580
- Return a `upload_field` to any release API response, which points to
the API URL for uploading new assets.
- Adds unit test.
- Adds integration testing to verify URL is returned correctly and that
upload endpoint actually works

---------

Co-authored-by: Gusted <postmaster@gusted.xyz>
This commit is contained in:
Earl Warren
2023-08-24 12:36:10 +02:00
committed by GitHub
parent b21b63c61a
commit a9ce570298
6 changed files with 79 additions and 0 deletions

View File

@ -18,6 +18,7 @@ type Release struct {
HTMLURL string `json:"html_url"`
TarURL string `json:"tarball_url"`
ZipURL string `json:"zipball_url"`
UploadURL string `json:"upload_url"`
IsDraft bool `json:"draft"`
IsPrerelease bool `json:"prerelease"`
// swagger:strfmt date-time