github

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApprovePR

func ApprovePR(repo string, number int) error

ApprovePR approves a pull request

func GetClient

func GetClient() (*api.RESTClient, error)

GetClient returns a GitHub REST API client

func GetCurrentRepo

func GetCurrentRepo() (string, error)

GetCurrentRepo gets the current repository from cwd

func GetPRHead

func GetPRHead(repo string, number int) (string, error)

GetPRHead fetches the HEAD SHA for a PR (useful when SearchPRs doesn't return it)

func GroupPRs

func GroupPRs(prs []types.PR, customPatterns []string) map[string][]types.PR

GroupPRs groups PRs by package@version

func ListRepos

func ListRepos(org string) ([]string, error)

ListRepos fetches all repositories for an organization

func MergeViaDependabot

func MergeViaDependabot(repo string, number int, method string) error

MergeViaDependabot posts a dependabot merge comment

func MergeViaPR

func MergeViaPR(repo string, number int, method string) error

MergeViaPR merges a PR via GitHub API

func SearchPRs

func SearchPRs(params SearchParams) ([]types.PR, error)

SearchPRs searches for PRs based on the given parameters

Types

type CheckStatus

type CheckStatus struct {
	State     string // success, pending, failure, error
	AllPassed bool
}

CheckStatus represents CI status

func GetCIStatus

func GetCIStatus(repo string, sha string) (*CheckStatus, error)

GetCIStatus checks the CI status for a PR

type SearchParams added in v0.5.0

type SearchParams struct {
	Owner           string
	Repos           []string
	Label           string
	Author          string
	Limit           int
	ReviewRequested string
	Archived        bool
}

Jump to

Keyboard shortcuts

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