Documentation ¶
Index ¶
- Constants
- Variables
- func CreateStatus(ctx context.Context, client *github.Client, ...) (*github.RepoStatus, error)
- func DownloadFile(url string, w io.Writer) error
- func DownloadRepoArchive(ctx context.Context, client *github.Client, w io.Writer, ...) error
- func FindLatestReleaseTag(ctx context.Context, client *github.Client, owner, repo string) (string, error)
- func FindLatestReleaseTagIncudingPrerelease(ctx context.Context, client *github.Client, owner, repo string) (string, error)
- func FindStatus(ctx context.Context, client *github.Client, ...) (*github.RepoStatus, error)
- func GetClient(ctx context.Context) (*github.Client, error)
- func GetClientOrExit(ctx context.Context) *github.Client
- func GetClientWithOrWithoutToken(ctx context.Context) *github.Client
- func GetFilesForChangelogVersion(ctx context.Context, client *github.Client, owner, repo, ref, version string) ([]*github.RepositoryContent, error)
- func GetFilesFromGit(ctx context.Context, client *github.Client, owner, repo, ref, path string) ([]*github.RepositoryContent, error)
- func GetGithubToken() (string, error)
- func GetRawGitFile(ctx context.Context, client *github.Client, content *github.RepositoryContent, ...) ([]byte, error)
- func GetReleaseOrExit(ctx context.Context, client *github.Client, version *versionutils.Version, ...) *github.RepositoryRelease
- func MarkError(ctx context.Context, client *github.Client, ...) (*github.RepoStatus, error)
- func MarkFailure(ctx context.Context, client *github.Client, ...) (*github.RepoStatus, error)
- func MarkInitialPending(ctx context.Context, client *github.Client, ...) (*github.RepoStatus, error)
- func MarkSuccess(ctx context.Context, client *github.Client, ...) (*github.RepoStatus, error)
- func UploadReleaseAssetCli(spec *UploadReleaseAssetSpec)
- type PRSpec
- type ReleaseAssetSpec
- type RepoClient
- type UploadReleaseAssetSpec
Constants ¶
View Source
const ( GITHUB_TOKEN = "GITHUB_TOKEN" STATUS_SUCCESS = "success" STATUS_FAILURE = "failure" STATUS_ERROR = "error" STATUS_PENDING = "pending" COMMIT_FILE_STATUS_ADDED = "added" COMMIT_FILE_STATUS_MODIFIED = "modified" COMMIT_FILE_STATUS_DELETED = "deleted" CONTENT_TYPE_FILE = "file" CONTENT_TYPE_DIRECTORY = "dir" )
Variables ¶
View Source
var NoReleaseBeforeShaFound = errors.Errorf("no release found before sha")
Functions ¶
func CreateStatus ¶
func DownloadRepoArchive ¶
func DownloadRepoArchive(ctx context.Context, client *github.Client, w io.Writer, owner, repo, sha string) error
This function writes directly to a writer, so the user is required to close the writer manually
func FindLatestReleaseTag ¶
func FindStatus ¶
func GetFilesFromGit ¶
func GetGithubToken ¶
func GetRawGitFile ¶
func GetReleaseOrExit ¶
func GetReleaseOrExit(ctx context.Context, client *github.Client, version *versionutils.Version, spec *UploadReleaseAssetSpec) *github.RepositoryRelease
func MarkFailure ¶
func MarkInitialPending ¶
func MarkSuccess ¶
func UploadReleaseAssetCli ¶
func UploadReleaseAssetCli(spec *UploadReleaseAssetSpec)
Types ¶
type ReleaseAssetSpec ¶
type RepoClient ¶
type RepoClient interface { FindLatestReleaseTagIncudingPrerelease(ctx context.Context) (string, error) CompareCommits(ctx context.Context, base, sha string) (*github.CommitsComparison, error) DirectoryExists(ctx context.Context, sha, directory string) (bool, error) FileExists(ctx context.Context, sha, path string) (bool, error) CreateBranch(ctx context.Context, branchName string) (*github.Reference, error) CreatePR(ctx context.Context, branchName string, spec PRSpec) error GetShaForTag(ctx context.Context, tag string) (string, error) GetPR(ctx context.Context, num int) (*github.PullRequest, error) UpdateRelease(ctx context.Context, release *github.RepositoryRelease) (*github.RepositoryRelease, error) GetCommit(ctx context.Context, sha string) (*github.RepositoryCommit, error) FindStatus(ctx context.Context, statusLabel, sha string) (*github.RepoStatus, error) CreateStatus(ctx context.Context, sha string, status *github.RepoStatus) (*github.RepoStatus, error) CreateComment(ctx context.Context, pr int, comment *github.IssueComment) (*github.IssueComment, error) DeleteComment(ctx context.Context, commentId int64) error FindLatestTagIncludingPrereleaseBeforeSha(ctx context.Context, sha string) (string, error) }
func NewRepoClient ¶
func NewRepoClient(client *github.Client, owner, repo string) RepoClient
type UploadReleaseAssetSpec ¶
type UploadReleaseAssetSpec struct { Owner string Repo string Assets []ReleaseAssetSpec SkipAlreadyExists bool }
Click to show internal directories.
Click to hide internal directories.