0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-09-30 00:14:21 -04:00

Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418)

This commit is contained in:
Lunny Xiao
2025-09-06 09:52:41 -07:00
committed by GitHub
parent b8f1c9f048
commit c290682521
51 changed files with 1928 additions and 656 deletions

View File

@@ -9,44 +9,70 @@ import (
// Release represents a repository release
type Release struct {
ID int64 `json:"id"`
TagName string `json:"tag_name"`
Target string `json:"target_commitish"`
Title string `json:"name"`
Note string `json:"body"`
URL string `json:"url"`
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"`
// The unique identifier of the release
ID int64 `json:"id"`
// The name of the git tag associated with the release
TagName string `json:"tag_name"`
// The target commitish for the release
Target string `json:"target_commitish"`
// The display title of the release
Title string `json:"name"`
// The release notes or description
Note string `json:"body"`
// The API URL of the release
URL string `json:"url"`
// The HTML URL to view the release
HTMLURL string `json:"html_url"`
// The URL to download the tarball archive
TarURL string `json:"tarball_url"`
// The URL to download the zip archive
ZipURL string `json:"zipball_url"`
// The URL template for uploading release assets
UploadURL string `json:"upload_url"`
// Whether the release is a draft
IsDraft bool `json:"draft"`
// Whether the release is a prerelease
IsPrerelease bool `json:"prerelease"`
// swagger:strfmt date-time
CreatedAt time.Time `json:"created_at"`
// swagger:strfmt date-time
PublishedAt time.Time `json:"published_at"`
Publisher *User `json:"author"`
PublishedAt time.Time `json:"published_at"`
// The user who published the release
Publisher *User `json:"author"`
// The files attached to the release
Attachments []*Attachment `json:"assets"`
}
// CreateReleaseOption options when creating a release
type CreateReleaseOption struct {
// required: true
TagName string `json:"tag_name" binding:"Required"`
TagMessage string `json:"tag_message"`
Target string `json:"target_commitish"`
Title string `json:"name"`
Note string `json:"body"`
IsDraft bool `json:"draft"`
IsPrerelease bool `json:"prerelease"`
TagName string `json:"tag_name" binding:"Required"`
// The message for the git tag
TagMessage string `json:"tag_message"`
// The target commitish for the release
Target string `json:"target_commitish"`
// The display title of the release
Title string `json:"name"`
// The release notes or description
Note string `json:"body"`
// Whether to create the release as a draft
IsDraft bool `json:"draft"`
// Whether to mark the release as a prerelease
IsPrerelease bool `json:"prerelease"`
}
// EditReleaseOption options when editing a release
type EditReleaseOption struct {
TagName string `json:"tag_name"`
Target string `json:"target_commitish"`
Title string `json:"name"`
Note string `json:"body"`
IsDraft *bool `json:"draft"`
IsPrerelease *bool `json:"prerelease"`
// The new name of the git tag
TagName string `json:"tag_name"`
// The new target commitish for the release
Target string `json:"target_commitish"`
// The new display title of the release
Title string `json:"name"`
// The new release notes or description
Note string `json:"body"`
// Whether to change the draft status
IsDraft *bool `json:"draft"`
// Whether to change the prerelease status
IsPrerelease *bool `json:"prerelease"`
}