Documentation ¶
Index ¶
- Constants
- type ChangelogGenerate
- type GitAdd
- type GitCommit
- type GitGetBranch
- type GitGetHEAD
- type GitGetRepo
- type GitHubAsset
- type GitHubBranchProtection
- type GitHubCreateRelease
- type GitHubDownloadAsset
- type GitHubEditRelease
- type GitHubGetLatestRelease
- type GitHubRelease
- type GitHubReleaseData
- type GitHubUploadAssets
- type GitPull
- type GitPush
- type GitPushTag
- type GitStatus
- type GitTag
- type GoBuild
- type GoList
- type GoVersion
- type SemVerRead
- type SemVerUpdate
- type Step
Constants ¶
const ( // GitHubURL is the BaseURL for GitHub. GitHubURL = "https://github.com" // GitHubAPIURL is the BaseURL for GitHub API. GitHubAPIURL = "https://api.github.com" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangelogGenerate ¶
type ChangelogGenerate struct { Mock Step WorkDir string GitHubToken string GitHubUser string GitHubProject string Tag string Result struct { Filename string Changelog string } }
ChangelogGenerate runs `github_changelog_generator` Ruby gem!
func (*ChangelogGenerate) Dry ¶
func (s *ChangelogGenerate) Dry(ctx context.Context) error
Dry is a dry run of the step
type GitAdd ¶
GitAdd runs `git add <files>` command.
type GitCommit ¶
GitCommit runs `git commit -m <message>` command.
type GitGetBranch ¶
GitGetBranch runs `git rev-parse --abbrev-ref HEAD` command.
func (*GitGetBranch) Dry ¶
func (s *GitGetBranch) Dry(ctx context.Context) error
Dry is a dry run of the step.
type GitGetHEAD ¶
GitGetHEAD runs `git rev-parse HEAD` command.
func (*GitGetHEAD) Dry ¶
func (s *GitGetHEAD) Dry(ctx context.Context) error
Dry is a dry run of the step.
type GitGetRepo ¶
type GitGetRepo struct { Mock Step WorkDir string Result struct { Owner string Name string Repo string } }
GitGetRepo runs `git remote -v` command.
func (*GitGetRepo) Dry ¶
func (s *GitGetRepo) Dry(ctx context.Context) error
Dry is a dry run of the step.
type GitHubAsset ¶
type GitHubAsset struct { ID int `json:"id"` Name string `json:"name"` Label string `json:"label"` State string `json:"state"` Size int `json:"size"` ContentType string `json:"content_type"` URL string `json:"url"` DownloadURL string `json:"browser_download_url"` }
GitHubAsset represents an asset for a GitHub release.
type GitHubBranchProtection ¶
type GitHubBranchProtection struct { Mock Step Client *http.Client Token string BaseURL string Repo string Branch string Enabled bool }
GitHubBranchProtection enables/disables branch protection for administrators. See https://developer.github.com/v3/repos/branches/#get-admin-enforcement-of-protected-branch See https://developer.github.com/v3/repos/branches/#add-admin-enforcement-of-protected-branch See https://developer.github.com/v3/repos/branches/#remove-admin-enforcement-of-protected-branch
func (*GitHubBranchProtection) Dry ¶
func (s *GitHubBranchProtection) Dry(ctx context.Context) error
Dry is a dry run of the step.
type GitHubCreateRelease ¶
type GitHubCreateRelease struct { Mock Step Client *http.Client Token string BaseURL string Repo string ReleaseData GitHubReleaseData Result struct { Release GitHubRelease } }
GitHubCreateRelease creates a new GitHub release. See https://developer.github.com/v3/repos/releases/#get-the-latest-release See https://developer.github.com/v3/repos/releases/#create-a-release See https://developer.github.com/v3/repos/releases/#delete-a-release
func (*GitHubCreateRelease) Dry ¶
func (s *GitHubCreateRelease) Dry(ctx context.Context) error
Dry is a dry run of the step.
type GitHubDownloadAsset ¶
type GitHubDownloadAsset struct { Mock Step Client *http.Client Token string BaseURL string Repo string Tag string AssetName string Filepath string Result struct { Size int64 } }
GitHubDownloadAsset downloads an asset file and writes to a local file.
func (*GitHubDownloadAsset) Dry ¶
func (s *GitHubDownloadAsset) Dry(ctx context.Context) error
Dry is a dry run of the step.
type GitHubEditRelease ¶
type GitHubEditRelease struct { Mock Step Client *http.Client Token string BaseURL string Repo string ReleaseID int ReleaseData GitHubReleaseData Result struct { Release GitHubRelease } }
GitHubEditRelease edits an existing GitHub release. See https://developer.github.com/v3/repos/releases/#get-a-single-release See https://developer.github.com/v3/repos/releases/#edit-a-release
func (*GitHubEditRelease) Dry ¶
func (s *GitHubEditRelease) Dry(ctx context.Context) error
Dry is a dry run of the step.
type GitHubGetLatestRelease ¶
type GitHubGetLatestRelease struct { Mock Step Client *http.Client Token string BaseURL string Repo string Result struct { LatestRelease GitHubRelease } }
GitHubGetLatestRelease gets the latest release. See https://developer.github.com/v3/repos/releases/#get-the-latest-release
func (*GitHubGetLatestRelease) Dry ¶
func (s *GitHubGetLatestRelease) Dry(ctx context.Context) error
Dry is a dry run of the step.
type GitHubRelease ¶
type GitHubRelease struct { ID int `json:"id"` Name string `json:"name"` TagName string `json:"tag_name"` Target string `json:"target_commitish"` Draft bool `json:"draft"` Prerelease bool `json:"prerelease"` Body string `json:"body"` URL string `json:"url"` HTMLURL string `json:"html_url"` AssetsURL string `json:"assets_url"` UploadURL string `json:"upload_url"` Assets []GitHubAsset `json:"assets"` }
GitHubRelease represents a GitHub release.
type GitHubReleaseData ¶
type GitHubReleaseData struct { Name string `json:"name"` TagName string `json:"tag_name"` Target string `json:"target_commitish"` Draft bool `json:"draft"` Prerelease bool `json:"prerelease"` Body string `json:"body"` }
GitHubReleaseData is used for creating or modifying a release.
type GitHubUploadAssets ¶
type GitHubUploadAssets struct { Mock Step Client *http.Client Token string BaseURL string Repo string ReleaseID int ReleaseUploadURL string AssetFiles []string Result struct { Assets []GitHubAsset } }
GitHubUploadAssets uploads assets (files) to GitHub for a release. See https://developer.github.com/v3/repos/releases/#list-assets-for-a-release See https://developer.github.com/v3/repos/releases/#upload-a-release-asset See https://developer.github.com/v3/repos/releases/#delete-a-release-asset
func (*GitHubUploadAssets) Dry ¶
func (s *GitHubUploadAssets) Dry(ctx context.Context) error
Dry is a dry run of the step
type GitPull ¶
GitPull runs `git pull` command.
type GitPush ¶
GitPush runs `git push` command.
type GitPushTag ¶
GitPushTag runs `git push origin <tag>` command.
func (*GitPushTag) Dry ¶
func (s *GitPushTag) Dry(ctx context.Context) error
Dry is a dry run of the step.
type GitStatus ¶
GitStatus runs `git status --porcelain` command.
type GitTag ¶
GitTag runs `git tag` or `git tag -a <tag> -m <message>` command.
type GoBuild ¶
type GoBuild struct { Mock Step WorkDir string LDFlags string MainFile string BinaryFile string Platforms []string Result struct { Binaries []string } }
GoBuild runs `go build ...` command.
type GoList ¶
GoList runs `go list ...` command.
type GoVersion ¶
GoVersion runs `go version` command.
type SemVerRead ¶
type SemVerRead struct { Mock Step WorkDir string Filename string Result struct { Filename string Version semver.SemVer } }
SemVerRead reads version from version file.
func (*SemVerRead) Dry ¶
func (s *SemVerRead) Dry(ctx context.Context) error
Dry is a dry run of the step.
type SemVerUpdate ¶
type SemVerUpdate struct { Mock Step WorkDir string Filename string Version string Result struct { Filename string } }
SemVerUpdate writes a version to version file.
func (*SemVerUpdate) Dry ¶
func (s *SemVerUpdate) Dry(ctx context.Context) error
Dry is a dry run of the step.