Documentation
¶
Index ¶
- Constants
- type GitHubCommenter
- func (ghc *GitHubCommenter) AddComment(org, repo string, number int, comment string) error
- func (ghc *GitHubCommenter) ClearPendingRecord(org, repo string, number int, sha string, commentType models.CommentType, ...)
- func (ghc *GitHubCommenter) CreateCommentID(commentType models.CommentType, sha string) string
- func (ghc *GitHubCommenter) DeleteComment(org, repo string, updateID int64) error
- func (ghc *GitHubCommenter) FindExistingCommentID(org, repo string, number int, commentKey, commentID string) (*int64, *string, error)
- func (ghc *GitHubCommenter) GetCurrentState(org, repo string, number int) (*github.PREntry, error)
- func (ghc *GitHubCommenter) IsRepoIncluded(org, repo string) bool
- func (ghc *GitHubCommenter) QueryForPotentialComments(commentType models.CommentType) ([]models.PullRequestComment, error)
- func (ghc *GitHubCommenter) QueryPRPendingComments(org, repo string, number int, commentType models.CommentType) ([]models.PullRequestComment, error)
- func (ghc *GitHubCommenter) UpdatePendingCommentRecords(org, repo string, prNumber int, sha string, commentType models.CommentType, ...)
- func (ghc *GitHubCommenter) UpdatePendingRecordErrorCount(org, repo string, number int, sha string, commentType models.CommentType) error
- func (ghc *GitHubCommenter) ValidateAndUpdatePendingRecordComment(org, repo string, number int, sha string, commentType models.CommentType) (bool, error)
Constants ¶
View Source
const TrtCommentIDKey = `trt_comment_id`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHubCommenter ¶
type GitHubCommenter struct {
// contains filtered or unexported fields
}
func NewGitHubCommenter ¶
func (*GitHubCommenter) AddComment ¶
func (ghc *GitHubCommenter) AddComment(org, repo string, number int, comment string) error
func (*GitHubCommenter) ClearPendingRecord ¶
func (ghc *GitHubCommenter) ClearPendingRecord(org, repo string, number int, sha string, commentType models.CommentType, record *models.PullRequestComment)
func (*GitHubCommenter) CreateCommentID ¶
func (ghc *GitHubCommenter) CreateCommentID(commentType models.CommentType, sha string) string
func (*GitHubCommenter) DeleteComment ¶
func (ghc *GitHubCommenter) DeleteComment(org, repo string, updateID int64) error
func (*GitHubCommenter) FindExistingCommentID ¶
func (*GitHubCommenter) GetCurrentState ¶
func (*GitHubCommenter) IsRepoIncluded ¶
func (ghc *GitHubCommenter) IsRepoIncluded(org, repo string) bool
func (*GitHubCommenter) QueryForPotentialComments ¶
func (ghc *GitHubCommenter) QueryForPotentialComments(commentType models.CommentType) ([]models.PullRequestComment, error)
func (*GitHubCommenter) QueryPRPendingComments ¶
func (ghc *GitHubCommenter) QueryPRPendingComments(org, repo string, number int, commentType models.CommentType) ([]models.PullRequestComment, error)
func (*GitHubCommenter) UpdatePendingCommentRecords ¶
func (ghc *GitHubCommenter) UpdatePendingCommentRecords(org, repo string, prNumber int, sha string, commentType models.CommentType, mergedAt *time.Time, pjPath string)
func (*GitHubCommenter) UpdatePendingRecordErrorCount ¶
func (ghc *GitHubCommenter) UpdatePendingRecordErrorCount(org, repo string, number int, sha string, commentType models.CommentType) error
func (*GitHubCommenter) ValidateAndUpdatePendingRecordComment ¶
func (ghc *GitHubCommenter) ValidateAndUpdatePendingRecordComment(org, repo string, number int, sha string, commentType models.CommentType) (bool, error)
check for this record in our table check to see what the last time we attempted to write a comment was if within threshold then skip if not then update the last attempt time return true if the record is valid for processing, false otherwise
Click to show internal directories.
Click to hide internal directories.