Documentation ¶
Overview ¶
temporary until this is used by the cli nolint,used,deadcode
Index ¶
- Constants
- func GenerateMAC(message, key []byte, hashFunc func() hash.Hash) []byte
- type APIClient
- type AccessToken
- type Action
- type Actor
- type Commenter
- type CommitState
- type Event
- type GitClient
- type GithubEvent
- type GithubPullRequestStatusFetcher
- func (g *GithubPullRequestStatusFetcher) Fetch(ctx context.Context, event Event) (status models.PullRequestStatus, err error)
- func (g *GithubPullRequestStatusFetcher) PullIsApproved(ctx context.Context, event Event) (approvalStatus models.ApprovalStatus, err error)
- func (g *GithubPullRequestStatusFetcher) PullIsMergeable(ctx context.Context, event Event, vcsstatusname string) (bool, error)
- type InstallationProvider
- type PullRequest
- type PullRequestReviewDecision
- type Repository
- type VscClient
- type VscCommenter
- type VscPullRequestStatusFetcher
Constants ¶
View Source
const ( SHA1SignatureHeader = "X-Hub-Signature" SHA256SignatureHeader = "X-Hub-Signature-256" EventTypeHeader = "X-Github-Event" DeliveryIDHeader = "X-Github-Delivery" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { Host string // example: api.github.com Config *env.Config Client *http.Client }
func NewApiClient ¶
func (*APIClient) NewAccessToken ¶
func (a *APIClient) NewAccessToken(installationID int64) (AccessToken, error)
type AccessToken ¶
type Commenter ¶
type Commenter struct {
// contains filtered or unexported fields
}
func NewCommenter ¶
type CommitState ¶
type CommitState int
const ( PendingCommitState CommitState = iota SuccessCommitState FailedCommitState )
func (CommitState) String ¶
func (s CommitState) String() string
type Event ¶
type Event struct { Revision string Message string IsPullRequest bool Action Action Actor Actor Repository Repository PullRequest PullRequest InstallationProvider InstallationProvider GithubClient *github.Client }
func InitializeFromIssueComment ¶
func InitializeFromIssueComment(source github.IssueCommentEvent, revision string) (Event, *int64)
func InitializeFromPullRequest ¶
func InitializeFromPullRequest(source github.PullRequestEvent) Event
func (*Event) GetInstallation ¶
func (e *Event) GetInstallation() *github.Installation
func (*Event) HasMessage ¶
type GitClient ¶
type GitClient struct { Config env.Config Token AccessToken Command cmd.Command GitBinaryPath string Host string }
func NewGitClient ¶
func NewGitClient(config env.Config, token AccessToken) *GitClient
type GithubEvent ¶
type GithubEvent struct {
Action *string `json:"action,omitempty"`
}
type GithubPullRequestStatusFetcher ¶
type GithubPullRequestStatusFetcher struct {
// contains filtered or unexported fields
}
func (*GithubPullRequestStatusFetcher) Fetch ¶
func (g *GithubPullRequestStatusFetcher) Fetch(ctx context.Context, event Event) (status models.PullRequestStatus, err error)
func (*GithubPullRequestStatusFetcher) PullIsApproved ¶
func (g *GithubPullRequestStatusFetcher) PullIsApproved(ctx context.Context, event Event) (approvalStatus models.ApprovalStatus, err error)
func (*GithubPullRequestStatusFetcher) PullIsMergeable ¶
type InstallationProvider ¶
type InstallationProvider interface {
GetInstallation() *github.Installation
}
type PullRequest ¶
type PullRequest struct {
Number int
}
type PullRequestReviewDecision ¶
type PullRequestReviewDecision struct { Data struct { Repository struct { PullRequest struct { ReviewDecision string `json:"reviewDecision"` } `json:"pullRequest"` } `json:"repository"` } `json:"data"` }
func (*PullRequestReviewDecision) Approved ¶
func (p *PullRequestReviewDecision) Approved() bool
type Repository ¶
func (*Repository) HtmlUrl ¶
func (r *Repository) HtmlUrl() string
type VscClient ¶
type VscClient struct {
// contains filtered or unexported fields
}
func (*VscClient) GetPullReviewDecision ¶
type VscCommenter ¶
type VscPullRequestStatusFetcher ¶
type VscPullRequestStatusFetcher interface {
Fetch(ctx context.Context, event Event) (models.PullRequestStatus, error)
}
func NewPullRequestStatusFetcher ¶
func NewPullRequestStatusFetcher(logger logging.SimpleLogging, client *github.Client) VscPullRequestStatusFetcher
Click to show internal directories.
Click to hide internal directories.