app

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseCommitMessage

func ParseCommitMessage(message string) (projectID int, hash string, _ error)

Types

type App added in v0.2.1

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

func New added in v0.2.1

func New(logger *log.Logger, gitlabToken string, gitlabBaseURL *url.URL, committerName, committerEmail string,
) (*App, error)

func (*App) Run added in v0.2.1

func (a *App) Run(ctx context.Context) error

type Commit

type Commit struct {
	CommittedAt time.Time
	Message     string
}

func NewCommit

func NewCommit(committedAt time.Time, projectID int, hash string) *Commit

type GitLab added in v0.2.1

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

func NewGitLab added in v0.2.1

func NewGitLab(logger *log.Logger, gitlabClient *gitlab.Client) *GitLab

func (*GitLab) CurrentUser added in v0.2.1

func (s *GitLab) CurrentUser(ctx context.Context) (*User, error)

func (*GitLab) FetchCommits added in v0.2.1

func (s *GitLab) FetchCommits(ctx context.Context, user *User, projectID int, since time.Time,
) ([]*Commit, error)

func (*GitLab) FetchProjectPage added in v0.2.1

func (s *GitLab) FetchProjectPage(ctx context.Context, page int, user *User, idAfter int,
) (_ []int, nextPage int, _ error)

func (*GitLab) HasUserContributions added in v0.3.0

func (s *GitLab) HasUserContributions(ctx context.Context, user *User, projectID int) bool

type User

type User struct {
	Name      string
	Emails    []string
	Username  string
	CreatedAt time.Time
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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