Documentation
¶
Index ¶
- Constants
- func EncodeSteps(writer io.Writer, steps []Step) error
- func Write(writer io.Writer, recording Recording) error
- type Branch
- type CheckRun
- type CheckSuite
- type Commit
- type CompileOptions
- type Delivery
- type Event
- type FixtureMutation
- type Header
- type IssueComment
- type Program
- type PullRequest
- type Push
- type Recording
- type Repository
- type Review
- type ReviewComment
- type ReviewThread
- type Stack
- type Step
- type TimedEvent
Constants ¶
View Source
const DefaultWebhookSecret = "ghsync-replay-secret"
View Source
const RecordingVersion = 2
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CheckRun ¶
type CheckRun struct {
ID int64 `json:"id"`
NodeID string `json:"node_id"`
HeadSHA string `json:"head_sha"`
Name string `json:"name"`
Status string `json:"status"`
Conclusion string `json:"conclusion,omitempty"`
DetailsURL string `json:"details_url"`
AppSlug string `json:"app_slug,omitempty"`
StartedAt *time.Time `json:"started_at,omitempty"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
}
type CheckSuite ¶
type CheckSuite struct {
ID int64 `json:"id"`
NodeID string `json:"node_id"`
HeadSHA string `json:"head_sha"`
Status string `json:"status"`
Conclusion string `json:"conclusion,omitempty"`
AppSlug string `json:"app_slug,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type CompileOptions ¶
type Event ¶
type Event struct {
Seq int64 `json:"seq"`
AtMS int64 `json:"at_ms"`
Kind string `json:"kind"`
Action string `json:"action,omitempty"`
Repository *Repository `json:"repository,omitempty"`
PullRequest *PullRequest `json:"pull_request,omitempty"`
Review *Review `json:"review,omitempty"`
IssueComment *IssueComment `json:"issue_comment,omitempty"`
Thread *ReviewThread `json:"review_thread,omitempty"`
Comment *ReviewComment `json:"review_comment,omitempty"`
CheckSuite *CheckSuite `json:"check_suite,omitempty"`
CheckRun *CheckRun `json:"check_run,omitempty"`
Commit *Commit `json:"commit,omitempty"`
Push *Push `json:"push,omitempty"`
Stack *Stack `json:"stack,omitempty"`
PreviousBase *Branch `json:"previous_base,omitempty"`
}
func NormalizeEvents ¶
func NormalizeEvents(events []TimedEvent) ([]Event, time.Time)
type FixtureMutation ¶
type FixtureMutation struct {
Kind string `json:"kind"`
Action string `json:"action,omitempty"`
Repository Repository `json:"repository"`
PullRequest *PullRequest `json:"pull_request,omitempty"`
Review *Review `json:"review,omitempty"`
IssueComment *IssueComment `json:"issue_comment,omitempty"`
ReviewThread *ReviewThread `json:"review_thread,omitempty"`
ReviewComment *ReviewComment `json:"review_comment,omitempty"`
CheckSuite *CheckSuite `json:"check_suite,omitempty"`
CheckRun *CheckRun `json:"check_run,omitempty"`
Commit *Commit `json:"commit,omitempty"`
Push *Push `json:"push,omitempty"`
Stack *Stack `json:"stack,omitempty"`
}
type Header ¶
type Header struct {
Type string `json:"type"`
Version int `json:"version"`
Repository Repository `json:"repository"`
Since time.Time `json:"since"`
Until time.Time `json:"until"`
StartedAt time.Time `json:"started_at"`
SynthesizeStacks float64 `json:"synthesize_stacks_percent"`
Seed int64 `json:"seed"`
}
type IssueComment ¶ added in v0.3.0
type IssueComment struct {
ID int64 `json:"id"`
NodeID string `json:"node_id"`
AuthorKind string `json:"author_kind"`
AuthorNodeID string `json:"author_node_id,omitempty"`
AuthorLogin string `json:"author_login,omitempty"`
Body string `json:"body,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type PullRequest ¶
type PullRequest struct {
ID int64 `json:"id"`
NodeID string `json:"node_id"`
Number int `json:"number"`
Title string `json:"title"`
State string `json:"state"`
Draft bool `json:"draft"`
Merged bool `json:"merged"`
AuthorLogin string `json:"author_login"`
ReviewDecision string `json:"review_decision,omitempty"`
MergeableState string `json:"mergeable_state,omitempty"`
Head Branch `json:"head"`
Base Branch `json:"base"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ClosedAt *time.Time `json:"closed_at,omitempty"`
MergedAt *time.Time `json:"merged_at,omitempty"`
}
func SynthesizeStackBases ¶
func SynthesizeStackBases( repository Repository, pulls []PullRequest, percent float64, seed int64, ) ([]PullRequest, map[int]bool)
type Repository ¶
type Repository struct {
ID int64 `json:"id"`
NodeID string `json:"node_id"`
Owner string `json:"owner"`
Name string `json:"name"`
DefaultBranch string `json:"default_branch"`
DefaultBranchSHA string `json:"default_branch_sha"`
UpdatedAt time.Time `json:"updated_at"`
}
func (Repository) FullName ¶
func (r Repository) FullName() string
type Review ¶
type Review struct {
ID int64 `json:"id"`
NodeID string `json:"node_id"`
State string `json:"state"`
Body string `json:"body,omitempty"`
AuthorLogin string `json:"author_login"`
AuthorKind string `json:"author_kind,omitempty"`
AuthorNodeID string `json:"author_node_id,omitempty"`
CommitSHA string `json:"commit_sha,omitempty"`
SubmittedAt time.Time `json:"submitted_at"`
UpdatedAt time.Time `json:"updated_at,omitzero"`
}
type ReviewComment ¶
type ReviewComment struct {
ID int64 `json:"id"`
NodeID string `json:"node_id"`
ReviewID int64 `json:"review_id,omitempty"`
Body string `json:"body,omitempty"`
Path string `json:"path"`
Line *int `json:"line,omitempty"`
AuthorLogin string `json:"author_login"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type ReviewThread ¶
type Stack ¶
type Stack struct {
ID int64 `json:"id"`
Number int `json:"number"`
Base Branch `json:"base"`
PullRequests []int `json:"pull_requests"`
PullRequestStates []PullRequest `json:"pull_request_states"`
Synthetic bool `json:"synthetic,omitempty"`
}
func DeriveStacks ¶
func DeriveStacks(repository Repository, pulls []PullRequest) []Stack
Click to show internal directories.
Click to hide internal directories.