tasks

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectChildrenOnCommits

func CollectChildrenOnCommits(owner string, repositoryName string, repositoryId int)

func CollectChildrenOnPullRequests

func CollectChildrenOnPullRequests(owner string, repositoryName string, repositoryId int)

func CollectCommit

func CollectCommit(owner string, repositoryName string, repositoryId int, commit *models.GithubCommit) error

func CollectCommits

func CollectCommits(owner string, repositoryName string, repositoryId int) error

func CollectIssues

func CollectIssues(owner string, repositoryName string, repositoryId int) error

func CollectPullRequest

func CollectPullRequest(owner string, repositoryName string, repositoryId int, pr *models.GithubPullRequest) error

func CollectPullRequestComments

func CollectPullRequestComments(owner string, repositoryName string, pull *models.GithubPullRequest) error

func CollectPullRequestCommits

func CollectPullRequestCommits(owner string, repositoryName string, pull *models.GithubPullRequest) error

func CollectPullRequestReviews

func CollectPullRequestReviews(owner string, repositoryName string, repositoryId int, pull *models.GithubPullRequest) error

func CollectRepository

func CollectRepository(owner string, repositoryName string) (int, error)

Types

type ApiCommitsResponse

type ApiCommitsResponse []CommitsResponse

type ApiIssuesResponse

type ApiIssuesResponse []IssuesResponse

type ApiPullRequestCommentResponse

type ApiPullRequestCommentResponse []Comment

type ApiPullRequestCommitResponse

type ApiPullRequestCommitResponse []PrCommitsResponse

type ApiPullRequestReviewResponse

type ApiPullRequestReviewResponse []PullRequestReview

type ApiRepositoryResponse

type ApiRepositoryResponse struct {
	Name     string `json:"name"`
	GithubId int    `json:"id"`
	HTMLUrl  string `json:"html_url"`
}

type ApiSingleCommitResponse

type ApiSingleCommitResponse struct {
	Stats struct {
		Additions int
		Deletions int
	}
}

type ApiSinglePullResponse

type ApiSinglePullResponse struct {
	Additions      int
	Deletions      int
	Comments       int
	Commits        int
	ReviewComments int `json:"review_comments"`
	Merged         bool
}

type Comment

type Comment struct {
	GithubId int `json:"id"`
	Body     string
	User     struct {
		Login string
	}
}

type Commit

type Commit struct {
	Author struct {
		Name  string
		Email string
		Date  string
	}
	Committer struct {
		Name  string
		Email string
		Date  string
	}
	Message string
}

type CommitsResponse

type CommitsResponse struct {
	Sha    string `json:"sha"`
	Commit Commit
	Url    string
}

type GithubApiClient

type GithubApiClient struct {
	core.ApiClient
}

func CreateApiClient

func CreateApiClient() *GithubApiClient

func (*GithubApiClient) FetchWithPagination

func (githubApiClient *GithubApiClient) FetchWithPagination(resourceUri string, pageSize int, handler GithubPaginationHandler) error

fetch paginated without ANTS worker pool

func (*GithubApiClient) FetchWithPaginationAnts

func (githubApiClient *GithubApiClient) FetchWithPaginationAnts(resourceUri string, pageSize int, handler GithubPaginationHandler) error

run all requests in an Ants worker pool

type GithubPaginationHandler

type GithubPaginationHandler func(res *http.Response) error

type IssuesResponse

type IssuesResponse struct {
	GithubId    int `json:"id"`
	Number      int
	State       string
	Title       string
	Body        string
	PullRequest struct {
		Url     string `json:"url"`
		HtmlUrl string `json:"html_url"`
	} `json:"pull_request"`
	ClosedAt        string `json:"closed_at"`
	GithubCreatedAt string `json:"created_at"`
	GithubUpdatedAt string `json:"updated_at"`
}

type PrCommit

type PrCommit struct {
	Author struct {
		Name  string
		Email string
		Date  string
	}
	Committer struct {
		Name  string
		Email string
		Date  string
	}
	Message string
}

type PrCommitsResponse

type PrCommitsResponse struct {
	Sha    string `json:"sha"`
	Commit PrCommit
	Url    string
}

type Pull

type Pull struct {
	GithubId        int `json:"id"`
	State           string
	Title           string
	Number          int
	CommentsUrl     string `json:"comments_url"`
	CommitsUrl      string `json:"commits_url"`
	HTMLUrl         string `json:"html_url"`
	MergedAt        string `json:"merged_at"`
	GithubCreatedAt string `json:"created_at"`
	ClosedAt        string `json:"closed_at"`
}

type PullRequestReview

type PullRequestReview struct {
	GithubId int `json:"id"`
	User     struct {
		Id    int
		Login string
	}
	Body        string
	State       string
	SubmittedAt string `json:"submitted_at"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL