gitlab

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadProjectURL = errors.New("bad project url")
)
View Source
var (
	ErrMissingIdentityToken = errors.New("missing identity token")
)

Functions

func Issues added in v0.8.0

func Issues(ctx context.Context, client *gitlab.Client, pid string, since time.Time) <-chan *gitlab.Issue

Issues returns a channel with gitlab project issues, ascending order.

func LabelEvents added in v0.8.0

func LabelEvents(ctx context.Context, client *gitlab.Client, issue *gitlab.Issue) <-chan Event

LabelEvents returns a channel with label events.

func Notes added in v0.8.0

func Notes(ctx context.Context, client *gitlab.Client, issue *gitlab.Issue) <-chan Event

Notes returns a channel with note events

func SortedEvents added in v0.8.0

func SortedEvents(inputs ...<-chan Event) chan Event

SortedEvents fan-in some Event-channels into one, sorted by creation date, using CreatedAt-method. This function assume that each channel is pre-ordered.

func StateEvents added in v0.8.0

func StateEvents(ctx context.Context, client *gitlab.Client, issue *gitlab.Issue) <-chan Event

StateEvents returns a channel with state change events.

Types

type ErrorEvent added in v0.8.0

type ErrorEvent struct {
	Err  error
	Time time.Time
}

func (ErrorEvent) CreatedAt added in v0.8.0

func (e ErrorEvent) CreatedAt() time.Time

func (ErrorEvent) ID added in v0.8.0

func (e ErrorEvent) ID() string

func (ErrorEvent) Kind added in v0.8.0

func (e ErrorEvent) Kind() EventKind

func (ErrorEvent) UserID added in v0.8.0

func (e ErrorEvent) UserID() int

type Event added in v0.8.0

type Event interface {
	ID() string
	UserID() int
	Kind() EventKind
	CreatedAt() time.Time
}

Event represents a unified GitLab event (note, label or state event).

type EventKind added in v0.8.0

type EventKind int
const (
	EventUnknown EventKind = iota
	EventError
	EventComment
	EventTitleChanged
	EventDescriptionChanged
	EventClosed
	EventReopened
	EventLocked
	EventUnlocked
	EventChangedDuedate
	EventRemovedDuedate
	EventAssigned
	EventUnassigned
	EventChangedMilestone
	EventRemovedMilestone
	EventAddLabel
	EventRemoveLabel
	EventMentionedInIssue
	EventMentionedInMergeRequest
)

type Gitlab

type Gitlab struct{}

func (*Gitlab) Configure

func (g *Gitlab) Configure(repo *cache.RepoCache, params core.BridgeParams, interactive bool) (core.Configuration, error)

func (*Gitlab) LoginMetaKey

func (g *Gitlab) LoginMetaKey() string

func (Gitlab) NewExporter

func (Gitlab) NewExporter() core.Exporter

func (Gitlab) NewImporter

func (Gitlab) NewImporter() core.Importer

func (Gitlab) Target

func (Gitlab) Target() string

func (*Gitlab) ValidParams

func (g *Gitlab) ValidParams() map[string]interface{}

func (*Gitlab) ValidateConfig

func (g *Gitlab) ValidateConfig(conf core.Configuration) error

type LabelEvent added in v0.8.0

type LabelEvent struct{ gitlab.LabelEvent }

func (LabelEvent) CreatedAt added in v0.8.0

func (l LabelEvent) CreatedAt() time.Time

func (LabelEvent) ID added in v0.8.0

func (l LabelEvent) ID() string

func (LabelEvent) Kind added in v0.8.0

func (l LabelEvent) Kind() EventKind

func (LabelEvent) UserID added in v0.8.0

func (l LabelEvent) UserID() int

type NoteEvent added in v0.8.0

type NoteEvent struct{ gitlab.Note }

func (NoteEvent) CreatedAt added in v0.8.0

func (n NoteEvent) CreatedAt() time.Time

func (NoteEvent) ID added in v0.8.0

func (n NoteEvent) ID() string

func (NoteEvent) Kind added in v0.8.0

func (n NoteEvent) Kind() EventKind

func (NoteEvent) Title added in v0.8.0

func (n NoteEvent) Title() string

func (NoteEvent) UserID added in v0.8.0

func (n NoteEvent) UserID() int

type StateEvent added in v0.8.0

type StateEvent struct{ gitlab.StateEvent }

func (StateEvent) CreatedAt added in v0.8.0

func (s StateEvent) CreatedAt() time.Time

func (StateEvent) ID added in v0.8.0

func (s StateEvent) ID() string

func (StateEvent) Kind added in v0.8.0

func (s StateEvent) Kind() EventKind

func (StateEvent) UserID added in v0.8.0

func (s StateEvent) UserID() int

Jump to

Keyboard shortcuts

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