repository

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBackportIssues

func CreateBackportIssues(ctx context.Context, client *github.Client, origIssue *github.Issue, repo, branch string, i *Issue) (*github.Issue, error)

CreateBackportIssues

func CreateRelease added in v0.11.0

func CreateRelease(ctx context.Context, client *github.Client, cro *CreateReleaseOpts) (*github.RepositoryRelease, error)

CreateRelease

func CreateReleaseIssue added in v0.11.0

func CreateReleaseIssue(ctx context.Context, client *github.Client, cri *CreateReleaseIssueOpts) (*github.Issue, error)

CreateReleaseIssue

func IsValidRepo

func IsValidRepo(repo string) bool

IsValidRepo determines if the given repository is valid for this program to operate against.

func NewGithub

func NewGithub(ctx context.Context, token string) *github.Client

NewGithub creates a value of type github.Client pointer with the given context and Github token.

func OrgFromRepo

func OrgFromRepo(repo string) (string, error)

OrgFromRepo gets the Github organization that the given repository is in or returns an error if it is not found.

func PerformBackport added in v0.11.0

func PerformBackport(ctx context.Context, client *github.Client, pbo *PerformBackportOpts) ([]*github.Issue, error)

PerformBackport

func RetrieveOriginalIssue

func RetrieveOriginalIssue(ctx context.Context, client *github.Client, repo string, issueID uint) (*github.Issue, error)

RetrieveOriginalIssue

Types

type ChangeLog

type ChangeLog struct {
	Title  string
	Note   string
	Number int
	URL    string
}

ChangeLog contains the found changes for the given release, to be used in to populate the template.

func RetrieveChangeLogContents

func RetrieveChangeLogContents(ctx context.Context, client *github.Client, repo, prevMilestone, milestone string) ([]ChangeLog, error)

RetrieveChangeLogContents gets the relevant changes for the given release, formats, and returns them.

type CreateReleaseIssueOpts added in v0.11.0

type CreateReleaseIssueOpts struct {
	Repo    string
	Release string
	Captain string
}

CreateReleaseIssueOpts

type CreateReleaseOpts added in v0.11.0

type CreateReleaseOpts struct {
	Repo       string
	Name       string
	Prerelease bool
	Branch     string
}

CreateReleaseOpts

type Issue

type Issue struct {
	ID    uint
	Title string
	Body  string
}

type PerformBackportOpts added in v0.11.0

type PerformBackportOpts struct {
	Repo     string `json:"repo"`
	CommitID string `json:"commit_id"`
	IssueID  uint   `json:"issue_id"`
	Branches string `json:"branches"`
}

PerformBackportOpts

type TokenSource

type TokenSource struct {
	AccessToken string
}

TokenSource

func (*TokenSource) Token

func (t *TokenSource) Token() (*oauth2.Token, error)

Token

Jump to

Keyboard shortcuts

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