repository

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 12 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, user 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 ListReleases added in v0.21.0

func ListReleases(ctx context.Context, client *github.Client, repo string) ([]*github.RepositoryRelease, error)

ListReleases

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 creates backport issues, performs a cherry-pick of the given commit if it exists.

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 `json:"repo"`
	Name         string `json:"name"`
	Prerelease   bool   `json:"pre_release"`
	Branch       string `json:"branch"`
	ReleaseNotes string `json:"release_notes"`
	Draft        bool   `json:"draft"`
}

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"`
	Commits  []string `json:"commits"`
	IssueID  uint     `json:"issue_id"`
	Branches string   `json:"branches"`
	User     string   `json:"user"`
}

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