provider

package
v0.0.0-...-8ea441c Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGitlab

func NewGitlab(name string, config ast.Node) kagami.Provider

NewGitlab creates a new gitlab instance

Types

type Gitlab

type Gitlab struct {
	provider.GitConfig
	// contains filtered or unexported fields
}

Gitlab is the github provider and uses deploy keys as credentials

func (*Gitlab) Name

func (gl *Gitlab) Name() string

Name is the name of the provider

func (*Gitlab) Pull

func (gl *Gitlab) Pull(repo *kagami.Repository, path string) error

Pull pulls a repo from github locally

func (*Gitlab) Push

func (gl *Gitlab) Push(repo *kagami.Repository, path string) error

Push pushes a repo to a remote target

func (*Gitlab) ServeHTTP

func (gl *Gitlab) ServeHTTP(w http.ResponseWriter, req *http.Request)

Handle takes care of gitlab webhooks

func (*Gitlab) Type

func (gl *Gitlab) Type() string

Type is the type of the provider

type GitlabPushPayload

type GitlabPushPayload struct {
	Project struct {
		PathWithNamespace string `json:"path_with_namespace"`
	} `json:"project"`
	Repository struct {
		Name   string `json:"name"`
		SSHURL string `json:"git_ssh_url"`
	} `json:"repository"`
}

GitlabPushPayload represents a push payload from a gitlab webhook, at least the fields that we actually care about: https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#push-events

Jump to

Keyboard shortcuts

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