Documentation
¶
Index ¶
- func Applicability(comment ReviewComment, repository *RepositoryDiff) string
- func Error(status int, format string, values ...any) error
- func FormatComments(comments []ReviewComment, includeResolved bool, repositories []RepositoryDiff) string
- func Message(value string) *string
- func PatchContext(patch, side string, start, end int) (string, bool)
- func RemoteRepositoryName(remote, fallback string) string
- type ChangedFile
- type DiffMode
- type FileContents
- type FilePatch
- type RepositoryDiff
- type RequestError
- type ReviewComment
- type ReviewFileOrigin
- type ReviewMark
- type ReviewOrigin
- type Source
- type Support
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Applicability ¶
func Applicability(comment ReviewComment, repository *RepositoryDiff) string
func FormatComments ¶
func FormatComments(comments []ReviewComment, includeResolved bool, repositories []RepositoryDiff) string
func RemoteRepositoryName ¶
Types ¶
type ChangedFile ¶
type ChangedFile struct {
ID string `json:"id"`
Path string `json:"path"`
OldPath *string `json:"oldPath"`
Status string `json:"status"`
IndexStatus string `json:"indexStatus"`
WorktreeStatus string `json:"worktreeStatus"`
Additions int `json:"additions"`
Deletions int `json:"deletions"`
Binary bool `json:"binary"`
Fingerprint string `json:"fingerprint"`
Recreated bool `json:"recreated,omitempty"`
}
type FileContents ¶
type FilePatch ¶
type FilePatch struct {
Patch string `json:"patch"`
Message *string `json:"message"`
Contents *FileContents `json:"contents,omitempty"`
}
type RepositoryDiff ¶
type RepositoryDiff struct {
ID string `json:"id"`
VersionID string `json:"versionId"`
LocationID *string `json:"locationId"`
RepositoryID *string `json:"repositoryId"`
Source string `json:"source"`
Root string `json:"root"`
Name string `json:"name"`
Branch string `json:"branch"`
Head *string `json:"head"`
Mode DiffMode `json:"mode"`
Files []ChangedFile `json:"files"`
Revision string `json:"revision"`
}
type RequestError ¶
func (*RequestError) Error ¶
func (err *RequestError) Error() string
type ReviewComment ¶
type ReviewComment struct {
ID string `json:"id"`
DiffID string `json:"diffId"`
VersionID string `json:"versionId"`
Path string `json:"path"`
Scope DiffMode `json:"scope"`
Fingerprint string `json:"fingerprint"`
Target string `json:"target,omitempty"`
Side string `json:"side"`
Start int `json:"start"`
End int `json:"end"`
Code string `json:"code"`
Body string `json:"body"`
Status string `json:"status"`
CreatedAt float64 `json:"createdAt"`
Origin *ReviewOrigin `json:"origin,omitempty"`
}
func (ReviewComment) Valid ¶
func (comment ReviewComment) Valid() bool
type ReviewFileOrigin ¶
type ReviewMark ¶
type ReviewOrigin ¶
Click to show internal directories.
Click to hide internal directories.