api

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MilestoneFields = []string{
	"url",
	"id",
	"number",
	"state",
	"title",
	"description",
	"creator",
	"openIssues",
	"closedIssues",
	"createdAt",
	"updatedAt",
	"closedAt",
	"dueOn",
}

Functions

func CloseMilestone

func CloseMilestone(ctx context.Context, opts CloseMilestoneOptions) (*github.Milestone, error)

func ConvertMilestoneToMap

func ConvertMilestoneToMap(milestone *github.Milestone, fields []string) map[string]any

func CreateMilestone added in v0.1.0

func CreateMilestone(ctx context.Context, opts CreateMilestoneOptions) (*github.Milestone, error)

func FetchOwnerAndRepoFromURL added in v0.0.5

func FetchOwnerAndRepoFromURL(url *url.URL) (*string, *string, error)

func GetMilestone

func GetMilestone(ctx context.Context, repo ghrepo.Interface, number int) (*github.Milestone, error)

func GetMilestoneByURL

func GetMilestoneByURL(ctx context.Context, url *url.URL) (*github.Milestone, error)

func Milestones

func Milestones(ctx context.Context, repo ghrepo.Interface, filterOpts FilterOptions) ([]*github.Milestone, error)

func ReopenMilestone added in v0.0.5

func ReopenMilestone(ctx context.Context, opts ReopenMilestoneOptions) (*github.Milestone, error)

func WithBaseURL

func WithBaseURL(baseURL string) clientOption

func WithToken

func WithToken(token string) clientOption

Types

type CloseMilestoneOptions

type CloseMilestoneOptions struct {
	IO        *iostreams.IOStreams
	Repo      ghrepo.Interface
	Milestone *github.Milestone
}

type CreateMilestoneOptions added in v0.1.0

type CreateMilestoneOptions struct {
	IO    *iostreams.IOStreams
	Repo  ghrepo.Interface
	State *iMilestone.MilestoneMetadataState
}

type FilterOptions

type FilterOptions struct {
	Author     string
	BaseBranch string
	Fields     []string
	Repo       string
	Search     string
	State      string
}

type ReopenMilestoneOptions added in v0.0.5

type ReopenMilestoneOptions struct {
	IO        *iostreams.IOStreams
	Repo      ghrepo.Interface
	Milestone *github.Milestone
}

Jump to

Keyboard shortcuts

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