Documentation
¶
Index ¶
- Constants
- type Git
- func (g *Git) CommitAndPush(ctx context.Context, gp GitProject, message string) (*GitProject, error)
- func (g *Git) CreateFile(ctx context.Context, gp GitProject, filename string, contents []byte) error
- func (g *Git) DeleteFile(ctx context.Context, gp GitProject, filename string) error
- func (g *Git) ForceClone(ctx context.Context, org, repo, branch string) (*GitProject, error)
- func (g *Git) HashLogs(ctx context.Context, gp GitProject, hash1, hash2 string) ([]string, error)
- func (g *Git) WithCredential(username, token string) error
- type GitHub
- func (g *GitHub) CommentToPullRequest(ctx context.Context, pr PullRequest, comment string) error
- func (g *GitHub) GetCommitHashes(ctx context.Context, prModel PullRequest) ([]string, error)
- func (g *GitHub) GetPullRequest(ctx context.Context, org, repo string, prNum int) (*PullRequest, error)
- func (g *GitHub) ListOpenPullRequests(ctx context.Context, org, repo string) ([]*PullRequest, error)
- func (g *GitHub) WithCredential(username, token string) error
- type GitHubIFace
- type GitIFace
- type GitProject
- type PullRequest
Constants ¶
View Source
const (
BaseDir = "/tmp"
)
View Source
const CandidateLabelName = "candidate-template"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
func (*Git) CommitAndPush ¶
func (g *Git) CommitAndPush(ctx context.Context, gp GitProject, message string) (*GitProject, error)
func (*Git) CreateFile ¶
func (*Git) DeleteFile ¶
func (*Git) ForceClone ¶
func (*Git) WithCredential ¶
type GitHub ¶
type GitHub struct {
// contains filtered or unexported fields
}
func (*GitHub) CommentToPullRequest ¶
func (*GitHub) GetCommitHashes ¶
func (*GitHub) GetPullRequest ¶ added in v0.0.3
func (*GitHub) ListOpenPullRequests ¶
func (g *GitHub) ListOpenPullRequests(ctx context.Context, org, repo string) ([]*PullRequest, error)
TODO: 検索条件を指定可能にする (例. label xxx が付与されている PR は対象外)
func (*GitHub) WithCredential ¶
type GitHubIFace ¶
type GitHubIFace interface {
WithCredential(username, token string) error
ListOpenPullRequests(ctx context.Context, org, repo string) ([]*PullRequest, error)
GetPullRequest(ctx context.Context, org, repo string, prNum int) (*PullRequest, error)
CommentToPullRequest(ctx context.Context, pr PullRequest, comment string) error
GetCommitHashes(ctx context.Context, pr PullRequest) ([]string, error)
}
type GitIFace ¶
type GitIFace interface {
WithCredential(username, token string) error
ForceClone(ctx context.Context, org, repo, branch string) (*GitProject, error)
CreateFile(ctx context.Context, gp GitProject, filename string, contents []byte) error
DeleteFile(ctx context.Context, gp GitProject, filename string) error
CommitAndPush(ctx context.Context, gp GitProject, message string) (*GitProject, error)
}
type GitProject ¶
Click to show internal directories.
Click to hide internal directories.