* in will pull in the latest release, even if draft. It will not create the files `tag` and `version`, if no tag is defined on the draft release. * out will push a release in a draft state when provided as a param [#102513822] Signed-off-by: David Morhovich <dmorhovich@pivotal.io>
63 lines
1.4 KiB
Go
63 lines
1.4 KiB
Go
package resource
|
|
|
|
type Source struct {
|
|
User string `json:"user"`
|
|
Repository string `json:"repository"`
|
|
|
|
GitHubAPIURL string `json:"github_api_url"`
|
|
AccessToken string `json:"access_token"`
|
|
}
|
|
|
|
type CheckRequest struct {
|
|
Source Source `json:"source"`
|
|
Version Version `json:"version"`
|
|
}
|
|
|
|
type InRequest struct {
|
|
Source Source `json:"source"`
|
|
Version *Version `json:"version"`
|
|
Params InParams `json:"params"`
|
|
}
|
|
|
|
type InParams struct {
|
|
Globs []string `json:"globs"`
|
|
IncludeSourceTarball bool `json:"include_source_tarball"`
|
|
IncludeSourceZip bool `json:"include_source_zip"`
|
|
}
|
|
|
|
type InResponse struct {
|
|
Version Version `json:"version"`
|
|
Metadata []MetadataPair `json:"metadata"`
|
|
}
|
|
|
|
type OutRequest struct {
|
|
Source Source `json:"source"`
|
|
Params OutParams `json:"params"`
|
|
}
|
|
|
|
type OutParams struct {
|
|
NamePath string `json:"name"`
|
|
BodyPath string `json:"body"`
|
|
TagPath string `json:"tag"`
|
|
CommitishPath string `json:"commitish"`
|
|
Draft bool `json:"draft"`
|
|
|
|
Globs []string `json:"globs"`
|
|
}
|
|
|
|
type OutResponse struct {
|
|
Version Version `json:"version"`
|
|
Metadata []MetadataPair `json:"metadata"`
|
|
}
|
|
|
|
type Version struct {
|
|
Tag string `json:"tag"`
|
|
}
|
|
|
|
type MetadataPair struct {
|
|
Name string `json:"name"`
|
|
Value string `json:"value"`
|
|
URL string `json:"url"`
|
|
Markdown bool `json:"markdown"`
|
|
}
|