gitlab

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnsupportedMergeRequestAction = "unsupported merge request action"
)

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) OnMergeRequestActions added in v0.1.0

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

OnMergeRequestActions handles the merge request actions and sends the comment to the task based on the action.

@Description	Creates a comment for the merge request actions.
@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