Documentation ¶
Index ¶
Constants ¶
const (
// ISSUE_COMMENT_WEIGHT is a default weight of Issue Comment relation.
ISSUE_COMMENT_WEIGHT = 10
)
const (
// PULL_REQUEST_COMMENT_WEIGHT is a default weight of Pull Request Comment.
PULL_REQUEST_COMMENT_WEIGHT = 16
)
const (
// REVIEW_WEIGHT is a default weight of Reviewer relation.
REVIEW_WEIGHT = 10
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IssueComment ¶
type IssueComment struct { RequesterID int64 PullRequestID int64 IssuerID int64 IssuerUserName string Weight int64 }
IssueComment represents PullRequest/Issue comment author relation with PullRequest/Issue author.
func CreateIssueComment ¶
func CreateIssueComment(prr *github.IssueComment, pullRequestID, requesterID, weight int64) IssueComment
CreateIssueComment will return IssueComment model object
func (IssueComment) Neo ¶
func (ic IssueComment) Neo() neo.Query
Neo returns IssueComment neo.Query relation with RequesterID
type PullRequestComment ¶
type PullRequestComment struct { RequesterID int64 PullRequestID int64 CommenterID int64 CommenterUserName string Weight int64 }
PullRequestComment represents PullRequest comment author relation with PullRequest author - pull request comment is a different entity than issue comment. Issue comment is for both PRs and Issues, PR Comment is for PR code snippet comments.
func CreatePullRequestComment ¶
func CreatePullRequestComment(prc *github.PullRequestComment, pullRequestID, requesterID, weight int64) PullRequestComment
CreatePullRequestComment will return PullRequestComment model object
func (PullRequestComment) ID ¶
func (prc PullRequestComment) ID() int64
ID returns IssueComment CommenterID
func (PullRequestComment) Neo ¶
func (prc PullRequestComment) Neo() neo.Query
Neo returns PullRequestComment neo.Query relation with RequesterID
type Repository ¶
Repository represents repository as a graph node.
func CreateRepository ¶
func CreateRepository(ghRepository *github.Repository) Repository
CreateRepository will create model Repository object from GitHub API Repository.
func (Repository) Neo ¶
func (r Repository) Neo() neo.Query
Neo is an implementation of neo.Resource interface. It will return Repository as neo4j query string. There will be created Repository and owner user nodes. Repository will be connected with owner node with relation OWNER.
func (Repository) String ¶
func (r Repository) String() string
type Requester ¶
Requester represents Pull Request Author node entity.
func CreateRequester ¶
func CreateRequester(pr *github.PullRequest) Requester
CreateRequester will return Requester model object
type Reviewer ¶
type Reviewer struct { RequesterID int64 PullRequestID int64 ReviewerID int64 ReviewerUserName string Weight int64 }
Reviewer represents Review author relation with PullRequest/Issue author.
func CreateReviewer ¶
func CreateReviewer(prr *github.PullRequestReview, pullRequestID, requesterID, weight int64) Reviewer
CreateReviewer will return Reviewer model object