Documentation ¶
Index ¶
- type CheckSuite
- type GithubClient
- func (c *GithubClient) FetchCommits(owner string, repo string, token string, hashesToFetch []string) ([]*model.Commit, error)
- func (c *GithubClient) GetAppNameAndAppSettingsURLs(appToken string, ctx context.Context) (string, string, string, error)
- func (c *GithubClient) OrgRepos(installationToken string) ([]string, error)
- type GithubOrgTokenManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckSuite ¶
type CheckSuite struct {
CheckRuns checkRuns `graphql:"checkRuns (first: 100)"`
}
type GithubClient ¶
type GithubClient struct { }
func (*GithubClient) FetchCommits ¶
func (c *GithubClient) FetchCommits( owner string, repo string, token string, hashesToFetch []string, ) ([]*model.Commit, error)
FetchCommits fetches Github commits and their statuses
Getting multiple commits by hash
query { viewer { login } rateLimit { limit cost remaining resetAt } repository(owner: "laszlocph", name: "aedes") { a: object(oid: "25a913a5e052d3f5b9c4880377542f3ed8389d2b") { ... on Commit { oid message authoredDate status { state contexts { context createdAt state targetUrl } } } } b: object(oid: "3396bc4fae754b5f55de23f49f973ddca70295d7") { ... on Commit { oid message authoredDate status { state contexts { context createdAt state targetUrl } } checkSuites(first: 100){ nodes { checkRuns (first: 100) { nodes { permalink name status startedAt completedAt } } } } statusCheckRollup{ state contexts(first: 100) { nodes { __typename ... on CheckRun { name detailsUrl completedAt status } ... on StatusContext { context createdAt state targetUrl } } } } } } } }
func (*GithubClient) GetAppNameAndAppSettingsURLs ¶ added in v0.4.0
type GithubOrgTokenManager ¶
type GithubOrgTokenManager struct {
// contains filtered or unexported fields
}
GithubOrgTokenManager maintains a valid git org/non-impersonated token
func NewGithubOrgTokenManager ¶
func NewGithubOrgTokenManager(config *config.Config) (*GithubOrgTokenManager, error)
func (*GithubOrgTokenManager) AppToken ¶ added in v0.4.0
func (tm *GithubOrgTokenManager) AppToken() (string, error)
appToken returns a signed JWT apptoken for the Github app Use it to have unimpersonated access of Github resources
Click to show internal directories.
Click to hide internal directories.