scmnotify

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadTestReports

func DownloadTestReports(taskInfo *task.Task, logger *zap.SugaredLogger) ([]*models.TestSuite, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) Comment

func (c *Client) Comment(notify *models.Notification) error

Comment send comment to gitlab and set comment id in notify

type Service

type Service struct {
	Client       *Client
	Coll         *mongodb.NotificationColl
	DiffNoteColl *mongodb.DiffNoteColl
}

func NewService

func NewService() *Service

func (*Service) CompleteGitCheckForWorkflowV4 added in v1.9.9

func (s *Service) CompleteGitCheckForWorkflowV4(workflowArgs *models.WorkflowV4, taskID int64, status config.Status, log *zap.SugaredLogger) error

func (*Service) CreateGitCheckForWorkflowV4 added in v1.9.9

func (s *Service) CreateGitCheckForWorkflowV4(workflowArgs *models.WorkflowV4, taskID int64, log *zap.SugaredLogger) error

func (*Service) SendErrWebhookComment

func (s *Service) SendErrWebhookComment(
	mainRepo *models.MainHookRepo, workflow *models.Workflow, err error, prID int, baseURI string, isPipeline, isTest bool, logger *zap.SugaredLogger,
) (*models.Notification, error)

func (*Service) SendInitWebhookComment

func (s *Service) SendInitWebhookComment(
	mainRepo *models.MainHookRepo, prID int, baseURI string, isPipeline, isTest, isScanning, isWorkflowV4 bool, logger *zap.SugaredLogger,
) (*models.Notification, error)

func (*Service) UpdateEnvAndTaskWebhookComment

func (s *Service) UpdateEnvAndTaskWebhookComment(workflowArgs *models.WorkflowTaskArgs, prTaskInfo *models.PrTaskInfo, logger *zap.SugaredLogger) (err error)

func (*Service) UpdateGitCheckForWorkflowV4 added in v1.9.9

func (s *Service) UpdateGitCheckForWorkflowV4(workflowArgs *models.WorkflowV4, taskID int64, log *zap.SugaredLogger) error

func (*Service) UpdatePipelineWebhookComment

func (s *Service) UpdatePipelineWebhookComment(task *task.Task, logger *zap.SugaredLogger) (err error)

func (*Service) UpdateWebhookComment

func (s *Service) UpdateWebhookComment(task *task.Task, logger *zap.SugaredLogger) (err error)

updateWebhookComment update the comment to codehost when task status changes

func (*Service) UpdateWebhookCommentForScanning added in v1.9.9

func (s *Service) UpdateWebhookCommentForScanning(task *task.Task, logger *zap.SugaredLogger) (err error)

func (*Service) UpdateWebhookCommentForTest

func (s *Service) UpdateWebhookCommentForTest(task *task.Task, logger *zap.SugaredLogger) (err error)

UpdateWebhookCommentForTest update the test comment to codehost when task status changes

func (*Service) UpdateWebhookCommentForWorkflowV4 added in v1.9.9

func (s *Service) UpdateWebhookCommentForWorkflowV4(task *models.WorkflowTask, logger *zap.SugaredLogger) (err error)

Jump to

Keyboard shortcuts

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