Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DDEV-Live bot message marker MessageMarker = "<!-- ddev-live bot -->" // Ping/pong Ping = "/ddev-live-ping" // Print help message for users calling the command Help = "/ddev-live-help" // Print help message on PR open, only when applicable HelpOnPROpen = "/ddev-live-help-on-pr-open" // Create preview site PreviewSite = "/ddev-live-preview-site" // Delete preview site, always provides verbose response event when no site exists DeletePreviewSite = "/ddev-live-delete-preview-site" // Close preview site, provides output only in case a preview site existed. This is for PR closing. ClosePreviewSite = "/ddev-live-close-preview-site" )
These strings contain supported `/ddev-live-*` commands in PR/MR comments
Variables ¶
View Source
var ( CreatePreviewSiteCounter = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "bot_create_preview_site_total", Help: "Total number of create preview site command invocations", }, []string{"bot", "status"}) DeletePreviewSiteCounter = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "bot_delete_preview_site_total", Help: "Total number of delete preview site command invocations", }, []string{"bot", "action", "status"}) HelpPreviewSiteCounter = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "bot_help_preview_site_total", Help: "Total number of help command invocations", }, []string{"bot", "action"}) )
Prometheus metrics for bot command invocations
Functions ¶
func AnalyticsClient ¶ added in v0.0.12
func AnalyticsClient(botType, appId, writeKey string) *analytics
func IsBotMessage ¶ added in v0.0.5
func RepoURLNormalize ¶ added in v0.0.5
Types ¶
type Bot ¶
type Bot interface { Response(args ResponseRequest) string ReceiveUpdate() (UpdateEvent, error) }
type ResponseRequest ¶
Click to show internal directories.
Click to hide internal directories.