Documentation ¶
Index ¶
- func DownloadAndUnzipArtifact(url url.URL) [][]byte
- func FetchIssueWithCommentsByLabels(client ClientV4, owner, name string, labels []string, since githubv4.DateTime, ...) (*[]IssueWithComments, []error)
- func FetchLatestArtifactUrl(client *github.Client, owner, name string) *url.URL
- func InitGithubV4Client(tokens []string)
- func NewGithubClient(token string) *github.Client
- func RefreshGithubV4Client(tokens []string)
- type ClientV4
- type Comment
- type Issue
- type IssueConnection
- type IssueWithComments
- type PageInfo
- type Query
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadAndUnzipArtifact ¶
DownloadAndUnzipArtifact Download And Unzip Artifact by the url from FetchLatestArtifactUrl.
func FetchIssueWithCommentsByLabels ¶
func FetchIssueWithCommentsByLabels(client ClientV4, owner, name string, labels []string, since githubv4.DateTime, count ...int) (*[]IssueWithComments, []error)
FetchIssueWithCommentsByLabels fetch issue combined with comments If there are empty in labels ,you will not get anything.
func FetchLatestArtifactUrl ¶
FetchLatestArtifact fetch the latest artifact in the repo.
func InitGithubV4Client ¶
func InitGithubV4Client(tokens []string)
initGithubV4Client init the clients pool.
func NewGithubClient ¶
newGithubClient new clientv4 by github tokens.
func RefreshGithubV4Client ¶
func RefreshGithubV4Client(tokens []string)
RefreshGithubV4Client just init client pool again
Types ¶
type ClientV4 ¶
type ClientV4 struct {
// contains filtered or unexported fields
}
The Client used for client pool
func NewGithubV4Client ¶
func NewGithubV4Client() ClientV4
NewGithubV4Client return the first Client in the pool
type Comment ¶
type Comment struct { DatabaseId githubv4.Int Body string ViewerCanReact bool Author struct { Login string AvatarURL string `graphql:"avatarUrl(size: 72)"` } }
Comment define Comment fetched from github api v4
type Issue ¶
type Issue struct { DatabaseId githubv4.Int Number githubv4.Int Author struct { Login string AvatarURL string `graphql:"avatarUrl(size: 72)"` } Closed githubv4.Boolean ClosedAt githubv4.DateTime CreatedAt githubv4.DateTime Labels struct { Nodes []struct { Name githubv4.String } } `graphql:"labels(first: 100)"` Assignees struct { Nodes []struct { Login githubv4.String Email githubv4.String } } `graphql:"assignees(first: 100)"` Title githubv4.String Body githubv4.String TimelineItems struct { Nodes []struct { Typename string `graphql:"__typename"` CrossReferencedEvent struct { Actor struct { Login githubv4.String } CreatedAt githubv4.DateTime } `graphql:"... on CrossReferencedEvent"` AssignedEvent struct { Actor struct { Login githubv4.String } Assignee struct { User struct { Login githubv4.String Email githubv4.String } `graphql:"... on User"` } CreatedAt githubv4.DateTime } `graphql:"... on AssignedEvent"` UnassignedEvent struct { Actor struct { Login githubv4.String } Assignee struct { User struct { Login githubv4.String Email githubv4.String } `graphql:"... on User"` } CreatedAt githubv4.DateTime } `graphql:"... on UnassignedEvent"` } } `graphql:"timelineItems(first: 100)"` }
Issue define issue data fetched from github api v4
type IssueConnection ¶
type IssueConnection struct { Nodes []Issue PageInfo struct { EndCursor githubv4.String HasNextPage bool } }
IssueConnection define IssueConnection fetched from github api v4
type IssueWithComments ¶
IssueWithComments define
type Query ¶
func FetchAllQueries ¶
FetchAllQueries just travel all the query among pages. You must input a Query pointer just like it used in fetchIssuesByLabelsStates : FetchAllQueries(client,&query,variables), because query of client need a pointer query input.