Documentation ¶
Overview ¶
Package repo abstracts Git/GitHub
Index ¶
- Constants
- Variables
- func ExtractSignedUpdateGroup(s string) *updater.SignedUpdateGroup
- func NewGitHubClient(token string) *github.Client
- type GitHubPullRequestContent
- type GitHubRepo
- func (g *GitHubRepo) Branch() string
- func (g *GitHubRepo) ExistingUpdates(ctx context.Context, baseBranch string) (updater.ExistingUpdates, error)
- func (g *GitHubRepo) Fetch(ctx context.Context, branch string) error
- func (g *GitHubRepo) NewBranch(base, branch string) error
- func (g *GitHubRepo) Push(ctx context.Context, updates updater.UpdateGroup) error
- func (g *GitHubRepo) Root() string
- func (g *GitHubRepo) SetBranch(branch string) error
- type GitIdentity
- type GitRepo
- func (t *GitRepo) Branch() string
- func (t *GitRepo) ExistingUpdates(context.Context, string) (updater.ExistingUpdates, error)
- func (t *GitRepo) Fetch(ctx context.Context, branch string) error
- func (t *GitRepo) NewBranch(base, branch string) error
- func (t *GitRepo) Push(ctx context.Context, updates updater.UpdateGroup) error
- func (t *GitRepo) Root() string
- func (t *GitRepo) SetBranch(branch string) error
- type PullRequestContent
Constants ¶
View Source
const RemoteName = "origin"
Variables ¶
View Source
var DefaultGitIdentity = GitIdentity{
Name: "actions-update-go",
Email: "noreply@github.com",
}
Functions ¶
func ExtractSignedUpdateGroup ¶ added in v0.0.9
func ExtractSignedUpdateGroup(s string) *updater.SignedUpdateGroup
func NewGitHubClient ¶
Types ¶
type GitHubPullRequestContent ¶
type GitHubPullRequestContent struct {
// contains filtered or unexported fields
}
func NewGitHubPullRequestContent ¶
func NewGitHubPullRequestContent(gh *github.Client, key []byte) *GitHubPullRequestContent
func (*GitHubPullRequestContent) Generate ¶
func (d *GitHubPullRequestContent) Generate(ctx context.Context, updates updater.UpdateGroup) (title, body string, err error)
func (*GitHubPullRequestContent) ParseBody ¶
func (d *GitHubPullRequestContent) ParseBody(s string) *updater.UpdateGroup
type GitHubRepo ¶
type GitHubRepo struct {
// contains filtered or unexported fields
}
GitHubRepo wraps GitRepo to create a GitHub PR for the pushed branch.
func NewGitHubRepo ¶
func NewGitHubRepo(repo *GitRepo, hmacKey []byte, repoNameOwner, token string) (*GitHubRepo, error)
func (*GitHubRepo) Branch ¶
func (g *GitHubRepo) Branch() string
func (*GitHubRepo) ExistingUpdates ¶ added in v0.0.7
func (g *GitHubRepo) ExistingUpdates(ctx context.Context, baseBranch string) (updater.ExistingUpdates, error)
func (*GitHubRepo) NewBranch ¶
func (g *GitHubRepo) NewBranch(base, branch string) error
func (*GitHubRepo) Push ¶
func (g *GitHubRepo) Push(ctx context.Context, updates updater.UpdateGroup) error
Push follows the git push with opening a pull request
func (*GitHubRepo) Root ¶
func (g *GitHubRepo) Root() string
func (*GitHubRepo) SetBranch ¶
func (g *GitHubRepo) SetBranch(branch string) error
type GitIdentity ¶
GitIdentity performs commits.
type GitRepo ¶
type GitRepo struct { NoPush bool // contains filtered or unexported fields }
GitRepo is a Repo that synchronizes access to a single git working tree.
func NewGitRepo ¶
NewGitRepo creates GitRepo.
func (*GitRepo) ExistingUpdates ¶ added in v0.0.11
type PullRequestContent ¶
Click to show internal directories.
Click to hide internal directories.