github

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoReleases = errors.New("no releases found")

ErrNoReleases indicates no releases exist for the repository

View Source
var ErrRateLimited = errors.New("GitHub API rate limit exceeded")

ErrRateLimited is returned when the GitHub API rate limit is exceeded.

Functions

func AddLabel

func AddLabel(repo string, issueNumber int, label string) error

func GetToken

func GetToken() (string, error)

func PRExistsForIssue

func PRExistsForIssue(repo string, issueNumber int) (bool, error)

func VerifyPRExists

func VerifyPRExists(repo string, issueNumber, pid int) (bool, error)

VerifyPRExists checks if a PR exists with the expected branch name pattern

Types

type Issue

type Issue struct {
	Number int     `json:"number"`
	Title  string  `json:"title"`
	Body   string  `json:"body"`
	Labels []Label `json:"labels"`
}

func ListIssues

func ListIssues(repo, label string) ([]Issue, error)

type IssueDetails

type IssueDetails struct {
	Body  string `json:"body"`
	State string `json:"state"`
}

func GetIssueDetails

func GetIssueDetails(repo string, number int) (*IssueDetails, error)

type Label

type Label struct {
	Name string `json:"name"`
}

type PullRequest

type PullRequest struct {
	Number      int    `json:"number"`
	HeadRefName string `json:"headRefName"`
}

type Release

type Release struct {
	TagName string `json:"tag_name"`
	Name    string `json:"name"`
}

func GetLatestRelease

func GetLatestRelease(repo string) (*Release, error)

GetLatestRelease fetches the latest release from GitHub

Jump to

Keyboard shortcuts

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