Documentation
¶
Index ¶
- Variables
- func DrainSignals(ctx workflow.Context) bool
- func IssueCommentWorkflow(ctx workflow.Context, event github.IssueCommentEvent) error
- func PullRequestReviewCommentWorkflow(ctx workflow.Context, event github.PullRequestReviewCommentEvent) error
- func PullRequestReviewThreadWorkflow(ctx workflow.Context, event github.PullRequestReviewThreadEvent) error
- func PullRequestReviewWorkflow(ctx workflow.Context, event github.PullRequestReviewEvent) error
- func RegisterSignals(ctx workflow.Context, sel workflow.Selector)
- func RegisterWorkflows(cmd *cli.Command, w worker.Worker)
- type Config
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 ¶
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 IssueCommentWorkflow ¶
func IssueCommentWorkflow(ctx workflow.Context, event github.IssueCommentEvent) error
IssueCommentWorkflow is an entrypoint to mirror all GitHub issue comment events in the PR's Slack channel: https://docs.github.com/en/webhooks/webhook-events-and-payloads#issue_comment
func PullRequestReviewCommentWorkflow ¶
func PullRequestReviewCommentWorkflow(ctx workflow.Context, event github.PullRequestReviewCommentEvent) error
PullRequestReviewCommentWorkflow is an entrypoint to mirror all GitHub pull request review comment events in the PR's Slack channel: https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request_review_comment
func PullRequestReviewThreadWorkflow ¶
func PullRequestReviewThreadWorkflow(ctx workflow.Context, event github.PullRequestReviewThreadEvent) error
PullRequestReviewThreadWorkflow is an entrypoint to mirror all GitHub pull request review thread (i.e. comment resolution) events in the PR's Slack channel: https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request_review_thread
func PullRequestReviewWorkflow ¶
func PullRequestReviewWorkflow(ctx workflow.Context, event github.PullRequestReviewEvent) error
PullRequestReviewWorkflow is an entrypoint to mirror all GitHub pull request review events in the PR's Slack channel: https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request_review
func RegisterSignals ¶
RegisterSignals routes Signals to their registered workflows.
Types ¶
type Config ¶
type Config struct {
SlackAlertsChannel string
SlackChannelNamePrefix string
SlackChannelNameMaxLength int
SlackChannelsArePrivate bool
LinkifyMap map[string]string
}
func (Config) PullRequestWorkflow ¶
PullRequestWorkflow is an entrypoint to handle all GitHub pull request events: https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request