Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

release.go 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Copyright 2016 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package structs
  5. import (
  6. "time"
  7. )
  8. // Release represents a repository release
  9. type Release struct {
  10. ID int64 `json:"id"`
  11. TagName string `json:"tag_name"`
  12. Target string `json:"target_commitish"`
  13. Title string `json:"name"`
  14. Note string `json:"body"`
  15. URL string `json:"url"`
  16. HTMLURL string `json:"html_url"`
  17. TarURL string `json:"tarball_url"`
  18. ZipURL string `json:"zipball_url"`
  19. IsDraft bool `json:"draft"`
  20. IsPrerelease bool `json:"prerelease"`
  21. // swagger:strfmt date-time
  22. CreatedAt time.Time `json:"created_at"`
  23. // swagger:strfmt date-time
  24. PublishedAt time.Time `json:"published_at"`
  25. Publisher *User `json:"author"`
  26. Attachments []*Attachment `json:"assets"`
  27. }
  28. // CreateReleaseOption options when creating a release
  29. type CreateReleaseOption struct {
  30. // required: true
  31. TagName string `json:"tag_name" binding:"Required"`
  32. Target string `json:"target_commitish"`
  33. Title string `json:"name"`
  34. Note string `json:"body"`
  35. IsDraft bool `json:"draft"`
  36. IsPrerelease bool `json:"prerelease"`
  37. }
  38. // EditReleaseOption options when editing a release
  39. type EditReleaseOption struct {
  40. TagName string `json:"tag_name"`
  41. Target string `json:"target_commitish"`
  42. Title string `json:"name"`
  43. Note string `json:"body"`
  44. IsDraft *bool `json:"draft"`
  45. IsPrerelease *bool `json:"prerelease"`
  46. }