Documentation ¶
Index ¶
- Variables
- func CreateAnalyzedGroupContributions(ctx context.Context, db *gorm.DB, ...) error
- func CreateAnalyzedOrgContributions(ctx context.Context, db *gorm.DB, ...) error
- func CreateContributors(ctx context.Context, db *gorm.DB, cs []*model.Contributor) error
- func CreateCursor(ctx context.Context, db *gorm.DB, cursor *model.Cursor) error
- func CreateGroup(ctx context.Context, db *gorm.DB, group *model.Group) error
- func CreateGroupsOrganizations(ctx context.Context, db *gorm.DB, join *model.GroupsOrganizations) error
- func CreateGroupsRepositories(ctx context.Context, db *gorm.DB, join *model.GroupsRepositories) error
- func CreateIssueAssignees(ctx context.Context, db *gorm.DB, assignees []*model.IssueAssignees) error
- func CreateIssues(ctx context.Context, db *gorm.DB, issues []*model.Issue) error
- func CreateOrganization(ctx context.Context, db *gorm.DB, org *model.Organization) error
- func CreatePullRequestAssignees(ctx context.Context, db *gorm.DB, assignees []*model.PullRequestAssignees) error
- func CreatePullRequests(ctx context.Context, db *gorm.DB, prs []*model.PullRequest) error
- func CreateRepository(ctx context.Context, db *gorm.DB, repo *model.Repository) error
- func DeleteCursor(ctx context.Context, db *gorm.DB, repoNodeID string) error
- func DeleteIssueAssigneesByIssue(ctx context.Context, db *gorm.DB, issueNodeID string) error
- func DeleteIssueAssigneesByRepo(ctx context.Context, db *gorm.DB, nameWithOwner string) error
- func DeleteIssues(ctx context.Context, db *gorm.DB, repoNodeID string) error
- func DeletePullRequestAssigneesByPR(ctx context.Context, db *gorm.DB, prNodeID string) error
- func DeletePullRequestAssigneesByRepo(ctx context.Context, db *gorm.DB, nameWithOwner string) error
- func DeletePullRequests(ctx context.Context, db *gorm.DB, repoNodeID string) error
- func DeleteRepository(ctx context.Context, db *gorm.DB, nodeID string) error
- func Init() (err error)
- func IssueAssigneesExist(ctx context.Context, db *gorm.DB, nodeID string) (bool, error)
- func IssueExist(ctx context.Context, db *gorm.DB, nodeID string) (bool, error)
- func PullRequestAssigneesExist(ctx context.Context, db *gorm.DB, nodeID string) (bool, error)
- func QueryContributorCountByGroup(ctx context.Context, db *gorm.DB, groupName string) (int, error)
- func QueryContributorCountByOrg(ctx context.Context, db *gorm.DB, orgNodeID string) (int, error)
- func QueryCursor(ctx context.Context, db *gorm.DB, repo string) (*model.Cursor, error)
- func QueryOPENPullRequests(ctx context.Context, db *gorm.DB, repoNodeID string) ([]model.PullRequest, error)
- func QueryReposByOrg(ctx context.Context, db *gorm.DB, orgNodeID string) ([]string, error)
- func QueryRepositoryNodeID(ctx context.Context, db *gorm.DB, owner, name string) (string, error)
- func UpdateContributorCompanyAndLocation(ctx context.Context, db *gorm.DB, update func(string) string) error
- func UpdateContributorCompanyAndLocationByLogin(ctx context.Context, db *gorm.DB, login, company, location string) error
- func UpdateGroup(ctx context.Context, db *gorm.DB, group *model.Group) error
- func UpdateIssue(ctx context.Context, db *gorm.DB, issue *model.Issue) error
- func UpdateIssueAssignees(ctx context.Context, db *gorm.DB, issueNodeID string, ...) error
- func UpdateOrCreateContributors(ctx context.Context, db *gorm.DB, cs []*model.Contributor) error
- func UpdateOrCreateCursor(ctx context.Context, db *gorm.DB, cursor *model.Cursor) error
- func UpdateOrganization(ctx context.Context, db *gorm.DB, org *model.Organization) error
- func UpdatePullRequest(ctx context.Context, db *gorm.DB, pr *model.PullRequest) error
- func UpdatePullRequestAssignees(ctx context.Context, db *gorm.DB, prNodeID string, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
Functions ¶
func CreateAnalyzedGroupContributions ¶ added in v0.2.0
func CreateAnalyzedOrgContributions ¶ added in v0.2.0
func CreateContributors ¶
func CreateIssueAssignees ¶
func CreateIssues ¶
func CreateOrganization ¶
func CreatePullRequests ¶
func CreateRepository ¶
func DeletePullRequests ¶
func DeleteRepository ¶
func IssueAssigneesExist ¶
func QueryContributorCountByGroup ¶
QueryContributorCountByGroup
SELECT COUNT(DISTINCT c.node_id) AS contributor_count FROM contributors c INNER JOIN (
SELECT DISTINCT gr.repo_node_id FROM groups_repositories gr INNER JOIN repositories r ON gr.repo_node_id = r.node_id WHERE gr.group_name = 'groupName' UNION SELECT DISTINCT r.node_id FROM repositories r INNER JOIN groups_organizations go ON r.owner_node_id = go.org_node_id WHERE go.group_name = 'groupName'
) AS repos ON c.repo_node_id = repos.repo_node_id;
func QueryContributorCountByOrg ¶
QueryContributorCountByOrg
SELECT COUNT(DISTINCT c.node_id) AS contributor_count FROM contributors c INNER JOIN repositories r ON c.repo_node_id = r.node_id WHERE r.owner_node_id = 'orgNodeID';
func QueryCursor ¶
func QueryOPENPullRequests ¶
func QueryReposByOrg ¶
func QueryRepositoryNodeID ¶
func UpdateContributorCompanyAndLocation ¶
func UpdateContributorCompanyAndLocation(ctx context.Context, db *gorm.DB, update func(string) string) error
UpdateContributorCompanyAndLocation TODO: use batch update
func UpdateContributorCompanyAndLocationByLogin ¶ added in v0.2.0
func UpdateContributorCompanyAndLocationByLogin(ctx context.Context, db *gorm.DB, login, company, location string) error
UpdateContributorCompanyAndLocationByLogin TODO: use batch update
func UpdateIssueAssignees ¶
func UpdateOrCreateCursor ¶
func UpdateOrganization ¶
func UpdatePullRequest ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.