gerrit

package
v0.0.0-...-75ad633 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change struct {
	Project       string `json:"project"`
	Branch        string `json:"branch"`
	ID            string `json:"id"`
	Subject       string `json:"subject"`
	CommitMessage string `json:"commitMessage"`
	URL           string `json:"url"`
}

@link https://review.typo3.org/Documentation/json.html#change

type ChangeInfo

type ChangeInfo struct {
	CurrentRevision string `json:"current_revision"`
	Revisions       map[string]RevisionInfo
	Status          string `json:"status"`
}

@link https://review.typo3.org/Documentation/rest-api-changes.html#change-info

type GerritInstance

type GerritInstance struct {
	URL      string
	Username string
	Password string
	Template string
}

func NewGerritClient

func NewGerritClient(c *config.GerritConfiguration) *GerritInstance

NewGerritInstance returns a new Gerrit instance

func (GerritInstance) GetChangeInformation

func (g GerritInstance) GetChangeInformation(changeID string) (*ChangeInfo, error)

func (GerritInstance) IsPatchsetTheCurrentPatchset

func (g GerritInstance) IsPatchsetTheCurrentPatchset(change *ChangeInfo, patchsetNumber uint) (bool, error)

type Message

type Message struct {
	Type     string   `json:"type"`
	Change   Change   `json:"change"`
	Patchset Patchset `json:"patchSet"`
}

@link https://review.typo3.org/Documentation/cmd-stream-events.html#events

type Patchset

type Patchset struct {
	Ref      string `json:"ref"`
	Revision string `json:"revision"`
	Number   uint   `json:"number,string"`
}

@link https://review.typo3.org/Documentation/json.html#patchSet

type ReviewInput

type ReviewInput struct {
	Message string         `json:"message"`
	Labels  map[string]int `json:"labels"`
}

https://review.typo3.org/Documentation/rest-api-changes.html#review-input

type RevisionInfo

type RevisionInfo struct {
	Number uint `json:"_number"`
}

@link https://review.typo3.org/Documentation/rest-api-changes.html#revision-info

Jump to

Keyboard shortcuts

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