plugin

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	plugin.MattermostPlugin
	Store store.Store
	// contains filtered or unexported fields
}

Plugin implements the interface expected by the Mattermost server to communicate between the server and plugin processes.

func (*Plugin) ExecuteCommand

func (p *Plugin) ExecuteCommand(c *plugin.Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError)

ExecuteCommand is called when a slash command registered by the plugin is called

func (*Plugin) OnActivate

func (p *Plugin) OnActivate() error

OnActivate is run when the plugin is activated

func (*Plugin) OnConfigurationChange

func (p *Plugin) OnConfigurationChange() error

OnConfigurationChange is invoked when configuration changes may have been made.

func (*Plugin) ServeHTTP

func (p *Plugin) ServeHTTP(c *plugin.Context, w http.ResponseWriter, r *http.Request)

ServeHTTP allows the plugin to implement the http.Handler interface. Requests destined for the /plugins/{id} path will be routed to the plugin

type WebhookInfo

type WebhookInfo struct {
	Organization           string `json:"Organization"`
	Repository             string `json:"Repository"`
	RepositoryURL          string `json:"RepositoryURL"`
	Username               string `json:"Username"`
	WorkflowID             string `json:"WorkflowID"`
	JobName                string `json:"JobName"`
	CircleBuildURL         string `json:"CircleBuildURL"`
	Branch                 string `json:"Branch"`
	Tag                    string `json:"Tag"`
	Commit                 string `json:"Commit"`
	AssociatedPullRequests string `json:"AssociatedPullRequests"`
	Message                string `json:"Message"`
	CircleBuildNumber      int    `json:"CircleBuildNumber"`
	IsFailed               bool   `json:"IsFailed"`
	IsWaitingApproval      bool   `json:"IsWaitingApproval"`
}

WebhookInfo from the webhook

func (*WebhookInfo) ToPost

func (wi *WebhookInfo) ToPost(buildFailedIconURL, buildGreenIconURL string) *model.Post

ToPost converts the build info into a Post

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL