Documentation ¶
Index ¶
- Variables
- func ConcurrentUpload(httpClient *http.Client, uploadURL string, numWorkers int, ...) error
- type AssetForUpload
- type Release
- func FetchLatestRelease(httpClient *http.Client, baseRepo ghrepo.Interface) (*Release, error)
- func FetchRelease(httpClient *http.Client, baseRepo ghrepo.Interface, tagName string) (*Release, error)
- func FindDraftRelease(httpClient *http.Client, baseRepo ghrepo.Interface, tagName string) (*Release, error)
- type ReleaseAsset
Constants ¶
This section is empty.
Variables ¶
View Source
var ReleaseFields = []string{
"url",
"apiUrl",
"uploadUrl",
"tarballUrl",
"zipballUrl",
"id",
"tagName",
"name",
"body",
"isDraft",
"isPrerelease",
"createdAt",
"publishedAt",
"targetCommitish",
"author",
"assets",
}
Functions ¶
func ConcurrentUpload ¶
Types ¶
type AssetForUpload ¶
type AssetForUpload struct { Name string Label string Size int64 MIMEType string Open func() (io.ReadCloser, error) ExistingURL string }
func AssetsFromArgs ¶
func AssetsFromArgs(args []string) (assets []*AssetForUpload, err error)
type Release ¶
type Release struct { ID string `json:"node_id"` TagName string `json:"tag_name"` Name string `json:"name"` Body string `json:"body"` IsDraft bool `json:"draft"` IsPrerelease bool `json:"prerelease"` CreatedAt time.Time `json:"created_at"` PublishedAt *time.Time `json:"published_at"` TargetCommitish string `json:"target_commitish"` APIURL string `json:"url"` UploadURL string `json:"upload_url"` TarballURL string `json:"tarball_url"` ZipballURL string `json:"zipball_url"` URL string `json:"html_url"` Assets []ReleaseAsset Author struct { ID string `json:"node_id"` Login string `json:"login"` } }
func FetchLatestRelease ¶
FetchLatestRelease finds the latest published release for a repository.
func FetchRelease ¶
func FetchRelease(httpClient *http.Client, baseRepo ghrepo.Interface, tagName string) (*Release, error)
FetchRelease finds a repository release by its tagName.
func FindDraftRelease ¶
func FindDraftRelease(httpClient *http.Client, baseRepo ghrepo.Interface, tagName string) (*Release, error)
FindDraftRelease returns the latest draft release that matches tagName.
func (*Release) ExportData ¶
type ReleaseAsset ¶
type ReleaseAsset struct { ID string `json:"node_id"` Name string Label string Size int64 State string APIURL string `json:"url"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DownloadCount int `json:"download_count"` ContentType string `json:"content_type"` BrowserDownloadURL string `json:"browser_download_url"` }
Click to show internal directories.
Click to hide internal directories.