gitlab

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLatestTag added in v0.1.5

func GetLatestTag(s utils.UserSettings) (string, string)

Given a tag, return a (start, end) tag tuple

end = the given tag
start = latest formal version tag before the given tag

func Post2Issue

func Post2Issue(changes string, s utils.UserSettings) error

Types

type Branch

type Branch struct {
	Name      string `json:"name"`
	Merged    bool   `json:"merged"`
	Protected bool   `json:"protected"`
	Default   bool   `json:"default"`
	Url       string `json:"web_url"`
}

func ParseBranches

func ParseBranches(json_str []byte) []Branch

type Commit

type Commit struct {
	Id        string   `json:"id"`
	ShortId   string   `json:"short_id"`
	Title     string   `json:"title"`
	CreatedAt string   `json:"created_at"`
	Message   string   `json:"message"`
	ParentIds []string `json:"parent_ids"`
}

type Gitlab

type Gitlab struct {
	url.URL
	Token string
}

func NewCustomGitlab

func NewCustomGitlab(host string, project_id int, token string) Gitlab

func NewGitlab

func NewGitlab(project_id int, token string) Gitlab

func (*Gitlab) FindMRsBetween

func (g *Gitlab) FindMRsBetween(start string, end string, br string) ([]MergeRequest, error)

type Issue added in v0.1.6

type Issue struct {
	ProjectId   int    `json:"project_id"`
	Id          int    `json:"id"`
	Iid         int    `json:"iid"`
	Title       string `json:"title"`
	CreatedAt   string `json:"created_at"`
	UpdatedAt   string `json:"updated_at"`
	Type        string `json:"type"`
	Author      User   `json:"author"`
	Description string `json:"description"`
	State       string `json:"state"`
	ClosedAt    string `json:"closed_at"`
	ClosedBy    User   `json:"closed_by"`
	WebUrl      string `json:"web_url"`
}

func ParseIssue added in v0.1.6

func ParseIssue(json_str []byte) Issue

func ParseIssueList added in v0.1.6

func ParseIssueList(json_str []byte) []Issue

type IssueRqst

type IssueRqst struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	Token       string `json:"private_token"`
	StateEvent  string `json:"state_event,omitempty"`
}

type MergeRequest

type MergeRequest struct {
	Id           int    `json:"id"`
	IId          int    `json:"iid"`
	Title        string `json:"title"`
	State        string `json:"state"`
	MergeUser    User   `json:"merge_user"`
	MergedAt     string `json:"merged_at"`
	CreatedAt    string `json:"created_at"`
	UpdatedAt    string `json:"updated_at"`
	SourceBranch string `json:"source_branch"`
	TargetBranch string `json:"target_branch"`
	Author       User   `json:"author"`
	MergeUrl     string `json:"web_url"`
	MergeCommit  string `json:"merge_commit_sha"`
}

func FetchMrs

func FetchMrs(s utils.UserSettings) ([]MergeRequest, error)

func ParseMRs

func ParseMRs(json_str []byte) []MergeRequest

type Tag

type Tag struct {
	Name      string `json:"name"`
	Message   string `json:"message"`
	Protected bool   `json:"protected"`
	Target    string `json:"target"`
	Url       string `json:"web_url"`
	Commit    Commit `json:"commit"`
}

func ParseTags

func ParseTags(json_str []byte) []Tag

type User

type User struct {
	Id       int    `json:"id"`
	Name     string `json:"name"`
	UserName string `json:"username"`
	State    string `json:"state"`
	Url      string `json:"web_url"`
}

Jump to

Keyboard shortcuts

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