github

package
v0.0.0-...-9ca32b3 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseRepositoryURL

func ParseRepositoryURL(url string) (owner, repo string, err error)

ParseRepositoryURL はGitHub URLからowner/repoを抽出

Types

type BranchProtectionSettings

type BranchProtectionSettings struct {
	Branch                  string
	RequiredStatusChecks    []string
	RequiredReviews         int
	DismissStaleReviews     bool
	RequireCodeOwnerReviews bool
	RestrictPushes          bool
}

BranchProtectionSettings はブランチ保護設定

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client はGitHub API操作を行う

func NewClient

func NewClient(config Config) (*Client, error)

NewClient は新しいGitHub APIクライアントを作成

func (*Client) SetupRepository

func (c *Client) SetupRepository(settings *RepositorySettings) error

SetupRepository はリポジトリの基本設定を行う

type Config

type Config struct {
	Token string
	Owner string
	Repo  string
}

Config はGitHub API設定

type LabelConfig

type LabelConfig struct {
	Name        string
	Color       string
	Description string
}

LabelConfig はラベル設定

func GetDefaultLabels

func GetDefaultLabels() []LabelConfig

GetDefaultLabels はデフォルトラベル設定を返す

type RepositorySettings

type RepositorySettings struct {
	BranchProtection    BranchProtectionSettings
	Labels              []LabelConfig
	RequiredReviews     int
	StatusChecks        []string
	AutoMerge           bool
	DeleteBranchOnMerge bool
}

RepositorySettings はリポジトリ設定

Jump to

Keyboard shortcuts

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