Documentation ¶
Index ¶
- func FetchMasterConfigFile(ctx context.Context, g GithubAPI, r autobotcfg.RepoConfig) (*autobotcfg.AutobotPerRepoConfig, error)
- func PopulateRepoDefaultBranches(ctx context.Context, cfg *autobotcfg.AutobotConfig, g GithubAPI) (*autobotcfg.AutobotConfig, error)
- type AcceptPullRequestOutput
- type CreatePullRequest
- type DynamicAuthMethod
- type GithubAPI
- type GraphQLPRQuery
- type GraphQLPRQueryNode
- type MergePullRequestOutput
- type RepositoryInfo
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchMasterConfigFile ¶
func FetchMasterConfigFile(ctx context.Context, g GithubAPI, r autobotcfg.RepoConfig) (*autobotcfg.AutobotPerRepoConfig, error)
func PopulateRepoDefaultBranches ¶
func PopulateRepoDefaultBranches(ctx context.Context, cfg *autobotcfg.AutobotConfig, g GithubAPI) (*autobotcfg.AutobotConfig, error)
Types ¶
type AcceptPullRequestOutput ¶
type CreatePullRequest ¶
type DynamicAuthMethod ¶
type DynamicAuthMethod struct { Itr *ghinstallation.Transport Logger *zapctx.Logger }
func (*DynamicAuthMethod) Name ¶
func (d *DynamicAuthMethod) Name() string
func (*DynamicAuthMethod) SetAuth ¶
func (d *DynamicAuthMethod) SetAuth(r *http2.Request)
func (*DynamicAuthMethod) String ¶
func (d *DynamicAuthMethod) String() string
type GithubAPI ¶
type GithubAPI interface { RepositoryInfo(ctx context.Context, owner string, name string) (*RepositoryInfo, error) CreatePullRequest(ctx context.Context, owner string, name string, in githubv4.CreatePullRequestInput) (*CreatePullRequest, error) GoGetAuthMethod() http.AuthMethod GetContents(ctx context.Context, owner string, name string, file string) (string, error) Self(ctx context.Context) (*UserInfo, error) AcceptPullRequest(ctx context.Context, owner string, name string, in githubv4.AddPullRequestReviewInput) (*AcceptPullRequestOutput, error) MergePullRequest(ctx context.Context, owner string, name string, ref string, in githubv4.MergePullRequestInput) (*MergePullRequestOutput, error) EveryOpenPullRequest(ctx context.Context, owner string, name string) (*GraphQLPRQuery, error) DoesBranchExist(ctx context.Context, owner string, name string, ref string) (bool, error) }
type GraphQLPRQuery ¶
type GraphQLPRQuery struct { Repository struct { PullRequests struct { Nodes []GraphQLPRQueryNode } `graphql:"pullRequests(first: 100, states: [OPEN])"` } `graphql:"repository(owner: $owner, name: $name)"` }
type GraphQLPRQueryNode ¶
type GraphQLPRQueryNode struct { ID githubv4.ID Number githubv4.Int Locked githubv4.Boolean Merged githubv4.Boolean IsDraft githubv4.Boolean Mergeable githubv4.MergeableState State githubv4.PullRequestState Body githubv4.String UpdatedAt githubv4.DateTime ReviewDecision githubv4.PullRequestReviewDecision IsCrossRepository githubv4.Boolean BaseRef struct { Name githubv4.String } Repository struct { Owner struct { Login githubv4.String } Name githubv4.String } Author struct { Login githubv4.String Bot struct { ID githubv4.ID } `graphql:"... on Bot"` User struct { ID githubv4.ID } `graphql:"... on User"` } ViewerLatestReview struct { State githubv4.String Commit struct { Oid githubv4.GitObjectID } AuthorCanPushToRepository githubv4.Boolean } HeadRef struct { Target struct { Oid githubv4.GitObjectID Commit struct { StatusCheckRollup struct { State githubv4.StatusState } } `graphql:"... on Commit"` } } }
GraphQLPRQueryNode is our catch-all pull request data
type MergePullRequestOutput ¶
type RepositoryInfo ¶
Click to show internal directories.
Click to hide internal directories.