githuborg

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(path string) (map[string]Repo, error)

Types

type Collaborator

type Collaborator struct {
	Login *string `json:"login,omitempty"`
	Name  *string `json:"name,omitempty"`

	// Permissions identifies the permissions that a user has on a given
	// repository. This is only populated when calling Repositories.ListCollaborators.
	Permissions map[string]bool `json:"permissions,omitempty"`
}

type GithubOrg

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

func GetClient

func GetClient(accessToken string, organization string) GithubOrg

func (GithubOrg) GetOutOfSyncRepos

func (org GithubOrg) GetOutOfSyncRepos() ([]Repo, error)

func (GithubOrg) GetRepo

func (org GithubOrg) GetRepo(reponame string) (*Repo, error)

func (GithubOrg) GetRepos

func (org GithubOrg) GetRepos() ([]*Repo, error)

func (GithubOrg) GetRepositories

func (org GithubOrg) GetRepositories() ([]*github.Repository, error)

func (GithubOrg) GetRepository

func (org GithubOrg) GetRepository(reponame string) (*github.Repository, error)

func (GithubOrg) ListCollaborators

func (org GithubOrg) ListCollaborators(repo string) ([]*Collaborator, error)

func (GithubOrg) ListTeams

func (org GithubOrg) ListTeams(repo string) ([]*Team, error)

func (GithubOrg) Sync

func (org GithubOrg) Sync(repo *github.Repository) error

func (GithubOrg) SyncTopics

func (org GithubOrg) SyncTopics(repo *github.Repository) error

type JsonRepo

type JsonRepo struct {
	Name string
	Repo
}

type Repo

type Repo struct {
	Name          *string `json:"name,omitempty"`
	Description   *string `json:"description,omitempty"`
	Homepage      *string `json:"homepage,omitempty"`
	DefaultBranch *string `json:"default_branch,omitempty"`

	Private     *bool   `json:"private,omitempty"`
	Visibility  *string `json:"visibility,omitempty"`
	HasIssues   *bool   `json:"has_issues,omitempty"`
	HasProjects *bool   `json:"has_projects,omitempty"`
	HasWiki     *bool   `json:"has_wiki,omitempty"`
	IsTemplate  *bool   `json:"is_template,omitempty"`

	Teams         []*Team         `json:"teams,omitempty"`
	Collaborators []*Collaborator `json:"collaborators,omitempty"`
	Topics        []string        `json:"topics,omitempty"`
	Archived      *bool           `json:"archived,omitempty"`
	Disabled      *bool           `json:"disabled,omitempty"`

	// Creating an organization repository. Required for non-owners.
	TeamID *int64 `json:"team_id,omitempty"`

	AutoInit            *bool   `json:"auto_init,omitempty"`
	GitignoreTemplate   *string `json:"gitignore_template,omitempty"`
	LicenseTemplate     *string `json:"license_template,omitempty"`
	AllowSquashMerge    *bool   `json:"allow_squash_merge,omitempty"`
	AllowMergeCommit    *bool   `json:"allow_merge_commit,omitempty"`
	AllowRebaseMerge    *bool   `json:"allow_rebase_merge,omitempty"`
	AllowAutoMerge      *bool   `json:"allow_auto_merge,omitempty"`
	DeleteBranchOnMerge *bool   `json:"delete_branch_on_merge,omitempty"`
}

func RepositoryToRepo

func RepositoryToRepo(repo *github.Repository) *Repo

func (Repo) InSync

func (r Repo) InSync(org GithubOrg) (bool, *github.Repository, error)

func (Repo) Reconcile

func (r Repo) Reconcile(org GithubOrg) error

func (Repo) String

func (r Repo) String() string

type Team

type Team struct {
	Name       *string `json:"name, omitempty"`
	Slug       *string `json:"slug,omitempty"`
	ID         *int64  `json:"id,omitempty"`
	Permission *string `json:"permission,omitempty"`
}

Jump to

Keyboard shortcuts

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