Documentation
¶
Index ¶
- Variables
- func DrainSignals(ctx workflow.Context, taskQueue string) bool
- func RegisterSignals(ctx workflow.Context, sel workflow.Selector, taskQueue string)
- func RegisterWorkflows(cmd *cli.Command, w worker.Worker)
- type AutoMerge
- type Branch
- type ChangeBase
- type ChangeFrom
- type Changes
- type Comment
- type Config
- type Installation
- type Issue
- type IssueCommentEvent
- type Organization
- type PullRequest
- type PullRequestEvent
- type PullRequestReviewCommentEvent
- type PullRequestReviewEvent
- type PullRequestReviewThreadEvent
- type Repository
- type Review
- type Team
- type Thread
- type User
Constants ¶
This section is empty.
Variables ¶
var Signals = []string{
"github.events.pull_request",
"github.events.pull_request_review",
"github.events.pull_request_review_comment",
"github.events.pull_request_review_thread",
"github.events.issue_comment",
}
Signals is a list of signal names that RevChat receives from Timpani, to trigger event handling workflows.
This is based on:
Functions ¶
func DrainSignals ¶ added in v0.7.0
DrainSignals drains all pending Signals channels, and waits for their corresponding workflow executions to complete in order. This is called in preparation for resetting the dispatcher workflow's history.
func RegisterSignals ¶ added in v0.3.0
RegisterSignals routes Signals to their registered workflows.
Types ¶
type Branch ¶
type Branch struct {
Label string `json:"label"`
Ref string `json:"ref"`
SHA string `json:"sha"`
Repo Repository `json:"repo"`
User User `json:"user"`
}
type ChangeBase ¶ added in v0.2.0
type ChangeBase struct {
Ref ChangeFrom `json:"ref"`
SHA ChangeFrom `json:"sha"`
}
type ChangeFrom ¶ added in v0.2.0
type ChangeFrom struct {
From string `json:"from"`
}
type Changes ¶
type Changes struct {
Base *ChangeBase `json:"base,omitempty"`
Body *ChangeFrom `json:"body,omitempty"`
Title *ChangeFrom `json:"title,omitempty"`
}
type Installation ¶
type Installation struct {
ID int64 `json:"id"`
}
type IssueCommentEvent ¶
type IssueCommentEvent struct {
Action string `json:"action"`
Issue Issue `json:"issue"`
Sender User `json:"sender"`
Comment Comment `json:"comment"`
Changes *Changes `json:"changes,omitempty"`
}
https://docs.github.com/en/webhooks/webhook-events-and-payloads#issue_comment
type Organization ¶
type PullRequest ¶
type PullRequest struct {
ID int64 `json:"id"`
Number int `json:"number"`
HTMLURL string `json:"html_url"`
DiffURL string `json:"diff_url"`
PatchURL string `json:"patch_url"`
Title string `json:"title"`
Body *string `json:"body"`
State string `json:"state"`
AuthorAssociation string `json:"author_association"`
User User `json:"user"`
Assignee *User `json:"assignee"`
Assignees []User `json:"assignees"`
RequestedReviewers []User `json:"requested_reviewers"`
RequestedTeams []Team `json:"requested_teams"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
ClosedAt *string `json:"closed_at"`
MergedAt *string `json:"merged_at"`
MergedBy *User `json:"merged_by"`
MergeCommitSHA *string `json:"merge_commit_sha"`
AutoMerge *AutoMerge `json:"auto_merge"`
// Labels []Label `json:"labels"`
// Milestone *Milestone `json:"milestone"`
Head Branch `json:"head"`
Base Branch `json:"base"`
ActiveLockReason *string `json:"active_lock_reason"`
Draft bool `json:"draft"`
Locked bool `json:"locked"`
Merged bool `json:"merged"`
Mergeable *bool `json:"mergeable"`
Rebaseable *bool `json:"rebaseable"`
MergeableState string `json:"mergeable_state"`
Comments int `json:"comments"`
ReviewComments int `json:"review_comments"`
Commits int `json:"commits"`
Additions int `json:"additions"`
Deletions int `json:"deletions"`
ChangedFiles int `json:"changed_files"`
}
type PullRequestEvent ¶
type PullRequestEvent struct {
Action string `json:"action"`
Number int `json:"number"`
PullRequest PullRequest `json:"pull_request"`
Sender User `json:"sender"`
Assignee *User `json:"assignee,omitempty"`
RequestedReviewer *User `json:"requested_reviewer,omitempty"`
RequestedTeam *Team `json:"requested_team,omitempty"`
Changes *Changes `json:"changes,omitempty"`
Before *string `json:"before,omitempty"`
After *string `json:"after,omitempty"`
}
https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request
type PullRequestReviewCommentEvent ¶
type PullRequestReviewCommentEvent struct {
Action string `json:"action"`
PullRequest PullRequest `json:"pull_request"`
Sender User `json:"sender"`
Comment Comment `json:"comment"`
Changes *Changes `json:"changes,omitempty"`
}
https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request_review_comment
type PullRequestReviewEvent ¶
type PullRequestReviewEvent struct {
Action string `json:"action"`
PullRequest PullRequest `json:"pull_request"`
Sender User `json:"sender"`
Review Review `json:"review"`
Changes *Changes `json:"changes,omitempty"`
}
https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request_review
type PullRequestReviewThreadEvent ¶
type PullRequestReviewThreadEvent struct {
Action string `json:"action"`
PullRequest PullRequest `json:"pull_request"`
Sender User `json:"sender"`
Thread Thread `json:"thread"`
}
https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request_review_thread