commenter

package
v0.0.0-...-fa7e1d0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 NewGitHubCommenter(githubClient *github.Client, dbc *db.DB, excludedRepos, includedRepos []string) (*GitHubCommenter, error)

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 (ghc *GitHubCommenter) FindExistingCommentID(org, repo string, number int, commentKey, commentID string) (*int64, *string, error)

func (*GitHubCommenter) GetCurrentState

func (ghc *GitHubCommenter) GetCurrentState(org, repo string, number int) (*github.PREntry, error)

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

Jump to

Keyboard shortcuts

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