gitlab

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(cfg *config.HTTPAPI, l *zerolog.Logger, t tm.ITaskManager, v vcs.IVCS) *Handler

func (*Handler) OnBranchMerge

func (h *Handler) OnBranchMerge(c *gin.Context)

OnBranchMerge handles the merge event and updates the last commit info

@Description	Update last commit info, based on merge event of MR
@Accept			json
@Param			X-Gitlab-Event	header		string					true	"Gitlab event"
@Param			X-Gitlab-Token	header		string					true	"Gitlab token"
@Param			body			body		gitlab.PushRequestHook	true	"Gitlab request body"
@Success		200				{object}	api.Response
@Failure		400				{object}	api.Response
@Failure		401				{object}	api.Response
@Failure		500				{object}	api.Response
@Router			/api/v1/asana/merge [post]

func (*Handler) SyncMRDescriptionWithAsanaTasks

func (h *Handler) SyncMRDescriptionWithAsanaTasks(c *gin.Context)

SyncMRDescriptionWithAsanaTasks updates the merge request description with the task info based on the mentioned tasks in the branch name

@Description	Update merge request description with the task info
@Accept			json
@Param			X-Gitlab-Event	header		string					true	"Gitlab event"
@Param			X-Gitlab-Token	header		string					true	"Gitlab token"
@Param			body			body		gitlab.MergeRequestHook	true	"Gitlab request body"
@Success		200				{object}	api.Response
@Failure		400				{object}	api.Response
@Failure		401				{object}	api.Response
@Failure		500				{object}	api.Response
@Router			/api/v1/gitlab/sync_description [post]

func (*Handler) UpdateLastCommitInfo

func (h *Handler) UpdateLastCommitInfo(c *gin.Context)

UpdateLastCommitInfo updates the last commit info of a task

@Description	Update last commit info, in custom field or creating a comment
@Accept			json
@Param			X-Gitlab-Event	header		string					true	"Gitlab event"
@Param			X-Gitlab-Token	header		string					true	"Gitlab token"
@Param			body			body		gitlab.PushRequestHook	true	"Gitlab request body"
@Success		200				{object}	api.Response
@Failure		400				{object}	api.Response
@Failure		401				{object}	api.Response
@Failure		500				{object}	api.Response
@Router			/api/v1/asana/push [post]

Jump to

Keyboard shortcuts

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