tasks

package
v0.12.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: Apache-2.0 Imports: 24 Imported by: 4

Documentation

Index

Constants

View Source
const RAW_ACCOUNT_ORG_TABLE = "github_api_account_orgs"
View Source
const RAW_ACCOUNT_TABLE = "github_api_accounts"
View Source
const RAW_COMMENTS_TABLE = "github_api_comments"
View Source
const RAW_COMMIT_STATS_TABLE = "github_api_commit_stats"
View Source
const RAW_COMMIT_TABLE = "github_api_commits"
View Source
const RAW_EVENTS_TABLE = "github_api_events"
View Source
const RAW_ISSUE_TABLE = "github_api_issues"
View Source
const RAW_MILESTONE_TABLE = "github_milestones"
View Source
const RAW_PR_COMMIT_TABLE = "github_api_pull_request_commits"
View Source
const RAW_PR_REVIEW_COMMENTS_TABLE = "github_api_pull_request_review_comments"
View Source
const RAW_PR_REVIEW_TABLE = "github_api_pull_request_reviews"
View Source
const RAW_PULL_REQUEST_TABLE = "github_api_pull_requests"
View Source
const RAW_REPOSITORIES_TABLE = "github_api_repositories"

Variables

View Source
var CollectAccountMeta = core.SubTaskMeta{
	Name:             "collectAccount",
	EntryPoint:       CollectAccount,
	EnabledByDefault: true,
	Description:      "Collect accounts data from Github api",
	DomainTypes:      []string{core.DOMAIN_TYPE_CROSS},
}
View Source
var CollectAccountOrgMeta = core.SubTaskMeta{
	Name:             "collectAccountOrg",
	EntryPoint:       CollectAccountOrg,
	EnabledByDefault: true,
	Description:      "Collect accounts org data from Github api",
	DomainTypes:      []string{core.DOMAIN_TYPE_CROSS},
}
View Source
var CollectApiCommentsMeta = core.SubTaskMeta{
	Name:             "collectApiComments",
	EntryPoint:       CollectApiComments,
	EnabledByDefault: true,
	Description:      "Collect comments data from Github api",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE_REVIEW, core.DOMAIN_TYPE_TICKET},
}
View Source
var CollectApiCommitStatsMeta = core.SubTaskMeta{
	Name:             "collectApiCommitStats",
	EntryPoint:       CollectApiCommitStats,
	EnabledByDefault: false,
	Description:      "Collect commitStats data from Github api",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE},
}
View Source
var CollectApiCommitsMeta = core.SubTaskMeta{
	Name:             "collectApiCommits",
	EntryPoint:       CollectApiCommits,
	EnabledByDefault: false,
	Description:      "Collect commits data from Github api",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE},
}
View Source
var CollectApiEventsMeta = core.SubTaskMeta{
	Name:             "collectApiEvents",
	EntryPoint:       CollectApiEvents,
	EnabledByDefault: true,
	Description:      "Collect Events data from Github api",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var CollectApiIssuesMeta = core.SubTaskMeta{
	Name:             "collectApiIssues",
	EntryPoint:       CollectApiIssues,
	EnabledByDefault: true,
	Description:      "Collect issues data from Github api",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var CollectApiPrReviewCommentsMeta = core.SubTaskMeta{
	Name:             "CollectApiPrReviewCommentsMeta",
	EntryPoint:       CollectPrReviewComments,
	EnabledByDefault: true,
	Description:      "Collect pr review comments data from Github api",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE},
}
View Source
var CollectApiPullRequestCommitsMeta = core.SubTaskMeta{
	Name:             "collectApiPullRequestCommits",
	EntryPoint:       CollectApiPullRequestCommits,
	EnabledByDefault: true,
	Description:      "Collect PullRequestCommits data from Github api",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE_REVIEW},
}
View Source
var CollectApiPullRequestReviewsMeta = core.SubTaskMeta{
	Name:             "collectApiPullRequestReviews",
	EntryPoint:       CollectApiPullRequestReviews,
	EnabledByDefault: true,
	Description:      "Collect PullRequestReviews data from Github api",
	DomainTypes:      []string{core.DOMAIN_TYPE_CROSS, core.DOMAIN_TYPE_CODE_REVIEW},
}
View Source
var CollectApiPullRequestsMeta = core.SubTaskMeta{
	Name:             "collectApiPullRequests",
	EntryPoint:       CollectApiPullRequests,
	EnabledByDefault: true,
	Description:      "Collect PullRequests data from Github api",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE_REVIEW},
}
View Source
var CollectApiRepoMeta = core.SubTaskMeta{
	Name:        "collectApiRepo",
	EntryPoint:  CollectApiRepositories,
	Required:    true,
	Description: "Collect repositories data from Github api",
	DomainTypes: []string{core.DOMAIN_TYPE_CODE},
}
View Source
var CollectMilestonesMeta = core.SubTaskMeta{
	Name:             "collectApiMilestones",
	EntryPoint:       CollectApiMilestones,
	EnabledByDefault: true,
	Description:      "Collect milestone data from Github api",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ConvertAccountsMeta = core.SubTaskMeta{
	Name:             "convertAccounts",
	EntryPoint:       ConvertAccounts,
	EnabledByDefault: true,
	Description:      "Convert tool layer table github_accounts into  domain layer table accounts",
	DomainTypes:      []string{core.DOMAIN_TYPE_CROSS},
}
View Source
var ConvertCommitsMeta = core.SubTaskMeta{
	Name:             "convertCommits",
	EntryPoint:       ConvertCommits,
	EnabledByDefault: false,
	Description:      "Convert tool layer table github_commits into  domain layer table commits",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE},
}
View Source
var ConvertIssueCommentsMeta = core.SubTaskMeta{
	Name:             "convertIssueComments",
	EntryPoint:       ConvertIssueComments,
	EnabledByDefault: true,
	Description:      "ConvertIssueComments data from Github api",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ConvertIssueLabelsMeta = core.SubTaskMeta{
	Name:             "convertIssueLabels",
	EntryPoint:       ConvertIssueLabels,
	EnabledByDefault: true,
	Description:      "Convert tool layer table github_issue_labels into  domain layer table issue_labels",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ConvertIssuesMeta = core.SubTaskMeta{
	Name:             "convertIssues",
	EntryPoint:       ConvertIssues,
	EnabledByDefault: true,
	Description:      "Convert tool layer table github_issues into  domain layer table issues",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ConvertMilestonesMeta = core.SubTaskMeta{
	Name:             "convertMilestones",
	EntryPoint:       ConvertMilestones,
	EnabledByDefault: true,
	Description:      "Convert tool layer table github_milestones into  domain layer table milestones",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ConvertPullRequestCommentsMeta = core.SubTaskMeta{
	Name:             "convertPullRequestComments",
	EntryPoint:       ConvertPullRequestComments,
	EnabledByDefault: true,
	Description:      "ConvertPullRequestComments data from Github api",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE_REVIEW},
}
View Source
var ConvertPullRequestCommitsMeta = core.SubTaskMeta{
	Name:             "convertPullRequestCommits",
	EntryPoint:       ConvertPullRequestCommits,
	EnabledByDefault: true,
	Description:      "Convert tool layer table github_pull_request_commits into  domain layer table pull_request_commits",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE_REVIEW},
}
View Source
var ConvertPullRequestIssuesMeta = core.SubTaskMeta{
	Name:             "convertPullRequestIssues",
	EntryPoint:       ConvertPullRequestIssues,
	EnabledByDefault: true,
	Description:      "Convert tool layer table github_pull_request_issues into  domain layer table pull_request_issues",
	DomainTypes:      []string{core.DOMAIN_TYPE_CROSS},
}
View Source
var ConvertPullRequestLabelsMeta = core.SubTaskMeta{
	Name:             "convertPullRequestLabels",
	EntryPoint:       ConvertPullRequestLabels,
	EnabledByDefault: true,
	Description:      "Convert tool layer table github_pull_request_labels into  domain layer table pull_request_labels",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE_REVIEW},
}
View Source
var ConvertPullRequestReviewsMeta = core.SubTaskMeta{
	Name:             "convertPullRequestReviews",
	EntryPoint:       ConvertPullRequestReviews,
	EnabledByDefault: true,
	Description:      "ConvertPullRequestReviews data from Github api",
	DomainTypes:      []string{core.DOMAIN_TYPE_CROSS, core.DOMAIN_TYPE_CODE_REVIEW},
}
View Source
var ConvertPullRequestsMeta = core.SubTaskMeta{
	Name:             "convertPullRequests",
	EntryPoint:       ConvertPullRequests,
	EnabledByDefault: true,
	Description:      "ConvertPullRequests data from Github api",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE_REVIEW},
}
View Source
var ConvertRepoMeta = core.SubTaskMeta{
	Name:             "convertRepo",
	EntryPoint:       ConvertRepo,
	EnabledByDefault: true,
	Description:      "Convert tool layer table github_repos into  domain layer table repos and boards",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE},
}
View Source
var EnrichPullRequestIssuesMeta = core.SubTaskMeta{
	Name:             "enrichPullRequestIssues",
	EntryPoint:       EnrichPullRequestIssues,
	EnabledByDefault: true,
	Description:      "Create tool layer table github_pull_request_issues from github_pull_reqeusts",
	DomainTypes:      []string{core.DOMAIN_TYPE_CROSS},
}
View Source
var ExtractAccountMeta = core.SubTaskMeta{
	Name:             "ExtractAccounts",
	EntryPoint:       ExtractAccounts,
	EnabledByDefault: true,
	Description:      "Extract raw account data  into tool layer table github_accounts",
	DomainTypes:      []string{core.DOMAIN_TYPE_CROSS},
}
View Source
var ExtractAccountOrgMeta = core.SubTaskMeta{
	Name:             "ExtractAccountOrg",
	EntryPoint:       ExtractAccountOrg,
	EnabledByDefault: true,
	Description:      "Extract raw account org data into tool layer table github_account_orgs",
	DomainTypes:      []string{core.DOMAIN_TYPE_CROSS},
}
View Source
var ExtractApiCommentsMeta = core.SubTaskMeta{
	Name:             "extractApiComments",
	EntryPoint:       ExtractApiComments,
	EnabledByDefault: true,
	Description: "Extract raw comment data  into tool layer table github_pull_request_comments" +
		"and github_issue_comments",
	DomainTypes: []string{core.DOMAIN_TYPE_CODE_REVIEW, core.DOMAIN_TYPE_TICKET},
}
View Source
var ExtractApiCommitStatsMeta = core.SubTaskMeta{
	Name:             "extractApiCommitStats",
	EntryPoint:       ExtractApiCommitStats,
	EnabledByDefault: false,
	Description:      "Extract raw commit stats data into tool layer table github_commit_stats",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE},
}
View Source
var ExtractApiCommitsMeta = core.SubTaskMeta{
	Name:             "extractApiCommits",
	EntryPoint:       ExtractApiCommits,
	EnabledByDefault: false,
	Description:      "Extract raw commit data into tool layer table github_commits",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE},
}
View Source
var ExtractApiEventsMeta = core.SubTaskMeta{
	Name:             "extractApiEvents",
	EntryPoint:       ExtractApiEvents,
	EnabledByDefault: true,
	Description:      "Extract raw Events data into tool layer table github_issue_events",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ExtractApiIssuesMeta = core.SubTaskMeta{
	Name:             "extractApiIssues",
	EntryPoint:       ExtractApiIssues,
	EnabledByDefault: true,
	Description:      "Extract raw Issues data into tool layer table github_issues",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ExtractApiPrReviewCommentsMeta = core.SubTaskMeta{
	Name:             "extractApiPrReviewComments",
	EntryPoint:       ExtractApiPrReviewComments,
	EnabledByDefault: true,
	Description: "Extract raw comment data  into tool layer table github_pull_request_comments" +
		"and github_issue_comments",
	DomainTypes: []string{core.DOMAIN_TYPE_CODE},
}
View Source
var ExtractApiPullRequestCommitsMeta = core.SubTaskMeta{
	Name:             "extractApiPullRequestCommits",
	EntryPoint:       ExtractApiPullRequestCommits,
	EnabledByDefault: true,
	Description:      "Extract raw PullRequestCommits data into tool layer table github_commits",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE_REVIEW},
}
View Source
var ExtractApiPullRequestReviewsMeta = core.SubTaskMeta{
	Name:             "extractApiPullRequestReviews",
	EntryPoint:       ExtractApiPullRequestReviews,
	EnabledByDefault: true,
	Description:      "Extract raw PullRequestReviewers data into tool layer table github_reviewers",
	DomainTypes:      []string{core.DOMAIN_TYPE_CROSS, core.DOMAIN_TYPE_CODE_REVIEW},
}
View Source
var ExtractApiPullRequestsMeta = core.SubTaskMeta{
	Name:             "extractApiPullRequests",
	EntryPoint:       ExtractApiPullRequests,
	EnabledByDefault: true,
	Description:      "Extract raw PullRequests data into tool layer table github_pull_requests",
	DomainTypes:      []string{core.DOMAIN_TYPE_CODE_REVIEW},
}
View Source
var ExtractApiRepoMeta = core.SubTaskMeta{
	Name:        "extractApiRepo",
	EntryPoint:  ExtractApiRepositories,
	Required:    true,
	Description: "Extract raw Repositories data into tool layer table github_repos",
	DomainTypes: []string{core.DOMAIN_TYPE_CODE},
}
View Source
var ExtractMilestonesMeta = core.SubTaskMeta{
	Name:             "extractMilestones",
	EntryPoint:       ExtractMilestones,
	EnabledByDefault: true,
	Description:      "Extract raw milestone data into tool layer table github_milestones",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}

Functions

func CollectAccount

func CollectAccount(taskCtx core.SubTaskContext) error

func CollectAccountOrg added in v0.12.0

func CollectAccountOrg(taskCtx core.SubTaskContext) error

func CollectApiComments

func CollectApiComments(taskCtx core.SubTaskContext) error

func CollectApiCommitStats

func CollectApiCommitStats(taskCtx core.SubTaskContext) error

func CollectApiCommits

func CollectApiCommits(taskCtx core.SubTaskContext) error

func CollectApiEvents

func CollectApiEvents(taskCtx core.SubTaskContext) error

func CollectApiIssues

func CollectApiIssues(taskCtx core.SubTaskContext) error

func CollectApiMilestones added in v0.12.0

func CollectApiMilestones(taskCtx core.SubTaskContext) error

func CollectApiPullRequestCommits

func CollectApiPullRequestCommits(taskCtx core.SubTaskContext) error

func CollectApiPullRequestReviews

func CollectApiPullRequestReviews(taskCtx core.SubTaskContext) error

func CollectApiPullRequests

func CollectApiPullRequests(taskCtx core.SubTaskContext) error

func CollectApiRepositories

func CollectApiRepositories(taskCtx core.SubTaskContext) error

func CollectPrReviewComments added in v0.12.0

func CollectPrReviewComments(taskCtx core.SubTaskContext) error

func ConvertAccounts added in v0.12.0

func ConvertAccounts(taskCtx core.SubTaskContext) error

func ConvertCommits

func ConvertCommits(taskCtx core.SubTaskContext) error

func ConvertIssueComments

func ConvertIssueComments(taskCtx core.SubTaskContext) error

func ConvertIssueLabels

func ConvertIssueLabels(taskCtx core.SubTaskContext) error

func ConvertIssues

func ConvertIssues(taskCtx core.SubTaskContext) error

func ConvertMilestones added in v0.12.0

func ConvertMilestones(taskCtx core.SubTaskContext) error

func ConvertPullRequestComments

func ConvertPullRequestComments(taskCtx core.SubTaskContext) error

func ConvertPullRequestCommits

func ConvertPullRequestCommits(taskCtx core.SubTaskContext) (err error)

func ConvertPullRequestIssues

func ConvertPullRequestIssues(taskCtx core.SubTaskContext) error

func ConvertPullRequestLabels

func ConvertPullRequestLabels(taskCtx core.SubTaskContext) error

func ConvertPullRequestReviews added in v0.12.0

func ConvertPullRequestReviews(taskCtx core.SubTaskContext) error

func ConvertPullRequests

func ConvertPullRequests(taskCtx core.SubTaskContext) error

func ConvertRepo

func ConvertRepo(taskCtx core.SubTaskContext) error

func CreateApiClient

func CreateApiClient(taskCtx core.TaskContext, connection *models.GithubConnection) (*helper.ApiAsyncClient, error)

func EnrichPullRequestIssues

func EnrichPullRequestIssues(taskCtx core.SubTaskContext) (err error)

func ExtractAccountOrg added in v0.12.0

func ExtractAccountOrg(taskCtx core.SubTaskContext) error

func ExtractAccounts added in v0.12.0

func ExtractAccounts(taskCtx core.SubTaskContext) error

func ExtractApiComments

func ExtractApiComments(taskCtx core.SubTaskContext) error

func ExtractApiCommitStats

func ExtractApiCommitStats(taskCtx core.SubTaskContext) error

func ExtractApiCommits

func ExtractApiCommits(taskCtx core.SubTaskContext) error

func ExtractApiEvents

func ExtractApiEvents(taskCtx core.SubTaskContext) error

func ExtractApiIssues

func ExtractApiIssues(taskCtx core.SubTaskContext) error

func ExtractApiPrReviewComments added in v0.12.0

func ExtractApiPrReviewComments(taskCtx core.SubTaskContext) error

func ExtractApiPullRequestCommits

func ExtractApiPullRequestCommits(taskCtx core.SubTaskContext) error

func ExtractApiPullRequestReviews

func ExtractApiPullRequestReviews(taskCtx core.SubTaskContext) error

func ExtractApiPullRequests

func ExtractApiPullRequests(taskCtx core.SubTaskContext) error

func ExtractApiRepositories

func ExtractApiRepositories(taskCtx core.SubTaskContext) error

func ExtractMilestones added in v0.12.0

func ExtractMilestones(taskCtx core.SubTaskContext) error

func GetTotalPagesFromResponse

func GetTotalPagesFromResponse(res *http.Response, args *helper.ApiCollectorArgs) (int, error)

Types

type ApiRepoResponse

type ApiRepoResponse GithubApiRepo

type ApiSingleCommitResponse

type ApiSingleCommitResponse struct {
	Sha   string
	Stats struct {
		Additions int
		Deletions int
	}
	Commit struct {
		Committer struct {
			Name  string
			Email string
			Date  helper.Iso8601Time
		}
	}
}

type Commit

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

type CommitsResponse

type CommitsResponse struct {
	Sha       string `json:"sha"`
	Commit    Commit
	Url       string
	Author    *models.GithubAccount
	Committer *models.GithubAccount
}

type DetailGithubAccountResponse added in v0.12.0

type DetailGithubAccountResponse struct {
	GithubAccountResponse
	Name            string    `json:"name"`
	Company         string    `json:"company"`
	Blog            string    `json:"blog"`
	Location        string    `json:"location"`
	Email           string    `json:"email"`
	Hireable        bool      `json:"hireable"`
	Bio             string    `json:"bio"`
	TwitterUsername string    `json:"twitter_username"`
	PublicRepos     int       `json:"public_repos"`
	PublicGists     int       `json:"public_gists"`
	Followers       int       `json:"followers"`
	Following       int       `json:"following"`
	CreatedAt       time.Time `json:"created_at"`
	UpdatedAt       time.Time `json:"updated_at"`
}

type GithubAccountOrgsResponse added in v0.12.0

type GithubAccountOrgsResponse struct {
	Login       string `json:"login"`
	Id          int    `json:"id"`
	NodeId      string `json:"node_id"`
	AvatarUrl   string `json:"avatar_url"`
	Description string `json:"description"`
}

type GithubAccountResponse added in v0.12.0

type GithubAccountResponse struct {
	Login             string `json:"login"`
	Id                int    `json:"id"`
	NodeId            string `json:"node_id"`
	AvatarUrl         string `json:"avatar_url"`
	GravatarId        string `json:"gravatar_id"`
	Url               string `json:"url"`
	HtmlUrl           string `json:"html_url"`
	FollowersUrl      string `json:"followers_url"`
	FollowingUrl      string `json:"following_url"`
	GistsUrl          string `json:"gists_url"`
	StarredUrl        string `json:"starred_url"`
	SubscriptionsUrl  string `json:"subscriptions_url"`
	OrganizationsUrl  string `json:"organizations_url"`
	ReposUrl          string `json:"repos_url"`
	EventsUrl         string `json:"events_url"`
	ReceivedEventsUrl string `json:"received_events_url"`
	Type              string `json:"type"`
	SiteAdmin         bool   `json:"site_admin"`
}

type GithubAccountWithOrg added in v0.12.0

type GithubAccountWithOrg struct {
	githubModels.GithubAccount
	Login string `json:"login" gorm:"type:varchar(255)"`
	common.NoPKModel
}

type GithubApiParams

type GithubApiParams struct {
	ConnectionId uint64
	Owner        string
	Repo         string
}

this struct should be moved to `gitub_api_common.go`

type GithubApiPullRequest

type GithubApiPullRequest struct {
	GithubId int `json:"id"`
	Number   int
	State    string
	Title    string
	Body     json.RawMessage
	HtmlUrl  string `json:"html_url"`
	Labels   []struct {
		Name string `json:"name"`
	} `json:"labels"`
	Assignee        *GithubAccountResponse
	User            *GithubAccountResponse
	ClosedAt        *helper.Iso8601Time `json:"closed_at"`
	MergedAt        *helper.Iso8601Time `json:"merged_at"`
	GithubCreatedAt helper.Iso8601Time  `json:"created_at"`
	GithubUpdatedAt helper.Iso8601Time  `json:"updated_at"`
	MergeCommitSha  string              `json:"merge_commit_sha"`
	Head            struct {
		Ref string
		Sha string
	}
	Base struct {
		Ref string
		Sha string
	}
}

type GithubApiRepo

type GithubApiRepo struct {
	Name        string `json:"name"`
	GithubId    int    `json:"id"`
	HTMLUrl     string `json:"html_url"`
	Language    string `json:"language"`
	Description string `json:"description"`
	Owner       *GithubAccountResponse
	Parent      *GithubApiRepo      `json:"parent"`
	CreatedAt   helper.Iso8601Time  `json:"created_at"`
	UpdatedAt   *helper.Iso8601Time `json:"updated_at"`
	CloneUrl    string              `json:"clone_url"`
}

type GithubOptions

type GithubOptions struct {
	ConnectionId               uint64   `json:"connectionId"`
	Tasks                      []string `json:"tasks,omitempty"`
	Since                      string
	Owner                      string
	Repo                       string
	models.TransformationRules `mapstructure:"transformationRules" json:"transformationRules"`
}

func DecodeAndValidateTaskOptions added in v0.12.0

func DecodeAndValidateTaskOptions(options map[string]interface{}) (*GithubOptions, error)

type GithubTaskData

type GithubTaskData struct {
	Options   *GithubOptions
	ApiClient *helper.ApiAsyncClient
	Since     *time.Time
	Repo      *models.GithubRepo
}

type IssueComment

type IssueComment struct {
	GithubId        int `json:"id"`
	Body            json.RawMessage
	User            *GithubAccountResponse
	IssueUrl        string             `json:"issue_url"`
	GithubCreatedAt helper.Iso8601Time `json:"created_at"`
	GithubUpdatedAt helper.Iso8601Time `json:"updated_at"`
}

type IssueEvent

type IssueEvent struct {
	GithubId int `json:"id"`
	Event    string
	Actor    *GithubAccountResponse
	Issue    struct {
		Id int
	}
	GithubCreatedAt helper.Iso8601Time `json:"created_at"`
}

type IssueRegexes added in v0.12.0

type IssueRegexes struct {
	SeverityRegex        *regexp.Regexp
	ComponentRegex       *regexp.Regexp
	PriorityRegex        *regexp.Regexp
	TypeBugRegex         *regexp.Regexp
	TypeRequirementRegex *regexp.Regexp
	TypeIncidentRegex    *regexp.Regexp
}

func NewIssueRegexes added in v0.12.0

func NewIssueRegexes(config models.TransformationRules) (*IssueRegexes, error)

type IssuesResponse

type IssuesResponse struct {
	GithubId    int `json:"id"`
	Number      int
	State       string
	Title       string
	Body        json.RawMessage
	HtmlUrl     string `json:"html_url"`
	PullRequest struct {
		Url     string `json:"url"`
		HtmlUrl string `json:"html_url"`
	} `json:"pull_request"`
	Labels []struct {
		Name string `json:"name"`
	} `json:"labels"`
	Assignee  *GithubAccountResponse
	User      *GithubAccountResponse
	Milestone *struct {
		Id int
	}
	ClosedAt        *helper.Iso8601Time `json:"closed_at"`
	GithubCreatedAt helper.Iso8601Time  `json:"created_at"`
	GithubUpdatedAt helper.Iso8601Time  `json:"updated_at"`
}

type MilestoneConverterModel added in v0.12.0

type MilestoneConverterModel struct {
	common.RawDataOrigin
	githubModels.GithubMilestone
	GithubId int
}

type MilestonesResponse added in v0.12.0

type MilestonesResponse struct {
	Url         string `json:"url"`
	HtmlUrl     string `json:"html_url"`
	LabelsUrl   string `json:"labels_url"`
	Id          int    `json:"id"`
	NodeId      string `json:"node_id"`
	Number      int    `json:"number"`
	Title       string `json:"title"`
	Description string `json:"description"`
	Creator     struct {
		Login             string `json:"login"`
		Id                int    `json:"id"`
		NodeId            string `json:"node_id"`
		AvatarUrl         string `json:"avatar_url"`
		GravatarId        string `json:"gravatar_id"`
		Url               string `json:"url"`
		HtmlUrl           string `json:"html_url"`
		FollowersUrl      string `json:"followers_url"`
		FollowingUrl      string `json:"following_url"`
		GistsUrl          string `json:"gists_url"`
		StarredUrl        string `json:"starred_url"`
		SubscriptionsUrl  string `json:"subscriptions_url"`
		OrganizationsUrl  string `json:"organizations_url"`
		ReposUrl          string `json:"repos_url"`
		EventsUrl         string `json:"events_url"`
		ReceivedEventsUrl string `json:"received_events_url"`
		Type              string `json:"type"`
		SiteAdmin         bool   `json:"site_admin"`
	} `json:"creator"`
	OpenIssues   int                 `json:"open_issues"`
	ClosedIssues int                 `json:"closed_issues"`
	State        string              `json:"state"`
	CreatedAt    helper.Iso8601Time  `json:"created_at"`
	UpdatedAt    helper.Iso8601Time  `json:"updated_at"`
	DueOn        *helper.Iso8601Time `json:"due_on"`
	ClosedAt     *helper.Iso8601Time `json:"closed_at"`
}

type PrCommitsResponse

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

type PullRequestCommit

type PullRequestCommit struct {
	Author struct {
		Id    int
		Name  string
		Email string
		Date  helper.Iso8601Time
	}
	Committer struct {
		Name  string
		Email string
		Date  helper.Iso8601Time
	}
	Message json.RawMessage
}

type PullRequestReview

type PullRequestReview struct {
	GithubId    int `json:"id"`
	User        *GithubAccountResponse
	Body        string
	State       string
	CommitId    string             `json:"commit_id"`
	SubmittedAt helper.Iso8601Time `json:"submitted_at"`
}

type SimpleAccount added in v0.12.0

type SimpleAccount struct {
	Login string
}

type SimpleAccountWithId added in v0.12.0

type SimpleAccountWithId struct {
	Login     string
	AccountId int
}

type SimplePr

type SimplePr struct {
	Number   int
	GithubId int
}

Jump to

Keyboard shortcuts

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