Documentation ¶
Index ¶
Constants ¶
View Source
const ( JobResultSuccess = "success" JobResultFailure = "failure" JobResultCancelled = "cancelled" JobResultUnknown = "unknown" )
View Source
const DefaultJobInfoFile = "/tmp/github.env"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for Slack agent.
type JobInfo ¶
type JobInfo struct { Actor string `json:"actor,omitempty"` GitRef string `json:"git_ref,omitempty"` JobID string `json:"job_id,omitempty"` PullRequestNum int `json:"pull_request_number,omitempty"` Repository string `json:"repository,omitempty"` RunID int `json:"run_id,omitempty"` RunNumber int `json:"run_number,omitempty"` WorkflowName string `json:"workflow_name,omitempty"` }
JobInfo represents information about a CI job.
func GetJobInfo ¶
GetJobInfo reads environment variables and creates JobInfo.
func GetJobInfoFromFile ¶
func (*JobInfo) BranchTagURL ¶
func (*JobInfo) PullRequestURL ¶
func (*JobInfo) RepositoryURL ¶
func (*JobInfo) WorkflowURL ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server receives requests from clients and communicates with Slack.
func NewServer ¶
func NewServer(logger logr.Logger, listenAddr string, defaultChannel string, appToken, botToken string, devMode bool, verbose bool) (*Server, error)
NewServer creates slack agent server.
Click to show internal directories.
Click to hide internal directories.