Documentation

Index

Examples

Constants

View Source
const (
	// NoPermission means the user has no permission to access the repository
	NoPermission = "none"
	// ReadPermission means the user has read access to the repository
	ReadPermission = "read"
	// WritePermission means the user has write/push access to the repository
	WritePermission = "write"
	// AdminPermission means the user has full admin access to the repository
	AdminPermission = "admin"
)
View Source
const (
	// ReviewStateApproved is used for approved reviews
	ReviewStateApproved string = "APPROVED"
	// ReviewStateChangesRequested is used for reviews with changes requested
	ReviewStateChangesRequested string = "CHANGES_REQUESTED"
	// ReviewStateCommented is used for reviews with comments
	ReviewStateCommented string = "COMMENTED"
	// ReviewStateDismissed is used for reviews that have been dismissed
	ReviewStateDismissed string = "DISMISSED"
	// ReviewStatePending is used for reviews that are awaiting response
	ReviewStatePending string = "PENDING"
)
View Source
const EmptyCommit = "0000000000000000000000000000000000000000"

    EmptyCommit is an empty commit sha.

    View Source
    const SearchTimeFormat = "2006-01-02T15:04:05Z"

      SearchTimeFormat is a time.Time format string for ISO8601 which is the format that GitHub requires for times specified as part of a search query.

      Variables

      View Source
      var (
      	// ErrNotFound indicates a resource is not found.
      	ErrNotFound = errors.New("Not Found")
      
      	// ErrNotSupported indicates a resource endpoint is not
      	// supported or implemented.
      	ErrNotSupported = errors.New("Not Supported")
      
      	// ErrNotAuthorized indicates the request is not
      	// authorized or the user does not have access to the
      	// resource.
      	ErrNotAuthorized = errors.New("Not Authorized")
      
      	// ErrForbidden indicates the user does not have access to
      	// the resource, this is similar to 401, but in this case,
      	// re-authenticating will make no difference.
      	ErrForbidden = errors.New("Forbidden")
      )
      View Source
      var (
      	// ErrSignatureInvalid is returned when the webhook
      	// signature is invalid or cannot be calculated.
      	ErrSignatureInvalid = errors.New("Invalid webhook signature")
      )

      Functions

      func ExpandRef

      func ExpandRef(name, prefix string) string

        ExpandRef returns name expanded to the fully qualified reference path (e.g refs/heads/master).

        func IsScmNotFound

        func IsScmNotFound(err error) bool

          IsScmNotFound returns true if the resource is not found

          func IsTag

          func IsTag(ref string) bool

            IsTag returns true if the reference path points to a tag object.

            func IsUnknownWebhook

            func IsUnknownWebhook(err error) bool

              IsUnknownWebhook returns true if the error is an unknown webhook

              func Join

              func Join(owner, name string) string

                Join joins the repository owner and name segments to create a fully qualified repository name.

                func Split

                func Split(s string) (owner, name string)

                  Split splits the full repository name into segments.

                  func TrimRef

                  func TrimRef(ref string) string

                    TrimRef returns ref without the path prefix.

                    func URLJoin

                    func URLJoin(paths ...string) string

                      URLJoin joins the given paths so that there is only ever one '/' character between the paths

                      func WithContext

                      func WithContext(parent context.Context, token *Token) context.Context

                        WithContext returns a copy of parent in which the token value is set

                        Types

                        type Account

                        type Account struct {
                        	ID    int
                        	Login string
                        	Link  string
                        }

                          Account represents the account of a GitHub app install

                          type Action

                          type Action int

                            Action identifies webhook actions.

                            const (
                            	ActionCreate Action = iota + 1
                            	ActionUpdate
                            	ActionDelete
                            	// issues
                            	ActionOpen
                            	ActionReopen
                            	ActionClose
                            	ActionLabel
                            	ActionUnlabel
                            	// pull requests
                            	ActionSync
                            	ActionMerge
                            	ActionAssigned
                            	ActionUnassigned
                            	ActionReviewRequested
                            	ActionReviewRequestRemoved
                            	ActionReadyForReview
                            	ActionConvertedToDraft
                            
                            	// reviews
                            	ActionEdited
                            	ActionSubmitted
                            	ActionDismissed
                            
                            	// check run / check suite
                            	ActionCompleted
                            )

                              Action values.

                              func (Action) MarshalJSON

                              func (a Action) MarshalJSON() ([]byte, error)

                                MarshalJSON returns the JSON-encoded Action.

                                func (Action) String

                                func (a Action) String() (s string)

                                  String returns the string representation of Action.

                                  func (*Action) UnmarshalJSON

                                  func (a *Action) UnmarshalJSON(data []byte) error

                                    UnmarshalJSON unmarshales the JSON-encoded Action.

                                    type AppService

                                    type AppService interface {
                                    	CreateInstallationToken(ctx context.Context, id int64) (*InstallationToken, *Response, error)
                                    
                                    	GetRepositoryInstallation(ctx context.Context, fullName string) (*Installation, *Response, error)
                                    
                                    	GetOrganisationInstallation(ctx context.Context, organisation string) (*Installation, *Response, error)
                                    
                                    	GetUserInstallation(ctx context.Context, user string) (*Installation, *Response, error)
                                    }

                                      AppService for GitHub App support

                                      type BranchHook

                                      type BranchHook struct {
                                      	Ref          Reference
                                      	Repo         Repository
                                      	Action       Action
                                      	Sender       User
                                      	Installation *InstallationRef
                                      }

                                        BranchHook represents a branch or tag event, eg create and delete github event types.

                                        func (*BranchHook) GetInstallationRef

                                        func (h *BranchHook) GetInstallationRef() *InstallationRef

                                          GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                          func (*BranchHook) Kind

                                          func (h *BranchHook) Kind() WebhookKind

                                            Kind returns the kind of webhook

                                            func (*BranchHook) Repository

                                            func (h *BranchHook) Repository() Repository

                                              Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                              type Change

                                              type Change struct {
                                              	Path         string
                                              	PreviousPath string
                                              	Added        bool
                                              	Renamed      bool
                                              	Deleted      bool
                                              	Patch        string
                                              	Additions    int
                                              	Deletions    int
                                              	Changes      int
                                              	BlobURL      string
                                              	Sha          string
                                              }

                                                Change represents a changed file.

                                                type CheckRunHook

                                                type CheckRunHook struct {
                                                	Action       Action
                                                	Repo         Repository
                                                	Sender       User
                                                	Label        Label
                                                	Installation *InstallationRef
                                                }

                                                  CheckRunHook represents a check run event

                                                  func (*CheckRunHook) GetInstallationRef

                                                  func (h *CheckRunHook) GetInstallationRef() *InstallationRef

                                                    GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                    func (*CheckRunHook) Kind

                                                    func (h *CheckRunHook) Kind() WebhookKind

                                                      Kind returns the kind of webhook

                                                      func (*CheckRunHook) Repository

                                                      func (h *CheckRunHook) Repository() Repository

                                                        Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                        type CheckSuiteHook

                                                        type CheckSuiteHook struct {
                                                        	Action       Action
                                                        	Repo         Repository
                                                        	Sender       User
                                                        	Label        Label
                                                        	Installation *InstallationRef
                                                        }

                                                          CheckSuiteHook represents a check suite event

                                                          func (*CheckSuiteHook) GetInstallationRef

                                                          func (h *CheckSuiteHook) GetInstallationRef() *InstallationRef

                                                            GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                            func (*CheckSuiteHook) Kind

                                                            func (h *CheckSuiteHook) Kind() WebhookKind

                                                              Kind returns the kind of webhook

                                                              func (*CheckSuiteHook) Repository

                                                              func (h *CheckSuiteHook) Repository() Repository

                                                                Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                type Client

                                                                type Client struct {
                                                                
                                                                	// HTTP client used to communicate with the API.
                                                                	Client *http.Client
                                                                
                                                                	// Base URL for API requests.
                                                                	BaseURL    *url.URL
                                                                	GraphQLURL *url.URL
                                                                
                                                                	// Username is the optional user name for the client
                                                                	Username string
                                                                
                                                                	// Services used for communicating with the API.
                                                                	Driver        Driver
                                                                	Apps          AppService
                                                                	Contents      ContentService
                                                                	Deployments   DeploymentService
                                                                	Git           GitService
                                                                	GraphQL       GraphQLService
                                                                	Organizations OrganizationService
                                                                	Issues        IssueService
                                                                	Milestones    MilestoneService
                                                                	Releases      ReleaseService
                                                                	PullRequests  PullRequestService
                                                                	Repositories  RepositoryService
                                                                	Reviews       ReviewService
                                                                	Users         UserService
                                                                	Webhooks      WebhookService
                                                                
                                                                	// DumpResponse optionally specifies a function to
                                                                	// dump the the response body for debugging purposes.
                                                                	// This can be set to httputil.DumpResponse.
                                                                	DumpResponse func(*http.Response, bool) ([]byte, error)
                                                                	// contains filtered or unexported fields
                                                                }

                                                                  Client manages communication with a version control system API.

                                                                  Example
                                                                  Output:
                                                                  
                                                                  

                                                                  func (*Client) Do

                                                                  func (c *Client) Do(ctx context.Context, in *Request) (*Response, error)

                                                                    Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response will be written to v, without attempting to decode it.

                                                                    func (*Client) Rate

                                                                    func (c *Client) Rate() Rate

                                                                      Rate returns a snapshot of the request rate limit for the current client.

                                                                      func (*Client) SetRate

                                                                      func (c *Client) SetRate(rate Rate)

                                                                        SetRate set the last recorded request rate limit for the current client.

                                                                        type CombinedStatus

                                                                        type CombinedStatus struct {
                                                                        	State    State
                                                                        	Sha      string
                                                                        	Statuses []*Status
                                                                        }

                                                                          CombinedStatus is the latest statuses for a ref.

                                                                          type Comment

                                                                          type Comment struct {
                                                                          	ID      int
                                                                          	Body    string
                                                                          	Author  User
                                                                          	Link    string
                                                                          	Version int
                                                                          	Created time.Time
                                                                          	Updated time.Time
                                                                          }

                                                                            Comment represents a comment.

                                                                            Example (Create)
                                                                            Output:
                                                                            
                                                                            
                                                                            Example (Find)
                                                                            Output:
                                                                            
                                                                            
                                                                            Example (List)
                                                                            Output:
                                                                            
                                                                            

                                                                            type CommentInput

                                                                            type CommentInput struct {
                                                                            	Body string
                                                                            }

                                                                              CommentInput provides the input fields required for creating an issue comment.

                                                                              type Commit

                                                                              type Commit struct {
                                                                              	Sha       string
                                                                              	Message   string
                                                                              	Tree      CommitTree
                                                                              	Author    Signature
                                                                              	Committer Signature
                                                                              	Link      string
                                                                              }

                                                                                Commit represents a repository commit.

                                                                                Example (Changes)
                                                                                Output:
                                                                                
                                                                                
                                                                                Example (Find)
                                                                                Output:
                                                                                
                                                                                
                                                                                Example (List)
                                                                                Output:
                                                                                
                                                                                
                                                                                Example (ListOnBranch)
                                                                                Output:
                                                                                
                                                                                

                                                                                type CommitListOptions

                                                                                type CommitListOptions struct {
                                                                                	Ref  string
                                                                                	Sha  string
                                                                                	Page int
                                                                                	Size int
                                                                                }

                                                                                  CommitListOptions provides options for querying a list of repository commits.

                                                                                  type CommitTree

                                                                                  type CommitTree struct {
                                                                                  	Sha  string
                                                                                  	Link string
                                                                                  }

                                                                                    CommitTree represents a commit tree

                                                                                    type Content

                                                                                    type Content struct {
                                                                                    	Path string
                                                                                    	Data []byte
                                                                                    	Sha  string
                                                                                    }

                                                                                      Content stores the contents of a repository file.

                                                                                      Example (Find)
                                                                                      Output:
                                                                                      
                                                                                      

                                                                                      type ContentParams

                                                                                      type ContentParams struct {
                                                                                      	Ref     string
                                                                                      	Branch  string
                                                                                      	Message string
                                                                                      	Data    []byte
                                                                                      	Sha     string
                                                                                      }

                                                                                        ContentParams provide parameters for creating and updating repository content.

                                                                                        type ContentService

                                                                                        type ContentService interface {
                                                                                        	// Find returns the repository file content by path.
                                                                                        	Find(ctx context.Context, repo, path, ref string) (*Content, *Response, error)
                                                                                        
                                                                                        	// Lists the files or directories at the given path
                                                                                        	List(ctx context.Context, repo, path, ref string) ([]*FileEntry, *Response, error)
                                                                                        
                                                                                        	// Create creates a new repository file.
                                                                                        	Create(ctx context.Context, repo, path string, params *ContentParams) (*Response, error)
                                                                                        
                                                                                        	// Update updates a repository file.
                                                                                        	Update(ctx context.Context, repo, path string, params *ContentParams) (*Response, error)
                                                                                        
                                                                                        	// Delete deletes a reository file.
                                                                                        	Delete(ctx context.Context, repo, path, ref string) (*Response, error)
                                                                                        }

                                                                                          ContentService provides access to repositroy content.

                                                                                          type DeployHook

                                                                                          type DeployHook struct {
                                                                                          	Deployment   Deployment
                                                                                          	Action       Action
                                                                                          	Ref          Reference
                                                                                          	Repo         Repository
                                                                                          	Sender       User
                                                                                          	Label        Label
                                                                                          	Installation *InstallationRef
                                                                                          }

                                                                                            DeployHook represents a deployment event. This is currently a GitHub-specific event type.

                                                                                            func (*DeployHook) GetInstallationRef

                                                                                            func (h *DeployHook) GetInstallationRef() *InstallationRef

                                                                                              GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                              func (*DeployHook) Kind

                                                                                              func (h *DeployHook) Kind() WebhookKind

                                                                                                Kind returns the kind of webhook

                                                                                                func (*DeployHook) Repository

                                                                                                func (h *DeployHook) Repository() Repository

                                                                                                  Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                  type Deployment

                                                                                                  type Deployment struct {
                                                                                                  	ID                    string
                                                                                                  	Namespace             string
                                                                                                  	Name                  string
                                                                                                  	Link                  string
                                                                                                  	Sha                   string
                                                                                                  	Ref                   string
                                                                                                  	Task                  string
                                                                                                  	FullName              string
                                                                                                  	Description           string
                                                                                                  	OriginalEnvironment   string
                                                                                                  	Environment           string
                                                                                                  	RepositoryLink        string
                                                                                                  	StatusLink            string
                                                                                                  	Author                *User
                                                                                                  	Created               time.Time
                                                                                                  	Updated               time.Time
                                                                                                  	TransientEnvironment  bool
                                                                                                  	ProductionEnvironment bool
                                                                                                  	Payload               interface{}
                                                                                                  }

                                                                                                    Deployment represents a request to deploy a version/ref/sha in some environment

                                                                                                    type DeploymentInput

                                                                                                    type DeploymentInput struct {
                                                                                                    	Ref                   string
                                                                                                    	Task                  string
                                                                                                    	Payload               string
                                                                                                    	Environment           string
                                                                                                    	Description           string
                                                                                                    	RequiredContexts      []string
                                                                                                    	AutoMerge             bool
                                                                                                    	TransientEnvironment  bool
                                                                                                    	ProductionEnvironment bool
                                                                                                    }

                                                                                                      DeploymentInput the input to create a new deployment

                                                                                                      type DeploymentService

                                                                                                      type DeploymentService interface {
                                                                                                      	// Find find a deployment by id.
                                                                                                      	Find(ctx context.Context, repoFullName string, deploymentID string) (*Deployment, *Response, error)
                                                                                                      
                                                                                                      	// List returns a list of deployments.
                                                                                                      	List(ctx context.Context, repoFullName string, opts ListOptions) ([]*Deployment, *Response, error)
                                                                                                      
                                                                                                      	// Create creates a new deployment.
                                                                                                      	Create(ctx context.Context, repoFullName string, deployment *DeploymentInput) (*Deployment, *Response, error)
                                                                                                      
                                                                                                      	// Delete deletes a deployment.
                                                                                                      	Delete(ctx context.Context, repoFullName string, deploymentID string) (*Response, error)
                                                                                                      
                                                                                                      	// FindStatus find a deployment status by id.
                                                                                                      	FindStatus(ctx context.Context, repoFullName string, deploymentID string, statusID string) (*DeploymentStatus, *Response, error)
                                                                                                      
                                                                                                      	// List returns a list of deployments.
                                                                                                      	ListStatus(ctx context.Context, repoFullName string, deploymentID string, options ListOptions) ([]*DeploymentStatus, *Response, error)
                                                                                                      
                                                                                                      	// Create creates a new deployment.
                                                                                                      	CreateStatus(ctx context.Context, repoFullName string, deploymentID string, deployment *DeploymentStatusInput) (*DeploymentStatus, *Response, error)
                                                                                                      }

                                                                                                        DeploymentService a service for working with deployments and deployment services

                                                                                                        type DeploymentStatus

                                                                                                        type DeploymentStatus struct {
                                                                                                        	ID              string
                                                                                                        	State           string
                                                                                                        	Author          *User
                                                                                                        	Description     string
                                                                                                        	Environment     string
                                                                                                        	DeploymentLink  string
                                                                                                        	EnvironmentLink string
                                                                                                        	LogLink         string
                                                                                                        	RepositoryLink  string
                                                                                                        	TargetLink      string
                                                                                                        	Created         time.Time
                                                                                                        	Updated         time.Time
                                                                                                        }

                                                                                                          DeploymentStatus represents the status of a deployment

                                                                                                          type DeploymentStatusHook

                                                                                                          type DeploymentStatusHook struct {
                                                                                                          	Deployment       Deployment
                                                                                                          	DeploymentStatus DeploymentStatus
                                                                                                          	Action           Action
                                                                                                          	Repo             Repository
                                                                                                          	Sender           User
                                                                                                          	Label            Label
                                                                                                          	Installation     *InstallationRef
                                                                                                          }

                                                                                                            DeploymentStatusHook represents a deployment status event. This is currently a GitHub-specific event type.

                                                                                                            func (*DeploymentStatusHook) GetInstallationRef

                                                                                                            func (h *DeploymentStatusHook) GetInstallationRef() *InstallationRef

                                                                                                              GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                              func (*DeploymentStatusHook) Kind

                                                                                                                Kind returns the kind of webhook

                                                                                                                func (*DeploymentStatusHook) Repository

                                                                                                                func (h *DeploymentStatusHook) Repository() Repository

                                                                                                                  Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                  type DeploymentStatusInput

                                                                                                                  type DeploymentStatusInput struct {
                                                                                                                  	State           string
                                                                                                                  	TargetLink      string
                                                                                                                  	LogLink         string
                                                                                                                  	Description     string
                                                                                                                  	Environment     string
                                                                                                                  	EnvironmentLink string
                                                                                                                  	AutoInactive    bool
                                                                                                                  }

                                                                                                                    DeploymentStatusInput the input to creating a status of a deployment

                                                                                                                    type Driver

                                                                                                                    type Driver int

                                                                                                                      Driver identifies source code management driver.

                                                                                                                      const (
                                                                                                                      	DriverUnknown Driver = iota
                                                                                                                      	DriverGithub
                                                                                                                      	DriverGitlab
                                                                                                                      	DriverGogs
                                                                                                                      	DriverGitea
                                                                                                                      	DriverBitbucket
                                                                                                                      	DriverStash
                                                                                                                      	DriverCoding
                                                                                                                      	DriverFake
                                                                                                                      )

                                                                                                                        Driver values.

                                                                                                                        func (Driver) String

                                                                                                                        func (d Driver) String() (s string)

                                                                                                                          String returns the string representation of Driver.

                                                                                                                          type ExtraUsers

                                                                                                                          type ExtraUsers struct {
                                                                                                                          	Users  []string
                                                                                                                          	Action string
                                                                                                                          }

                                                                                                                            ExtraUsers is an error specifying the users that could not be unassigned.

                                                                                                                            func (ExtraUsers) Error

                                                                                                                            func (e ExtraUsers) Error() string

                                                                                                                            type FileEntry

                                                                                                                            type FileEntry struct {
                                                                                                                            	Name string
                                                                                                                            	Path string
                                                                                                                            	Type string
                                                                                                                            	Size int
                                                                                                                            	Sha  string
                                                                                                                            	Link string
                                                                                                                            }

                                                                                                                              FileEntry returns the details of a file

                                                                                                                              type ForkHook

                                                                                                                              type ForkHook struct {
                                                                                                                              	Repo         Repository
                                                                                                                              	Sender       User
                                                                                                                              	Installation *InstallationRef
                                                                                                                              }

                                                                                                                                ForkHook represents a fork event

                                                                                                                                func (*ForkHook) GetInstallationRef

                                                                                                                                func (h *ForkHook) GetInstallationRef() *InstallationRef

                                                                                                                                  GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                  func (*ForkHook) Kind

                                                                                                                                  func (h *ForkHook) Kind() WebhookKind

                                                                                                                                    Kind returns the kind of webhook

                                                                                                                                    func (*ForkHook) Repository

                                                                                                                                    func (h *ForkHook) Repository() Repository

                                                                                                                                      Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                      type GitService

                                                                                                                                      type GitService interface {
                                                                                                                                      	// FindBranch finds a git branch by name.
                                                                                                                                      	FindBranch(ctx context.Context, repo, name string) (*Reference, *Response, error)
                                                                                                                                      
                                                                                                                                      	// FindCommit finds a git commit by ref.
                                                                                                                                      	FindCommit(ctx context.Context, repo, ref string) (*Commit, *Response, error)
                                                                                                                                      
                                                                                                                                      	// FindTag finds a git tag by name.
                                                                                                                                      	FindTag(ctx context.Context, repo, name string) (*Reference, *Response, error)
                                                                                                                                      
                                                                                                                                      	// ListBranches returns a list of git branches.
                                                                                                                                      	ListBranches(ctx context.Context, repo string, opts ListOptions) ([]*Reference, *Response, error)
                                                                                                                                      
                                                                                                                                      	// ListCommits returns a list of git commits.
                                                                                                                                      	ListCommits(ctx context.Context, repo string, opts CommitListOptions) ([]*Commit, *Response, error)
                                                                                                                                      
                                                                                                                                      	// ListChanges returns the changeset between a commit and its parent.
                                                                                                                                      	ListChanges(ctx context.Context, repo, ref string, opts ListOptions) ([]*Change, *Response, error)
                                                                                                                                      
                                                                                                                                      	// ListChanges returns the changeset between two commits.
                                                                                                                                      	CompareCommits(ctx context.Context, repo, ref1, ref2 string, opts ListOptions) ([]*Change, *Response, error)
                                                                                                                                      
                                                                                                                                      	// ListTags returns a list of git tags.
                                                                                                                                      	ListTags(ctx context.Context, repo string, opts ListOptions) ([]*Reference, *Response, error)
                                                                                                                                      
                                                                                                                                      	// FindRef returns the SHA of the given ref, such as "heads/master".
                                                                                                                                      	FindRef(ctx context.Context, repo, ref string) (string, *Response, error)
                                                                                                                                      
                                                                                                                                      	// DeleteRef deletes the given ref
                                                                                                                                      	DeleteRef(ctx context.Context, repo, ref string) (*Response, error)
                                                                                                                                      
                                                                                                                                      	// CreateRef creates a new ref
                                                                                                                                      	CreateRef(ctx context.Context, repo, ref, sha string) (*Reference, *Response, error)
                                                                                                                                      }

                                                                                                                                        GitService provides access to git resources.

                                                                                                                                        type GraphQLService

                                                                                                                                        type GraphQLService interface {
                                                                                                                                        	Query(ctx context.Context, q interface{}, vars map[string]interface{}) error
                                                                                                                                        }

                                                                                                                                          GraphQLService the API to performing GraphQL queries

                                                                                                                                          type Hook

                                                                                                                                          type Hook struct {
                                                                                                                                          	ID         string
                                                                                                                                          	Name       string
                                                                                                                                          	Target     string
                                                                                                                                          	Events     []string
                                                                                                                                          	Active     bool
                                                                                                                                          	SkipVerify bool
                                                                                                                                          }

                                                                                                                                            Hook represents a repository hook.

                                                                                                                                            Example (Create)
                                                                                                                                            Output:
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            Example (Find)
                                                                                                                                            Output:
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            Example (List)
                                                                                                                                            Output:
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            type HookEvents

                                                                                                                                            type HookEvents struct {
                                                                                                                                            	Branch             bool
                                                                                                                                            	Deployment         bool
                                                                                                                                            	DeploymentStatus   bool
                                                                                                                                            	Issue              bool
                                                                                                                                            	IssueComment       bool
                                                                                                                                            	PullRequest        bool
                                                                                                                                            	PullRequestComment bool
                                                                                                                                            	Push               bool
                                                                                                                                            	Review             bool
                                                                                                                                            	ReviewComment      bool
                                                                                                                                            	Tag                bool
                                                                                                                                            }

                                                                                                                                              HookEvents represents supported hook events.

                                                                                                                                              type HookInput

                                                                                                                                              type HookInput struct {
                                                                                                                                              	Name       string
                                                                                                                                              	Target     string
                                                                                                                                              	Secret     string
                                                                                                                                              	Events     HookEvents
                                                                                                                                              	SkipVerify bool
                                                                                                                                              
                                                                                                                                              	// NativeEvents are used to create hooks with
                                                                                                                                              	// provider-specific event types that cannot be
                                                                                                                                              	// abstracted or represented in HookEvents.
                                                                                                                                              	NativeEvents []string
                                                                                                                                              }

                                                                                                                                                HookInput provides the input fields required for creating or updating repository webhooks.

                                                                                                                                                type Installation

                                                                                                                                                type Installation struct {
                                                                                                                                                	ID                  int64
                                                                                                                                                	AppID               int64
                                                                                                                                                	TargetID            int64
                                                                                                                                                	TargetType          string
                                                                                                                                                	RepositorySelection string
                                                                                                                                                	Account             Account
                                                                                                                                                	AccessTokensLink    string
                                                                                                                                                	RepositoriesURL     string
                                                                                                                                                	Link                string
                                                                                                                                                	Events              []string
                                                                                                                                                	CreatedAt           *time.Time
                                                                                                                                                	UpdatedAt           *time.Time
                                                                                                                                                }

                                                                                                                                                  Installation represents a GitHub app install

                                                                                                                                                  type InstallationHook

                                                                                                                                                  type InstallationHook struct {
                                                                                                                                                  	Action       Action
                                                                                                                                                  	Repos        []*Repository
                                                                                                                                                  	Sender       User
                                                                                                                                                  	Installation *Installation
                                                                                                                                                  }

                                                                                                                                                    InstallationHook represents an installation of a GitHub App

                                                                                                                                                    func (*InstallationHook) GetInstallationRef

                                                                                                                                                    func (h *InstallationHook) GetInstallationRef() *InstallationRef

                                                                                                                                                      GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                                      func (*InstallationHook) Kind

                                                                                                                                                      func (h *InstallationHook) Kind() WebhookKind

                                                                                                                                                        Kind returns the kind of webhook

                                                                                                                                                        func (*InstallationHook) Repository

                                                                                                                                                        func (h *InstallationHook) Repository() Repository

                                                                                                                                                          Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                                          type InstallationRef

                                                                                                                                                          type InstallationRef struct {
                                                                                                                                                          	ID     int64
                                                                                                                                                          	NodeID string
                                                                                                                                                          }

                                                                                                                                                            InstallationRef references a GitHub app install on a webhook

                                                                                                                                                            type InstallationRepositoryHook

                                                                                                                                                            type InstallationRepositoryHook struct {
                                                                                                                                                            	Action              Action
                                                                                                                                                            	RepositorySelection string
                                                                                                                                                            	ReposAdded          []*Repository
                                                                                                                                                            	ReposRemoved        []*Repository
                                                                                                                                                            	Sender              User
                                                                                                                                                            	Installation        *Installation
                                                                                                                                                            }

                                                                                                                                                              InstallationRepositoryHook represents an installation of a GitHub App

                                                                                                                                                              func (*InstallationRepositoryHook) GetInstallationRef

                                                                                                                                                              func (h *InstallationRepositoryHook) GetInstallationRef() *InstallationRef

                                                                                                                                                                GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                                                func (*InstallationRepositoryHook) Kind

                                                                                                                                                                  Kind returns the kind of webhook

                                                                                                                                                                  func (*InstallationRepositoryHook) Repository

                                                                                                                                                                  func (h *InstallationRepositoryHook) Repository() Repository

                                                                                                                                                                    Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                                                    type InstallationToken

                                                                                                                                                                    type InstallationToken struct {
                                                                                                                                                                    	Token     string
                                                                                                                                                                    	ExpiresAt *time.Time
                                                                                                                                                                    }

                                                                                                                                                                      InstallationToken is the token used for interacting with the app

                                                                                                                                                                      type Invitation

                                                                                                                                                                      type Invitation struct {
                                                                                                                                                                      	ID          int64
                                                                                                                                                                      	Repo        *Repository
                                                                                                                                                                      	Invitee     *User
                                                                                                                                                                      	Inviter     *User
                                                                                                                                                                      	Permissions string
                                                                                                                                                                      	Link        string
                                                                                                                                                                      	Created     time.Time
                                                                                                                                                                      }

                                                                                                                                                                        Invitation represents a repo invitation

                                                                                                                                                                        type Issue

                                                                                                                                                                        type Issue struct {
                                                                                                                                                                        	Number      int
                                                                                                                                                                        	Title       string
                                                                                                                                                                        	Body        string
                                                                                                                                                                        	Link        string
                                                                                                                                                                        	State       string
                                                                                                                                                                        	Labels      []string
                                                                                                                                                                        	Closed      bool
                                                                                                                                                                        	Locked      bool
                                                                                                                                                                        	Author      User
                                                                                                                                                                        	Assignees   []User
                                                                                                                                                                        	ClosedBy    *User
                                                                                                                                                                        	PullRequest bool
                                                                                                                                                                        	Created     time.Time
                                                                                                                                                                        	Updated     time.Time
                                                                                                                                                                        }

                                                                                                                                                                          Issue represents an issue.

                                                                                                                                                                          Example (Close)
                                                                                                                                                                          Output:
                                                                                                                                                                          
                                                                                                                                                                          
                                                                                                                                                                          Example (Find)
                                                                                                                                                                          Output:
                                                                                                                                                                          
                                                                                                                                                                          
                                                                                                                                                                          Example (List)
                                                                                                                                                                          Output:
                                                                                                                                                                          
                                                                                                                                                                          
                                                                                                                                                                          Example (Lock)
                                                                                                                                                                          Output:
                                                                                                                                                                          
                                                                                                                                                                          
                                                                                                                                                                          Example (Unlock)
                                                                                                                                                                          Output:
                                                                                                                                                                          
                                                                                                                                                                          

                                                                                                                                                                          type IssueCommentHook

                                                                                                                                                                          type IssueCommentHook struct {
                                                                                                                                                                          	Action       Action
                                                                                                                                                                          	Repo         Repository
                                                                                                                                                                          	Issue        Issue
                                                                                                                                                                          	Comment      Comment
                                                                                                                                                                          	Sender       User
                                                                                                                                                                          	GUID         string
                                                                                                                                                                          	Installation *InstallationRef
                                                                                                                                                                          }

                                                                                                                                                                            IssueCommentHook represents an issue comment event, eg issue_comment.

                                                                                                                                                                            func (*IssueCommentHook) GetInstallationRef

                                                                                                                                                                            func (h *IssueCommentHook) GetInstallationRef() *InstallationRef

                                                                                                                                                                              GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                                                              func (*IssueCommentHook) Kind

                                                                                                                                                                              func (h *IssueCommentHook) Kind() WebhookKind

                                                                                                                                                                                Kind returns the kind of webhook

                                                                                                                                                                                func (*IssueCommentHook) Repository

                                                                                                                                                                                func (h *IssueCommentHook) Repository() Repository

                                                                                                                                                                                  Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                                                                  type IssueHook

                                                                                                                                                                                  type IssueHook struct {
                                                                                                                                                                                  	Action       Action
                                                                                                                                                                                  	Repo         Repository
                                                                                                                                                                                  	Issue        Issue
                                                                                                                                                                                  	Sender       User
                                                                                                                                                                                  	Installation *InstallationRef
                                                                                                                                                                                  }

                                                                                                                                                                                    IssueHook represents an issue event, eg issues.

                                                                                                                                                                                    func (*IssueHook) GetInstallationRef

                                                                                                                                                                                    func (h *IssueHook) GetInstallationRef() *InstallationRef

                                                                                                                                                                                      GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                                                                      func (*IssueHook) Kind

                                                                                                                                                                                      func (h *IssueHook) Kind() WebhookKind

                                                                                                                                                                                        Kind returns the kind of webhook

                                                                                                                                                                                        func (*IssueHook) Repository

                                                                                                                                                                                        func (h *IssueHook) Repository() Repository

                                                                                                                                                                                          Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                                                                          type IssueInput

                                                                                                                                                                                          type IssueInput struct {
                                                                                                                                                                                          	Title string
                                                                                                                                                                                          	Body  string
                                                                                                                                                                                          }

                                                                                                                                                                                            IssueInput provides the input fields required for creating or updating an issue.

                                                                                                                                                                                            type IssueListOptions

                                                                                                                                                                                            type IssueListOptions struct {
                                                                                                                                                                                            	Page   int
                                                                                                                                                                                            	Size   int
                                                                                                                                                                                            	Open   bool
                                                                                                                                                                                            	Closed bool
                                                                                                                                                                                            }

                                                                                                                                                                                              IssueListOptions provides options for querying a list of repository issues.

                                                                                                                                                                                              type IssueService

                                                                                                                                                                                              type IssueService interface {
                                                                                                                                                                                              	// Find returns the issue by number.
                                                                                                                                                                                              	Find(context.Context, string, int) (*Issue, *Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// FindComment returns the issue comment.
                                                                                                                                                                                              	FindComment(context.Context, string, int, int) (*Comment, *Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// List returns the repository issue list.
                                                                                                                                                                                              	List(context.Context, string, IssueListOptions) ([]*Issue, *Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// Find returns the issue by number.
                                                                                                                                                                                              	Search(context.Context, SearchOptions) ([]*SearchIssue, *Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// ListComments returns the issue comment list.
                                                                                                                                                                                              	ListComments(context.Context, string, int, ListOptions) ([]*Comment, *Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// ListLabels returns the labels on an issue
                                                                                                                                                                                              	ListLabels(context.Context, string, int, ListOptions) ([]*Label, *Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// ListEvents returns the events creating and removing the labels on an issue
                                                                                                                                                                                              	ListEvents(context.Context, string, int, ListOptions) ([]*ListedIssueEvent, *Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// Create creates a new issue.
                                                                                                                                                                                              	Create(context.Context, string, *IssueInput) (*Issue, *Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// CreateComment creates a new issue comment.
                                                                                                                                                                                              	CreateComment(context.Context, string, int, *CommentInput) (*Comment, *Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// DeleteComment deletes an issue comment.
                                                                                                                                                                                              	DeleteComment(context.Context, string, int, int) (*Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// EditComment edits an existing issue comment.
                                                                                                                                                                                              	EditComment(context.Context, string, int, int, *CommentInput) (*Comment, *Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// Close closes an issue.
                                                                                                                                                                                              	Close(context.Context, string, int) (*Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// Reopen reopens a closed issue.
                                                                                                                                                                                              	Reopen(context.Context, string, int) (*Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// Lock locks an issue discussion.
                                                                                                                                                                                              	Lock(context.Context, string, int) (*Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// Unlock unlocks an issue discussion.
                                                                                                                                                                                              	Unlock(context.Context, string, int) (*Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// AddLabel adds a label to an issue
                                                                                                                                                                                              	AddLabel(ctx context.Context, repo string, number int, label string) (*Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// DeleteLabel deletes a label from an issue
                                                                                                                                                                                              	DeleteLabel(ctx context.Context, repo string, number int, label string) (*Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// AssignIssue assigns one or more  users to an issue
                                                                                                                                                                                              	AssignIssue(ctx context.Context, repo string, number int, logins []string) (*Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// UnassignIssue removes the assignment of ne or more users on an issue
                                                                                                                                                                                              	UnassignIssue(ctx context.Context, repo string, number int, logins []string) (*Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// SetMilestone adds a milestone to an issue
                                                                                                                                                                                              	SetMilestone(ctx context.Context, repo string, issueID int, number int) (*Response, error)
                                                                                                                                                                                              
                                                                                                                                                                                              	// ClearMilestone removes the milestone from an issue
                                                                                                                                                                                              	ClearMilestone(ctx context.Context, repo string, id int) (*Response, error)
                                                                                                                                                                                              }

                                                                                                                                                                                                IssueService provides access to issue resources.

                                                                                                                                                                                                type Label

                                                                                                                                                                                                type Label struct {
                                                                                                                                                                                                	ID          int64
                                                                                                                                                                                                	URL         string
                                                                                                                                                                                                	Name        string
                                                                                                                                                                                                	Description string
                                                                                                                                                                                                	Color       string
                                                                                                                                                                                                }

                                                                                                                                                                                                  Label on a PR

                                                                                                                                                                                                  type LabelHook

                                                                                                                                                                                                  type LabelHook struct {
                                                                                                                                                                                                  	Action       Action
                                                                                                                                                                                                  	Repo         Repository
                                                                                                                                                                                                  	Sender       User
                                                                                                                                                                                                  	Label        Label
                                                                                                                                                                                                  	Installation *InstallationRef
                                                                                                                                                                                                  }

                                                                                                                                                                                                    LabelHook represents a label event

                                                                                                                                                                                                    func (*LabelHook) GetInstallationRef

                                                                                                                                                                                                    func (h *LabelHook) GetInstallationRef() *InstallationRef

                                                                                                                                                                                                      GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                                                                                      func (*LabelHook) Kind

                                                                                                                                                                                                      func (h *LabelHook) Kind() WebhookKind

                                                                                                                                                                                                        Kind returns the kind of webhook

                                                                                                                                                                                                        func (*LabelHook) Repository

                                                                                                                                                                                                        func (h *LabelHook) Repository() Repository

                                                                                                                                                                                                          Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                                                                                          type ListOptions

                                                                                                                                                                                                          type ListOptions struct {
                                                                                                                                                                                                          	URL  string
                                                                                                                                                                                                          	Page int
                                                                                                                                                                                                          	Size int
                                                                                                                                                                                                          	From string
                                                                                                                                                                                                          	To   string
                                                                                                                                                                                                          }

                                                                                                                                                                                                            ListOptions specifies optional pagination parameters.

                                                                                                                                                                                                            type ListedIssueEvent

                                                                                                                                                                                                            type ListedIssueEvent struct {
                                                                                                                                                                                                            	Event   string
                                                                                                                                                                                                            	Actor   User
                                                                                                                                                                                                            	Label   Label
                                                                                                                                                                                                            	Created time.Time
                                                                                                                                                                                                            }

                                                                                                                                                                                                              ListedIssueEvent for listing events on an issue

                                                                                                                                                                                                              type Membership

                                                                                                                                                                                                              type Membership struct {
                                                                                                                                                                                                              	State            string
                                                                                                                                                                                                              	Role             string
                                                                                                                                                                                                              	OrganizationName string
                                                                                                                                                                                                              }

                                                                                                                                                                                                                Membership describes the membership a user has to an organisation

                                                                                                                                                                                                                type MergeableState

                                                                                                                                                                                                                type MergeableState string

                                                                                                                                                                                                                  MergeableState represents whether the PR can be merged

                                                                                                                                                                                                                  const (
                                                                                                                                                                                                                  	// MergeableStateMergeable The pull request can be merged.
                                                                                                                                                                                                                  	MergeableStateMergeable MergeableState = "mergeable"
                                                                                                                                                                                                                  	// MergeableStateConflicting The pull request cannot be merged due to merge conflicts.
                                                                                                                                                                                                                  	MergeableStateConflicting MergeableState = "conflicting"
                                                                                                                                                                                                                  	// MergeableStateUnknown The mergeability of the pull request is still being calculated.
                                                                                                                                                                                                                  	MergeableStateUnknown MergeableState = ""
                                                                                                                                                                                                                  )

                                                                                                                                                                                                                    Action values.

                                                                                                                                                                                                                    func ToMergeableState

                                                                                                                                                                                                                    func ToMergeableState(text string) MergeableState

                                                                                                                                                                                                                      ToMergeableState converts the given string to a mergeable state

                                                                                                                                                                                                                      func (MergeableState) String

                                                                                                                                                                                                                      func (s MergeableState) String() string

                                                                                                                                                                                                                        String returns the string representation

                                                                                                                                                                                                                        type Milestone

                                                                                                                                                                                                                        type Milestone struct {
                                                                                                                                                                                                                        	Number      int
                                                                                                                                                                                                                        	ID          int
                                                                                                                                                                                                                        	Title       string
                                                                                                                                                                                                                        	Description string
                                                                                                                                                                                                                        	Link        string
                                                                                                                                                                                                                        	State       string
                                                                                                                                                                                                                        	DueDate     *time.Time
                                                                                                                                                                                                                        }

                                                                                                                                                                                                                          Milestone the milestone

                                                                                                                                                                                                                          type MilestoneInput

                                                                                                                                                                                                                          type MilestoneInput struct {
                                                                                                                                                                                                                          	Title       string
                                                                                                                                                                                                                          	Description string
                                                                                                                                                                                                                          	State       string
                                                                                                                                                                                                                          	DueDate     *time.Time
                                                                                                                                                                                                                          }

                                                                                                                                                                                                                            MilestoneInput contains the information needed to create a milestone

                                                                                                                                                                                                                            type MilestoneListOptions

                                                                                                                                                                                                                            type MilestoneListOptions struct {
                                                                                                                                                                                                                            	Page   int
                                                                                                                                                                                                                            	Size   int
                                                                                                                                                                                                                            	Open   bool
                                                                                                                                                                                                                            	Closed bool
                                                                                                                                                                                                                            }

                                                                                                                                                                                                                              MilestoneListOptions provides options for querying a list of repository milestones.

                                                                                                                                                                                                                              type MilestoneService

                                                                                                                                                                                                                              type MilestoneService interface {
                                                                                                                                                                                                                              	// Find returns the milestone for the given number in the given repository
                                                                                                                                                                                                                              	Find(context.Context, string, int) (*Milestone, *Response, error)
                                                                                                                                                                                                                              
                                                                                                                                                                                                                              	// List returns a list of milestones in the given repository
                                                                                                                                                                                                                              	List(context.Context, string, MilestoneListOptions) ([]*Milestone, *Response, error)
                                                                                                                                                                                                                              
                                                                                                                                                                                                                              	// Create creates a milestone in the given repository
                                                                                                                                                                                                                              	Create(context.Context, string, *MilestoneInput) (*Milestone, *Response, error)
                                                                                                                                                                                                                              
                                                                                                                                                                                                                              	// Update updates a milestone in the given repository
                                                                                                                                                                                                                              	Update(context.Context, string, int, *MilestoneInput) (*Milestone, *Response, error)
                                                                                                                                                                                                                              
                                                                                                                                                                                                                              	// Delete deletes a milestone in the given repository
                                                                                                                                                                                                                              	Delete(context.Context, string, int) (*Response, error)
                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                MilestoneService provides access to creating, listing, updating, and deleting milestones

                                                                                                                                                                                                                                type MissingHeader

                                                                                                                                                                                                                                type MissingHeader struct {
                                                                                                                                                                                                                                	Header string
                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                  MissingHeader if the webhook has a missing header

                                                                                                                                                                                                                                  func (MissingHeader) Error

                                                                                                                                                                                                                                  func (e MissingHeader) Error() string

                                                                                                                                                                                                                                  type MissingUsers

                                                                                                                                                                                                                                  type MissingUsers struct {
                                                                                                                                                                                                                                  	Users  []string
                                                                                                                                                                                                                                  	Action string
                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                                    MissingUsers is an error specifying the users that could not be unassigned.

                                                                                                                                                                                                                                    func (MissingUsers) Error

                                                                                                                                                                                                                                    func (m MissingUsers) Error() string

                                                                                                                                                                                                                                    type Organization

                                                                                                                                                                                                                                    type Organization struct {
                                                                                                                                                                                                                                    	ID          int
                                                                                                                                                                                                                                    	Name        string
                                                                                                                                                                                                                                    	Avatar      string
                                                                                                                                                                                                                                    	Permissions Permissions
                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                      Organization represents an organization account.

                                                                                                                                                                                                                                      Example (Find)
                                                                                                                                                                                                                                      Output:
                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                      Example (List)
                                                                                                                                                                                                                                      Output:
                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                      

                                                                                                                                                                                                                                      type OrganizationInput

                                                                                                                                                                                                                                      type OrganizationInput struct {
                                                                                                                                                                                                                                      	Name        string
                                                                                                                                                                                                                                      	Description string
                                                                                                                                                                                                                                      	Homepage    string
                                                                                                                                                                                                                                      	Private     bool
                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                        OrganizationInput provides the input fields required for creating a new organization.

                                                                                                                                                                                                                                        type OrganizationPendingInvite

                                                                                                                                                                                                                                        type OrganizationPendingInvite struct {
                                                                                                                                                                                                                                        	ID           int
                                                                                                                                                                                                                                        	Login        string
                                                                                                                                                                                                                                        	InviterLogin string
                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                          OrganizationPendingInvite represents a pending invite to an organisation

                                                                                                                                                                                                                                          type OrganizationService

                                                                                                                                                                                                                                          type OrganizationService interface {
                                                                                                                                                                                                                                          	// Find returns the organization by name.
                                                                                                                                                                                                                                          	Find(context.Context, string) (*Organization, *Response, error)
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          	// Create creates an organization.
                                                                                                                                                                                                                                          	Create(context.Context, *OrganizationInput) (*Organization, *Response, error)
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          	// Delete deletes an organization.
                                                                                                                                                                                                                                          	Delete(context.Context, string) (*Response, error)
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          	// List returns the user organization list.
                                                                                                                                                                                                                                          	List(context.Context, ListOptions) ([]*Organization, *Response, error)
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          	// ListTeams returns the user organization list.
                                                                                                                                                                                                                                          	ListTeams(ctx context.Context, org string, ops ListOptions) ([]*Team, *Response, error)
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          	// IsMember returns true if the user is a member of the organization
                                                                                                                                                                                                                                          	IsMember(ctx context.Context, org string, user string) (bool, *Response, error)
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          	// IsAdmin returns true if the user is an admin of the organization
                                                                                                                                                                                                                                          	IsAdmin(ctx context.Context, org string, user string) (bool, *Response, error)
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          	// ListTeamMembers lists the members of a team with a given role
                                                                                                                                                                                                                                          	ListTeamMembers(ctx context.Context, id int, role string, ops ListOptions) ([]*TeamMember, *Response, error)
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          	// ListOrgMembers lists the members of the organization
                                                                                                                                                                                                                                          	ListOrgMembers(ctx context.Context, org string, ops ListOptions) ([]*TeamMember, *Response, error)
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          	// ListPendingInvitations lists the pending invitations for an organisation
                                                                                                                                                                                                                                          	ListPendingInvitations(ctx context.Context, org string, ops ListOptions) ([]*OrganizationPendingInvite, *Response, error)
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          	// AcceptPendingInvitation accepts a pending invitation for an organisation
                                                                                                                                                                                                                                          	AcceptOrganizationInvitation(ctx context.Context, org string) (*Response, error)
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          	// ListMemberships lists organisation memberships for the authenticated user
                                                                                                                                                                                                                                          	ListMemberships(ctx context.Context, opts ListOptions) ([]*Membership, *Response, error)
                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                            OrganizationService provides access to organization resources.

                                                                                                                                                                                                                                            type Page

                                                                                                                                                                                                                                            type Page struct {
                                                                                                                                                                                                                                            	Next    int
                                                                                                                                                                                                                                            	NextURL string
                                                                                                                                                                                                                                            	Last    int
                                                                                                                                                                                                                                            	First   int
                                                                                                                                                                                                                                            	Prev    int
                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                              Page represents parsed link rel values for pagination.

                                                                                                                                                                                                                                              type Perm

                                                                                                                                                                                                                                              type Perm struct {
                                                                                                                                                                                                                                              	Pull  bool
                                                                                                                                                                                                                                              	Push  bool
                                                                                                                                                                                                                                              	Admin bool
                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                Perm represents a user's repository permissions.

                                                                                                                                                                                                                                                type Permissions

                                                                                                                                                                                                                                                type Permissions struct {
                                                                                                                                                                                                                                                	MembersCreatePrivate  bool
                                                                                                                                                                                                                                                	MembersCreatePublic   bool
                                                                                                                                                                                                                                                	MembersCreateInternal bool
                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                  Permissions represents the possible permissions a user can have on an org

                                                                                                                                                                                                                                                  type PingHook

                                                                                                                                                                                                                                                  type PingHook struct {
                                                                                                                                                                                                                                                  	Repo         Repository
                                                                                                                                                                                                                                                  	Sender       User
                                                                                                                                                                                                                                                  	Installation *InstallationRef
                                                                                                                                                                                                                                                  	GUID         string
                                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                                                    PingHook a ping webhook.

                                                                                                                                                                                                                                                    func (*PingHook) GetInstallationRef

                                                                                                                                                                                                                                                    func (h *PingHook) GetInstallationRef() *InstallationRef

                                                                                                                                                                                                                                                      GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                                                                                                                                      func (*PingHook) Kind

                                                                                                                                                                                                                                                      func (h *PingHook) Kind() WebhookKind

                                                                                                                                                                                                                                                        Kind returns the kind of webhook

                                                                                                                                                                                                                                                        func (*PingHook) Repository

                                                                                                                                                                                                                                                        func (h *PingHook) Repository() Repository

                                                                                                                                                                                                                                                          Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                                                                                                                                          type PullRequest

                                                                                                                                                                                                                                                          type PullRequest struct {
                                                                                                                                                                                                                                                          	Number         int
                                                                                                                                                                                                                                                          	Title          string
                                                                                                                                                                                                                                                          	Body           string
                                                                                                                                                                                                                                                          	Labels         []*Label
                                                                                                                                                                                                                                                          	Sha            string
                                                                                                                                                                                                                                                          	Ref            string
                                                                                                                                                                                                                                                          	Source         string
                                                                                                                                                                                                                                                          	Target         string
                                                                                                                                                                                                                                                          	Base           PullRequestBranch
                                                                                                                                                                                                                                                          	Head           PullRequestBranch
                                                                                                                                                                                                                                                          	Fork           string
                                                                                                                                                                                                                                                          	State          string
                                                                                                                                                                                                                                                          	Closed         bool
                                                                                                                                                                                                                                                          	Draft          bool
                                                                                                                                                                                                                                                          	Merged         bool
                                                                                                                                                                                                                                                          	Mergeable      bool
                                                                                                                                                                                                                                                          	Rebaseable     bool
                                                                                                                                                                                                                                                          	MergeableState MergeableState
                                                                                                                                                                                                                                                          	MergeSha       string
                                                                                                                                                                                                                                                          	Author         User
                                                                                                                                                                                                                                                          	Assignees      []User
                                                                                                                                                                                                                                                          	Reviewers      []User
                                                                                                                                                                                                                                                          	Milestone      Milestone
                                                                                                                                                                                                                                                          	Created        time.Time
                                                                                                                                                                                                                                                          	Updated        time.Time
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          	// Link links to the main pull request page
                                                                                                                                                                                                                                                          	Link string
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          	// DiffLink links to the diff report of a pull request
                                                                                                                                                                                                                                                          	DiffLink string
                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                            PullRequest represents a repository pull request.

                                                                                                                                                                                                                                                            Example (Changes)
                                                                                                                                                                                                                                                            Output:
                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                            Example (Close)
                                                                                                                                                                                                                                                            Output:
                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                            Example (Find)
                                                                                                                                                                                                                                                            Output:
                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                            Example (List)
                                                                                                                                                                                                                                                            Output:
                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                            Example (Merge)
                                                                                                                                                                                                                                                            Output:
                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                            

                                                                                                                                                                                                                                                            func (*PullRequest) Repository

                                                                                                                                                                                                                                                            func (pr *PullRequest) Repository() Repository

                                                                                                                                                                                                                                                              Repository returns the base repository where the PR will merge to

                                                                                                                                                                                                                                                              type PullRequestBranch

                                                                                                                                                                                                                                                              type PullRequestBranch struct {
                                                                                                                                                                                                                                                              	Ref  string
                                                                                                                                                                                                                                                              	Sha  string
                                                                                                                                                                                                                                                              	Repo Repository
                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                PullRequestBranch contains information about a particular branch in a PR.

                                                                                                                                                                                                                                                                type PullRequestCommentHook

                                                                                                                                                                                                                                                                type PullRequestCommentHook struct {
                                                                                                                                                                                                                                                                	Action       Action
                                                                                                                                                                                                                                                                	Repo         Repository
                                                                                                                                                                                                                                                                	PullRequest  PullRequest
                                                                                                                                                                                                                                                                	Comment      Comment
                                                                                                                                                                                                                                                                	Sender       User
                                                                                                                                                                                                                                                                	GUID         string
                                                                                                                                                                                                                                                                	Installation *InstallationRef
                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                  PullRequestCommentHook represents an pull request comment event, eg pull_request_comment.

                                                                                                                                                                                                                                                                  func (*PullRequestCommentHook) GetInstallationRef

                                                                                                                                                                                                                                                                  func (h *PullRequestCommentHook) GetInstallationRef() *InstallationRef

                                                                                                                                                                                                                                                                    GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                                                                                                                                                    func (*PullRequestCommentHook) Kind

                                                                                                                                                                                                                                                                      Kind returns the kind of webhook

                                                                                                                                                                                                                                                                      func (*PullRequestCommentHook) Repository

                                                                                                                                                                                                                                                                      func (h *PullRequestCommentHook) Repository() Repository

                                                                                                                                                                                                                                                                        Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                                                                                                                                                        type PullRequestHook

                                                                                                                                                                                                                                                                        type PullRequestHook struct {
                                                                                                                                                                                                                                                                        	Action       Action
                                                                                                                                                                                                                                                                        	Repo         Repository
                                                                                                                                                                                                                                                                        	Label        Label
                                                                                                                                                                                                                                                                        	PullRequest  PullRequest
                                                                                                                                                                                                                                                                        	Sender       User
                                                                                                                                                                                                                                                                        	Changes      PullRequestHookChanges
                                                                                                                                                                                                                                                                        	GUID         string
                                                                                                                                                                                                                                                                        	Installation *InstallationRef
                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                          PullRequestHook represents an pull request event, eg pull_request.

                                                                                                                                                                                                                                                                          func (*PullRequestHook) GetInstallationRef

                                                                                                                                                                                                                                                                          func (h *PullRequestHook) GetInstallationRef() *InstallationRef

                                                                                                                                                                                                                                                                            GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                                                                                                                                                            func (*PullRequestHook) Kind

                                                                                                                                                                                                                                                                            func (h *PullRequestHook) Kind() WebhookKind

                                                                                                                                                                                                                                                                              Kind returns the kind of webhook

                                                                                                                                                                                                                                                                              func (*PullRequestHook) Repository

                                                                                                                                                                                                                                                                              func (h *PullRequestHook) Repository() Repository

                                                                                                                                                                                                                                                                                Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                                                                                                                                                                type PullRequestHookBranch

                                                                                                                                                                                                                                                                                type PullRequestHookBranch struct {
                                                                                                                                                                                                                                                                                	Ref  PullRequestHookBranchFrom
                                                                                                                                                                                                                                                                                	Sha  PullRequestHookBranchFrom
                                                                                                                                                                                                                                                                                	Repo Repository
                                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                                  PullRequestHookBranch represents a branch in a PR

                                                                                                                                                                                                                                                                                  type PullRequestHookBranchFrom

                                                                                                                                                                                                                                                                                  type PullRequestHookBranchFrom struct {
                                                                                                                                                                                                                                                                                  	From string
                                                                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                                                                                    PullRequestHookBranchFrom represents the branch or ref a PR is from

                                                                                                                                                                                                                                                                                    type PullRequestHookChanges

                                                                                                                                                                                                                                                                                    type PullRequestHookChanges struct {
                                                                                                                                                                                                                                                                                    	Base PullRequestHookBranch
                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                      PullRequestHookChanges represents the changes in a PR

                                                                                                                                                                                                                                                                                      type PullRequestInput

                                                                                                                                                                                                                                                                                      type PullRequestInput struct {
                                                                                                                                                                                                                                                                                      	Title string
                                                                                                                                                                                                                                                                                      	Head  string
                                                                                                                                                                                                                                                                                      	Base  string
                                                                                                                                                                                                                                                                                      	Body  string
                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                        PullRequestInput provides the input needed to create or update a PR.

                                                                                                                                                                                                                                                                                        type PullRequestListOptions

                                                                                                                                                                                                                                                                                        type PullRequestListOptions struct {
                                                                                                                                                                                                                                                                                        	Page          int
                                                                                                                                                                                                                                                                                        	Size          int
                                                                                                                                                                                                                                                                                        	Open          bool
                                                                                                                                                                                                                                                                                        	Closed        bool
                                                                                                                                                                                                                                                                                        	Labels        []string
                                                                                                                                                                                                                                                                                        	UpdatedAfter  *time.Time
                                                                                                                                                                                                                                                                                        	UpdatedBefore *time.Time
                                                                                                                                                                                                                                                                                        	CreatedAfter  *time.Time
                                                                                                                                                                                                                                                                                        	CreatedBefore *time.Time
                                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                                          PullRequestListOptions provides options for querying a list of repository merge requests.

                                                                                                                                                                                                                                                                                          type PullRequestMergeOptions

                                                                                                                                                                                                                                                                                          type PullRequestMergeOptions struct {
                                                                                                                                                                                                                                                                                          	CommitTitle string // Extra detail to append to automatic commit message. (Optional.)
                                                                                                                                                                                                                                                                                          	SHA         string // SHA that pull request head must match to allow merge. (Optional.)
                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                          	// The merge method to use. Possible values include: "merge", "squash", and "rebase" with the default being merge. (Optional.)
                                                                                                                                                                                                                                                                                          	MergeMethod string
                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                          	// Merge automatically once the pipeline completes. (Supported only in gitlab)
                                                                                                                                                                                                                                                                                          	MergeWhenPipelineSucceeds bool
                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                          	// Signals to the SCM to remove the source branch during merge
                                                                                                                                                                                                                                                                                          	DeleteSourceBranch bool
                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                            PullRequestMergeOptions lets you define how a pull request will be merged.

                                                                                                                                                                                                                                                                                            type PullRequestService

                                                                                                                                                                                                                                                                                            type PullRequestService interface {
                                                                                                                                                                                                                                                                                            	// Find returns the repository pull request by number.
                                                                                                                                                                                                                                                                                            	Find(context.Context, string, int) (*PullRequest, *Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// Update modifies an existing pull request.
                                                                                                                                                                                                                                                                                            	Update(context.Context, string, int, *PullRequestInput) (*PullRequest, *Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// FindComment returns the pull request comment by id.
                                                                                                                                                                                                                                                                                            	FindComment(context.Context, string, int, int) (*Comment, *Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// Find returns the repository pull request list.
                                                                                                                                                                                                                                                                                            	List(context.Context, string, PullRequestListOptions) ([]*PullRequest, *Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// ListChanges returns the pull request changeset.
                                                                                                                                                                                                                                                                                            	ListChanges(context.Context, string, int, ListOptions) ([]*Change, *Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// ListComments returns the pull request comment list.
                                                                                                                                                                                                                                                                                            	ListComments(context.Context, string, int, ListOptions) ([]*Comment, *Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// ListLabels returns the labels on a pull request
                                                                                                                                                                                                                                                                                            	ListLabels(context.Context, string, int, ListOptions) ([]*Label, *Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// ListEvents returns the events creating and removing the labels on an pull request
                                                                                                                                                                                                                                                                                            	ListEvents(context.Context, string, int, ListOptions) ([]*ListedIssueEvent, *Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// Merge merges the repository pull request.
                                                                                                                                                                                                                                                                                            	Merge(context.Context, string, int, *PullRequestMergeOptions) (*Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// Close closes the repository pull request.
                                                                                                                                                                                                                                                                                            	Close(context.Context, string, int) (*Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// Reopen reopens a closed repository pull request.
                                                                                                                                                                                                                                                                                            	Reopen(context.Context, string, int) (*Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// CreateComment creates a new pull request comment.
                                                                                                                                                                                                                                                                                            	CreateComment(context.Context, string, int, *CommentInput) (*Comment, *Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// DeleteComment deletes an pull request comment.
                                                                                                                                                                                                                                                                                            	DeleteComment(context.Context, string, int, int) (*Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// EditComment edits an existing pull request comment.
                                                                                                                                                                                                                                                                                            	EditComment(context.Context, string, int, int, *CommentInput) (*Comment, *Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// AddLabel adds a label to a pull request.
                                                                                                                                                                                                                                                                                            	AddLabel(ctx context.Context, repo string, number int, label string) (*Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// DeleteLabel deletes a label from a pull request
                                                                                                                                                                                                                                                                                            	DeleteLabel(ctx context.Context, repo string, number int, label string) (*Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// AssignIssue assigns one or more  users to an issue
                                                                                                                                                                                                                                                                                            	AssignIssue(ctx context.Context, repo string, number int, logins []string) (*Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// UnassignIssue removes the assignment of ne or more users on an issue
                                                                                                                                                                                                                                                                                            	UnassignIssue(ctx context.Context, repo string, number int, logins []string) (*Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// Create creates a new pull request in a repo.
                                                                                                                                                                                                                                                                                            	Create(context.Context, string, *PullRequestInput) (*PullRequest, *Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// RequestReview adds one or more users as a reviewer on a pull request.
                                                                                                                                                                                                                                                                                            	RequestReview(ctx context.Context, repo string, number int, logins []string) (*Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// UnrequestReview removes one or more users as a reviewer on a pull request.
                                                                                                                                                                                                                                                                                            	UnrequestReview(ctx context.Context, repo string, number int, logins []string) (*Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// SetMilestone adds a milestone to a pull request
                                                                                                                                                                                                                                                                                            	SetMilestone(ctx context.Context, repo string, prID int, number int) (*Response, error)
                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                            	// ClearMilestone removes the milestone from a pull request
                                                                                                                                                                                                                                                                                            	ClearMilestone(ctx context.Context, repo string, prID int) (*Response, error)
                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                              PullRequestService provides access to pull request resources.

                                                                                                                                                                                                                                                                                              type PushCommit

                                                                                                                                                                                                                                                                                              type PushCommit struct {
                                                                                                                                                                                                                                                                                              	ID       string
                                                                                                                                                                                                                                                                                              	Message  string
                                                                                                                                                                                                                                                                                              	Added    []string
                                                                                                                                                                                                                                                                                              	Removed  []string
                                                                                                                                                                                                                                                                                              	Modified []string
                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                PushCommit represents general info about a commit.

                                                                                                                                                                                                                                                                                                type PushHook

                                                                                                                                                                                                                                                                                                type PushHook struct {
                                                                                                                                                                                                                                                                                                	Ref          string
                                                                                                                                                                                                                                                                                                	BaseRef      string
                                                                                                                                                                                                                                                                                                	Repo         Repository
                                                                                                                                                                                                                                                                                                	Before       string
                                                                                                                                                                                                                                                                                                	After        string
                                                                                                                                                                                                                                                                                                	Created      bool
                                                                                                                                                                                                                                                                                                	Deleted      bool
                                                                                                                                                                                                                                                                                                	Forced       bool
                                                                                                                                                                                                                                                                                                	Compare      string
                                                                                                                                                                                                                                                                                                	Commits      []PushCommit
                                                                                                                                                                                                                                                                                                	Commit       Commit
                                                                                                                                                                                                                                                                                                	Sender       User
                                                                                                                                                                                                                                                                                                	GUID         string
                                                                                                                                                                                                                                                                                                	Installation *InstallationRef
                                                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                                                  PushHook represents a push hook, eg push events.

                                                                                                                                                                                                                                                                                                  func (*PushHook) GetInstallationRef

                                                                                                                                                                                                                                                                                                  func (h *PushHook) GetInstallationRef() *InstallationRef

                                                                                                                                                                                                                                                                                                    GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                                                                                                                                                                                    func (*PushHook) Kind

                                                                                                                                                                                                                                                                                                    func (h *PushHook) Kind() WebhookKind

                                                                                                                                                                                                                                                                                                      Kind returns the kind of webhook

                                                                                                                                                                                                                                                                                                      func (*PushHook) Repository

                                                                                                                                                                                                                                                                                                      func (h *PushHook) Repository() Repository

                                                                                                                                                                                                                                                                                                        Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                                                                                                                                                                                        type Rate

                                                                                                                                                                                                                                                                                                        type Rate struct {
                                                                                                                                                                                                                                                                                                        	Limit     int
                                                                                                                                                                                                                                                                                                        	Remaining int
                                                                                                                                                                                                                                                                                                        	Reset     int64
                                                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                                                          Rate represents the rate limit for the current client.

                                                                                                                                                                                                                                                                                                          type Reference

                                                                                                                                                                                                                                                                                                          type Reference struct {
                                                                                                                                                                                                                                                                                                          	Name string
                                                                                                                                                                                                                                                                                                          	Path string
                                                                                                                                                                                                                                                                                                          	Sha  string
                                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                                            Reference represents a git reference.

                                                                                                                                                                                                                                                                                                            Example (FindBranch)
                                                                                                                                                                                                                                                                                                            Output:
                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                            Example (FindTag)
                                                                                                                                                                                                                                                                                                            Output:
                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                            Example (ListBranch)
                                                                                                                                                                                                                                                                                                            Output:
                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                            Example (ListTag)
                                                                                                                                                                                                                                                                                                            Output:
                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                            

                                                                                                                                                                                                                                                                                                            type Release

                                                                                                                                                                                                                                                                                                            type Release struct {
                                                                                                                                                                                                                                                                                                            	ID          int
                                                                                                                                                                                                                                                                                                            	Title       string
                                                                                                                                                                                                                                                                                                            	Description string
                                                                                                                                                                                                                                                                                                            	Link        string
                                                                                                                                                                                                                                                                                                            	Tag         string
                                                                                                                                                                                                                                                                                                            	Commitish   string
                                                                                                                                                                                                                                                                                                            	Draft       bool
                                                                                                                                                                                                                                                                                                            	Prerelease  bool
                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                              Release the release

                                                                                                                                                                                                                                                                                                              type ReleaseHook

                                                                                                                                                                                                                                                                                                              type ReleaseHook struct {
                                                                                                                                                                                                                                                                                                              	Action       Action
                                                                                                                                                                                                                                                                                                              	Repo         Repository
                                                                                                                                                                                                                                                                                                              	Sender       User
                                                                                                                                                                                                                                                                                                              	Label        Label
                                                                                                                                                                                                                                                                                                              	Installation *InstallationRef
                                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                                ReleaseHook represents a release event

                                                                                                                                                                                                                                                                                                                func (*ReleaseHook) GetInstallationRef

                                                                                                                                                                                                                                                                                                                func (h *ReleaseHook) GetInstallationRef() *InstallationRef

                                                                                                                                                                                                                                                                                                                  GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                                                                                                                                                                                                  func (*ReleaseHook) Kind

                                                                                                                                                                                                                                                                                                                  func (h *ReleaseHook) Kind() WebhookKind

                                                                                                                                                                                                                                                                                                                    Kind returns the kind of webhook

                                                                                                                                                                                                                                                                                                                    func (*ReleaseHook) Repository

                                                                                                                                                                                                                                                                                                                    func (h *ReleaseHook) Repository() Repository

                                                                                                                                                                                                                                                                                                                      Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                                                                                                                                                                                                      type ReleaseInput

                                                                                                                                                                                                                                                                                                                      type ReleaseInput struct {
                                                                                                                                                                                                                                                                                                                      	Title       string
                                                                                                                                                                                                                                                                                                                      	Description string
                                                                                                                                                                                                                                                                                                                      	Tag         string
                                                                                                                                                                                                                                                                                                                      	Commitish   string
                                                                                                                                                                                                                                                                                                                      	Draft       bool
                                                                                                                                                                                                                                                                                                                      	Prerelease  bool
                                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                                        ReleaseInput contains the information needed to create a release

                                                                                                                                                                                                                                                                                                                        type ReleaseListOptions

                                                                                                                                                                                                                                                                                                                        type ReleaseListOptions struct {
                                                                                                                                                                                                                                                                                                                        	Page   int
                                                                                                                                                                                                                                                                                                                        	Size   int
                                                                                                                                                                                                                                                                                                                        	Open   bool
                                                                                                                                                                                                                                                                                                                        	Closed bool
                                                                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                                                                          ReleaseListOptions provides options for querying a list of repository releases.

                                                                                                                                                                                                                                                                                                                          type ReleaseService

                                                                                                                                                                                                                                                                                                                          type ReleaseService interface {
                                                                                                                                                                                                                                                                                                                          	// Find returns the release for the given number in the given repository
                                                                                                                                                                                                                                                                                                                          	Find(context.Context, string, int) (*Release, *Response, error)
                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                          	// FindByTag returns the release for the given tag in the given repository
                                                                                                                                                                                                                                                                                                                          	FindByTag(context.Context, string, string) (*Release, *Response, error)
                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                          	// List returns a list of releases in the given repository
                                                                                                                                                                                                                                                                                                                          	List(context.Context, string, ReleaseListOptions) ([]*Release, *Response, error)
                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                          	// Create creates a release in the given repository
                                                                                                                                                                                                                                                                                                                          	Create(context.Context, string, *ReleaseInput) (*Release, *Response, error)
                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                          	// Update updates a release in the given repository
                                                                                                                                                                                                                                                                                                                          	Update(context.Context, string, int, *ReleaseInput) (*Release, *Response, error)
                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                          	// Update updates a release in the given repository by tag
                                                                                                                                                                                                                                                                                                                          	UpdateByTag(context.Context, string, string, *ReleaseInput) (*Release, *Response, error)
                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                          	// Delete deletes a release in the given repository
                                                                                                                                                                                                                                                                                                                          	Delete(context.Context, string, int) (*Response, error)
                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                          	// Delete deletes a release in the given repository by tag
                                                                                                                                                                                                                                                                                                                          	DeleteByTag(context.Context, string, string) (*Response, error)
                                                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                                                            ReleaseService provides access to creating, listing, updating, and deleting releases

                                                                                                                                                                                                                                                                                                                            type Repository

                                                                                                                                                                                                                                                                                                                            type Repository struct {
                                                                                                                                                                                                                                                                                                                            	ID        string
                                                                                                                                                                                                                                                                                                                            	Namespace string
                                                                                                                                                                                                                                                                                                                            	Name      string
                                                                                                                                                                                                                                                                                                                            	FullName  string
                                                                                                                                                                                                                                                                                                                            	Perm      *Perm
                                                                                                                                                                                                                                                                                                                            	Branch    string
                                                                                                                                                                                                                                                                                                                            	Private   bool
                                                                                                                                                                                                                                                                                                                            	Archived  bool
                                                                                                                                                                                                                                                                                                                            	Clone     string
                                                                                                                                                                                                                                                                                                                            	CloneSSH  string
                                                                                                                                                                                                                                                                                                                            	Link      string
                                                                                                                                                                                                                                                                                                                            	Created   time.Time
                                                                                                                                                                                                                                                                                                                            	Updated   time.Time
                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                              Repository represents a git repository.

                                                                                                                                                                                                                                                                                                                              Example (Find)
                                                                                                                                                                                                                                                                                                                              Output:
                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                              Example (List)
                                                                                                                                                                                                                                                                                                                              Output:
                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                              

                                                                                                                                                                                                                                                                                                                              type RepositoryHook

                                                                                                                                                                                                                                                                                                                              type RepositoryHook struct {
                                                                                                                                                                                                                                                                                                                              	Action       Action
                                                                                                                                                                                                                                                                                                                              	Repo         Repository
                                                                                                                                                                                                                                                                                                                              	Sender       User
                                                                                                                                                                                                                                                                                                                              	Installation *InstallationRef
                                                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                                                RepositoryHook represents a repository event

                                                                                                                                                                                                                                                                                                                                func (*RepositoryHook) GetInstallationRef

                                                                                                                                                                                                                                                                                                                                func (h *RepositoryHook) GetInstallationRef() *InstallationRef

                                                                                                                                                                                                                                                                                                                                  GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                                                                                                                                                                                                                  func (*RepositoryHook) Kind

                                                                                                                                                                                                                                                                                                                                  func (h *RepositoryHook) Kind() WebhookKind

                                                                                                                                                                                                                                                                                                                                    Kind returns the kind of webhook

                                                                                                                                                                                                                                                                                                                                    func (*RepositoryHook) Repository

                                                                                                                                                                                                                                                                                                                                    func (h *RepositoryHook) Repository() Repository

                                                                                                                                                                                                                                                                                                                                      Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                                                                                                                                                                                                                      type RepositoryInput

                                                                                                                                                                                                                                                                                                                                      type RepositoryInput struct {
                                                                                                                                                                                                                                                                                                                                      	Namespace   string
                                                                                                                                                                                                                                                                                                                                      	Name        string
                                                                                                                                                                                                                                                                                                                                      	Description string
                                                                                                                                                                                                                                                                                                                                      	Homepage    string
                                                                                                                                                                                                                                                                                                                                      	Private     bool
                                                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                                                        RepositoryInput provides the input fields required for creating a new repository.

                                                                                                                                                                                                                                                                                                                                        type RepositoryService

                                                                                                                                                                                                                                                                                                                                        type RepositoryService interface {
                                                                                                                                                                                                                                                                                                                                        	// Find returns a repository by name.
                                                                                                                                                                                                                                                                                                                                        	Find(context.Context, string) (*Repository, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// FindHook returns a repository hook.
                                                                                                                                                                                                                                                                                                                                        	FindHook(context.Context, string, string) (*Hook, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// FindPerms returns repository permissions.
                                                                                                                                                                                                                                                                                                                                        	FindPerms(context.Context, string) (*Perm, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// List returns a list of repositories.
                                                                                                                                                                                                                                                                                                                                        	List(context.Context, ListOptions) ([]*Repository, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// List returns a list of repositories for a given organisation
                                                                                                                                                                                                                                                                                                                                        	ListOrganisation(context.Context, string, ListOptions) ([]*Repository, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// List returns a list of repositories for a given user.
                                                                                                                                                                                                                                                                                                                                        	ListUser(context.Context, string, ListOptions) ([]*Repository, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// ListLabels returns the labels on a repo
                                                                                                                                                                                                                                                                                                                                        	ListLabels(context.Context, string, ListOptions) ([]*Label, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// ListHooks returns a list or repository hooks.
                                                                                                                                                                                                                                                                                                                                        	ListHooks(context.Context, string, ListOptions) ([]*Hook, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// ListStatus returns a list of commit statuses.
                                                                                                                                                                                                                                                                                                                                        	ListStatus(context.Context, string, string, ListOptions) ([]*Status, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// FindCombinedStatus returns the combined status for a ref
                                                                                                                                                                                                                                                                                                                                        	FindCombinedStatus(ctx context.Context, repo, ref string) (*CombinedStatus, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// Create creates a new repository .
                                                                                                                                                                                                                                                                                                                                        	Create(context.Context, *RepositoryInput) (*Repository, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// Fork creatings a new repository as a fork of an existing one.
                                                                                                                                                                                                                                                                                                                                        	Fork(context.Context, *RepositoryInput, string) (*Repository, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// CreateHook creates a new repository webhook.
                                                                                                                                                                                                                                                                                                                                        	CreateHook(context.Context, string, *HookInput) (*Hook, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// CreateStatus creates a new commit status.
                                                                                                                                                                                                                                                                                                                                        	CreateStatus(context.Context, string, string, *StatusInput) (*Status, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// DeleteHook deletes a repository webhook.
                                                                                                                                                                                                                                                                                                                                        	DeleteHook(context.Context, string, string) (*Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// IsCollaborator returns true if the user is a collaborator on the repository
                                                                                                                                                                                                                                                                                                                                        	IsCollaborator(ctx context.Context, repo string, user string) (bool, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// AddCollaborator adds a collaborator to the repository
                                                                                                                                                                                                                                                                                                                                        	AddCollaborator(ctx context.Context, repo, user, permission string) (bool, bool, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// ListCollaborators lists the collaborators on a repository
                                                                                                                                                                                                                                                                                                                                        	ListCollaborators(ctx context.Context, repo string, ops ListOptions) ([]User, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// FindUserPermission returns the user's permission level for a repo
                                                                                                                                                                                                                                                                                                                                        	FindUserPermission(ctx context.Context, repo string, user string) (string, *Response, error)
                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                        	// Delete deletes a repository
                                                                                                                                                                                                                                                                                                                                        	Delete(ctx context.Context, repo string) (*Response, error)
                                                                                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                                                                                          RepositoryService provides access to repository resources.

                                                                                                                                                                                                                                                                                                                                          type Request

                                                                                                                                                                                                                                                                                                                                          type Request struct {
                                                                                                                                                                                                                                                                                                                                          	Method string
                                                                                                                                                                                                                                                                                                                                          	Path   string
                                                                                                                                                                                                                                                                                                                                          	Header http.Header
                                                                                                                                                                                                                                                                                                                                          	Body   io.Reader
                                                                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                                                                            Request represents an HTTP request.

                                                                                                                                                                                                                                                                                                                                            type Response

                                                                                                                                                                                                                                                                                                                                            type Response struct {
                                                                                                                                                                                                                                                                                                                                            	ID     string
                                                                                                                                                                                                                                                                                                                                            	Status int
                                                                                                                                                                                                                                                                                                                                            	Header http.Header
                                                                                                                                                                                                                                                                                                                                            	Body   io.ReadCloser
                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                            	Page Page // Page values
                                                                                                                                                                                                                                                                                                                                            	Rate Rate // Rate limit snapshot
                                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                                              Response represents an HTTP response.

                                                                                                                                                                                                                                                                                                                                              func (*Response) PopulatePageValues

                                                                                                                                                                                                                                                                                                                                              func (r *Response) PopulatePageValues()

                                                                                                                                                                                                                                                                                                                                                PopulatePageValues parses the HTTP Link response headers and populates the various pagination link values in the Response.

                                                                                                                                                                                                                                                                                                                                                Copyright 2013 The go-github AUTHORS. All rights reserved. https://github.com/google/go-github

                                                                                                                                                                                                                                                                                                                                                type Review

                                                                                                                                                                                                                                                                                                                                                type Review struct {
                                                                                                                                                                                                                                                                                                                                                	ID      int
                                                                                                                                                                                                                                                                                                                                                	Body    string
                                                                                                                                                                                                                                                                                                                                                	Sha     string
                                                                                                                                                                                                                                                                                                                                                	Link    string
                                                                                                                                                                                                                                                                                                                                                	State   string
                                                                                                                                                                                                                                                                                                                                                	Author  User
                                                                                                                                                                                                                                                                                                                                                	Created time.Time
                                                                                                                                                                                                                                                                                                                                                	Updated time.Time
                                                                                                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                                                                                                  Review represents a review.

                                                                                                                                                                                                                                                                                                                                                  Example (Create)
                                                                                                                                                                                                                                                                                                                                                  Output:
                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                  Example (Find)
                                                                                                                                                                                                                                                                                                                                                  Output:
                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                  Example (List)
                                                                                                                                                                                                                                                                                                                                                  Output:
                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                  

                                                                                                                                                                                                                                                                                                                                                  type ReviewComment

                                                                                                                                                                                                                                                                                                                                                  type ReviewComment struct {
                                                                                                                                                                                                                                                                                                                                                  	ID      int
                                                                                                                                                                                                                                                                                                                                                  	Body    string
                                                                                                                                                                                                                                                                                                                                                  	Path    string
                                                                                                                                                                                                                                                                                                                                                  	Sha     string
                                                                                                                                                                                                                                                                                                                                                  	Line    int
                                                                                                                                                                                                                                                                                                                                                  	Link    string
                                                                                                                                                                                                                                                                                                                                                  	Author  User
                                                                                                                                                                                                                                                                                                                                                  	Created time.Time
                                                                                                                                                                                                                                                                                                                                                  	Updated time.Time
                                                                                                                                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                                                                                                                                                    ReviewComment represents a review comment.

                                                                                                                                                                                                                                                                                                                                                    type ReviewCommentHook

                                                                                                                                                                                                                                                                                                                                                    type ReviewCommentHook struct {
                                                                                                                                                                                                                                                                                                                                                    	Action       Action
                                                                                                                                                                                                                                                                                                                                                    	Repo         Repository
                                                                                                                                                                                                                                                                                                                                                    	PullRequest  PullRequest
                                                                                                                                                                                                                                                                                                                                                    	Review       Review
                                                                                                                                                                                                                                                                                                                                                    	Installation *InstallationRef
                                                                                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                                                                                      ReviewCommentHook represents a pull request review comment, eg pull_request_review_comment.

                                                                                                                                                                                                                                                                                                                                                      func (*ReviewCommentHook) GetInstallationRef

                                                                                                                                                                                                                                                                                                                                                      func (h *ReviewCommentHook) GetInstallationRef() *InstallationRef

                                                                                                                                                                                                                                                                                                                                                        GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                                                                                                                                                                                                                                        func (*ReviewCommentHook) Kind

                                                                                                                                                                                                                                                                                                                                                        func (h *ReviewCommentHook) Kind() WebhookKind

                                                                                                                                                                                                                                                                                                                                                          Kind returns the kind of webhook

                                                                                                                                                                                                                                                                                                                                                          func (*ReviewCommentHook) Repository

                                                                                                                                                                                                                                                                                                                                                          func (h *ReviewCommentHook) Repository() Repository

                                                                                                                                                                                                                                                                                                                                                            Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                                                                                                                                                                                                                                            type ReviewCommentInput

                                                                                                                                                                                                                                                                                                                                                            type ReviewCommentInput struct {
                                                                                                                                                                                                                                                                                                                                                            	Body string
                                                                                                                                                                                                                                                                                                                                                            	Path string
                                                                                                                                                                                                                                                                                                                                                            	Line int
                                                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                                                              ReviewCommentInput provides the input fields required for creating a review comment.

                                                                                                                                                                                                                                                                                                                                                              type ReviewHook

                                                                                                                                                                                                                                                                                                                                                              type ReviewHook struct {
                                                                                                                                                                                                                                                                                                                                                              	Action       Action
                                                                                                                                                                                                                                                                                                                                                              	PullRequest  PullRequest
                                                                                                                                                                                                                                                                                                                                                              	Repo         Repository
                                                                                                                                                                                                                                                                                                                                                              	Review       Review
                                                                                                                                                                                                                                                                                                                                                              	Installation *InstallationRef
                                                                                                                                                                                                                                                                                                                                                              	// GUID is included in the header of the request received by Github.
                                                                                                                                                                                                                                                                                                                                                              	GUID string
                                                                                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                                                                                ReviewHook represents a review web hook

                                                                                                                                                                                                                                                                                                                                                                func (*ReviewHook) GetInstallationRef

                                                                                                                                                                                                                                                                                                                                                                func (h *ReviewHook) GetInstallationRef() *InstallationRef

                                                                                                                                                                                                                                                                                                                                                                  GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                                                                                                                                                                                                                                                  func (*ReviewHook) Kind

                                                                                                                                                                                                                                                                                                                                                                  func (h *ReviewHook) Kind() WebhookKind

                                                                                                                                                                                                                                                                                                                                                                    Kind returns the kind of webhook

                                                                                                                                                                                                                                                                                                                                                                    func (*ReviewHook) Repository

                                                                                                                                                                                                                                                                                                                                                                    func (h *ReviewHook) Repository() Repository

                                                                                                                                                                                                                                                                                                                                                                      Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                                                                                                                                                                                                                                                      type ReviewInput

                                                                                                                                                                                                                                                                                                                                                                      type ReviewInput struct {
                                                                                                                                                                                                                                                                                                                                                                      	Body     string
                                                                                                                                                                                                                                                                                                                                                                      	Sha      string
                                                                                                                                                                                                                                                                                                                                                                      	Event    string
                                                                                                                                                                                                                                                                                                                                                                      	Comments []*ReviewCommentInput
                                                                                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                                                                                        ReviewInput provides the input fields required for creating or updating a review.

                                                                                                                                                                                                                                                                                                                                                                        type ReviewService

                                                                                                                                                                                                                                                                                                                                                                        type ReviewService interface {
                                                                                                                                                                                                                                                                                                                                                                        	// Find returns the review by id.
                                                                                                                                                                                                                                                                                                                                                                        	Find(context.Context, string, int, int) (*Review, *Response, error)
                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                        	// List returns the review list.
                                                                                                                                                                                                                                                                                                                                                                        	List(context.Context, string, int, ListOptions) ([]*Review, *Response, error)
                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                        	// Create creates a review.
                                                                                                                                                                                                                                                                                                                                                                        	Create(context.Context, string, int, *ReviewInput) (*Review, *Response, error)
                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                        	// Delete deletes a review.
                                                                                                                                                                                                                                                                                                                                                                        	Delete(context.Context, string, int, int) (*Response, error)
                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                        	// ListComments returns comments from a review
                                                                                                                                                                                                                                                                                                                                                                        	ListComments(context.Context, string, int, int, ListOptions) ([]*ReviewComment, *Response, error)
                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                        	// Update updates the body of a review
                                                                                                                                                                                                                                                                                                                                                                        	Update(context.Context, string, int, int, string) (*Review, *Response, error)
                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                        	// Submit submits a pending review
                                                                                                                                                                                                                                                                                                                                                                        	Submit(context.Context, string, int, int, *ReviewSubmitInput) (*Review, *Response, error)
                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                        	// Dismiss dismisses a review
                                                                                                                                                                                                                                                                                                                                                                        	Dismiss(context.Context, string, int, int, string) (*Review, *Response, error)
                                                                                                                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                                                                                                                          ReviewService provides access to review resources.

                                                                                                                                                                                                                                                                                                                                                                          type ReviewSubmitInput

                                                                                                                                                                                                                                                                                                                                                                          type ReviewSubmitInput struct {
                                                                                                                                                                                                                                                                                                                                                                          	Body  string
                                                                                                                                                                                                                                                                                                                                                                          	Event string
                                                                                                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                                                                                                            ReviewSubmitInput provides the input fields required for submitting a pending review.

                                                                                                                                                                                                                                                                                                                                                                            type SearchIssue

                                                                                                                                                                                                                                                                                                                                                                            type SearchIssue struct {
                                                                                                                                                                                                                                                                                                                                                                            	Issue
                                                                                                                                                                                                                                                                                                                                                                            	Repository Repository
                                                                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                                                                              SearchIssue for the results of a search which queries across repositories

                                                                                                                                                                                                                                                                                                                                                                              type SearchOptions

                                                                                                                                                                                                                                                                                                                                                                              type SearchOptions struct {
                                                                                                                                                                                                                                                                                                                                                                              	Query     string
                                                                                                                                                                                                                                                                                                                                                                              	Sort      string
                                                                                                                                                                                                                                                                                                                                                                              	Ascending bool
                                                                                                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                                                                                                SearchOptions thte query options for a search

                                                                                                                                                                                                                                                                                                                                                                                func (*SearchOptions) QueryArgument

                                                                                                                                                                                                                                                                                                                                                                                func (o *SearchOptions) QueryArgument() string

                                                                                                                                                                                                                                                                                                                                                                                  QueryArgument returns the query argument for the search using '+' to separate the search terms while escaping :

                                                                                                                                                                                                                                                                                                                                                                                  type SecretFunc

                                                                                                                                                                                                                                                                                                                                                                                  type SecretFunc func(webhook Webhook) (string, error)

                                                                                                                                                                                                                                                                                                                                                                                    SecretFunc provides the Webhook parser with the secret key used to validate webhook authenticity.

                                                                                                                                                                                                                                                                                                                                                                                    type Signature

                                                                                                                                                                                                                                                                                                                                                                                    type Signature struct {
                                                                                                                                                                                                                                                                                                                                                                                    	Name  string
                                                                                                                                                                                                                                                                                                                                                                                    	Email string
                                                                                                                                                                                                                                                                                                                                                                                    	Date  time.Time
                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                    	// Fields are optional. The provider may choose to
                                                                                                                                                                                                                                                                                                                                                                                    	// include account information in the response.
                                                                                                                                                                                                                                                                                                                                                                                    	Login  string
                                                                                                                                                                                                                                                                                                                                                                                    	Avatar string
                                                                                                                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                                                                                                                      Signature identifies a git commit creator.

                                                                                                                                                                                                                                                                                                                                                                                      type StarHook

                                                                                                                                                                                                                                                                                                                                                                                      type StarHook struct {
                                                                                                                                                                                                                                                                                                                                                                                      	Action    Action
                                                                                                                                                                                                                                                                                                                                                                                      	StarredAt time.Time
                                                                                                                                                                                                                                                                                                                                                                                      	Repo      Repository
                                                                                                                                                                                                                                                                                                                                                                                      	Sender    User
                                                                                                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                                                                                                        StarHook represents a star event. This is currently GitHub-specific.

                                                                                                                                                                                                                                                                                                                                                                                        func (*StarHook) GetInstallationRef

                                                                                                                                                                                                                                                                                                                                                                                        func (h *StarHook) GetInstallationRef() *InstallationRef

                                                                                                                                                                                                                                                                                                                                                                                          GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                                                                                                                                                                                                                                                                          func (*StarHook) Kind

                                                                                                                                                                                                                                                                                                                                                                                          func (h *StarHook) Kind() WebhookKind

                                                                                                                                                                                                                                                                                                                                                                                            Kind returns the kind of webhook

                                                                                                                                                                                                                                                                                                                                                                                            func (*StarHook) Repository

                                                                                                                                                                                                                                                                                                                                                                                            func (h *StarHook) Repository() Repository

                                                                                                                                                                                                                                                                                                                                                                                              Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                                                                                                                                                                                                                                                                              type State

                                                                                                                                                                                                                                                                                                                                                                                              type State int

                                                                                                                                                                                                                                                                                                                                                                                                State represents the commit state.

                                                                                                                                                                                                                                                                                                                                                                                                const (
                                                                                                                                                                                                                                                                                                                                                                                                	StateUnknown State = iota
                                                                                                                                                                                                                                                                                                                                                                                                	StateFailure
                                                                                                                                                                                                                                                                                                                                                                                                	StateCanceled
                                                                                                                                                                                                                                                                                                                                                                                                	StateError
                                                                                                                                                                                                                                                                                                                                                                                                	StateExpected
                                                                                                                                                                                                                                                                                                                                                                                                	StatePending
                                                                                                                                                                                                                                                                                                                                                                                                	StateRunning
                                                                                                                                                                                                                                                                                                                                                                                                	StateSuccess
                                                                                                                                                                                                                                                                                                                                                                                                )

                                                                                                                                                                                                                                                                                                                                                                                                  State values.

                                                                                                                                                                                                                                                                                                                                                                                                  func ToState

                                                                                                                                                                                                                                                                                                                                                                                                  func ToState(s string) State

                                                                                                                                                                                                                                                                                                                                                                                                    ToState converts the given text to a state

                                                                                                                                                                                                                                                                                                                                                                                                    func (State) MarshalJSON

                                                                                                                                                                                                                                                                                                                                                                                                    func (s State) MarshalJSON() ([]byte, error)

                                                                                                                                                                                                                                                                                                                                                                                                      MarshalJSON marshals State to JSON

                                                                                                                                                                                                                                                                                                                                                                                                      func (State) String

                                                                                                                                                                                                                                                                                                                                                                                                      func (s State) String() string

                                                                                                                                                                                                                                                                                                                                                                                                        String returns a string representation of the State

                                                                                                                                                                                                                                                                                                                                                                                                        func (*State) UnmarshalJSON

                                                                                                                                                                                                                                                                                                                                                                                                        func (s *State) UnmarshalJSON(b []byte) error

                                                                                                                                                                                                                                                                                                                                                                                                          UnmarshalJSON unmarshals JSON to State

                                                                                                                                                                                                                                                                                                                                                                                                          type StateCannotBeChanged

                                                                                                                                                                                                                                                                                                                                                                                                          type StateCannotBeChanged struct {
                                                                                                                                                                                                                                                                                                                                                                                                          	Message string
                                                                                                                                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                                                                                                                                            StateCannotBeChanged represents the error that occurs when a resource cannot be changed

                                                                                                                                                                                                                                                                                                                                                                                                            func (StateCannotBeChanged) Error

                                                                                                                                                                                                                                                                                                                                                                                                            func (s StateCannotBeChanged) Error() string

                                                                                                                                                                                                                                                                                                                                                                                                            type Status

                                                                                                                                                                                                                                                                                                                                                                                                            type Status struct {
                                                                                                                                                                                                                                                                                                                                                                                                            	State  State
                                                                                                                                                                                                                                                                                                                                                                                                            	Label  string
                                                                                                                                                                                                                                                                                                                                                                                                            	Desc   string
                                                                                                                                                                                                                                                                                                                                                                                                            	Target string
                                                                                                                                                                                                                                                                                                                                                                                                            	Link   string
                                                                                                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                                                                                                              Status represents a commit status.

                                                                                                                                                                                                                                                                                                                                                                                                              Example (Create)
                                                                                                                                                                                                                                                                                                                                                                                                              Output:
                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                              Example (List)
                                                                                                                                                                                                                                                                                                                                                                                                              Output:
                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                              

                                                                                                                                                                                                                                                                                                                                                                                                              func ConvertStatusInputToStatus

                                                                                                                                                                                                                                                                                                                                                                                                              func ConvertStatusInputToStatus(input *StatusInput) *Status

                                                                                                                                                                                                                                                                                                                                                                                                                ConvertStatusInputToStatus converts the input to a status

                                                                                                                                                                                                                                                                                                                                                                                                                func ConvertStatusInputsToStatuses

                                                                                                                                                                                                                                                                                                                                                                                                                func ConvertStatusInputsToStatuses(inputs []*StatusInput) []*Status

                                                                                                                                                                                                                                                                                                                                                                                                                  ConvertStatusInputsToStatuses converts the inputs to status objects

                                                                                                                                                                                                                                                                                                                                                                                                                  type StatusHook

                                                                                                                                                                                                                                                                                                                                                                                                                  type StatusHook struct {
                                                                                                                                                                                                                                                                                                                                                                                                                  	Action       Action
                                                                                                                                                                                                                                                                                                                                                                                                                  	Repo         Repository
                                                                                                                                                                                                                                                                                                                                                                                                                  	Sender       User
                                                                                                                                                                                                                                                                                                                                                                                                                  	Label        Label
                                                                                                                                                                                                                                                                                                                                                                                                                  	Installation *InstallationRef
                                                                                                                                                                                                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                                                                                                                                                                                                                    StatusHook represents a status event

                                                                                                                                                                                                                                                                                                                                                                                                                    func (*StatusHook) GetInstallationRef

                                                                                                                                                                                                                                                                                                                                                                                                                    func (h *StatusHook) GetInstallationRef() *InstallationRef

                                                                                                                                                                                                                                                                                                                                                                                                                      GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                                                                                                                                                                                                                                                                                                      func (*StatusHook) Kind

                                                                                                                                                                                                                                                                                                                                                                                                                      func (h *StatusHook) Kind() WebhookKind

                                                                                                                                                                                                                                                                                                                                                                                                                        Kind returns the kind of webhook

                                                                                                                                                                                                                                                                                                                                                                                                                        func (*StatusHook) Repository

                                                                                                                                                                                                                                                                                                                                                                                                                        func (h *StatusHook) Repository() Repository

                                                                                                                                                                                                                                                                                                                                                                                                                          Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                                                                                                                                                                                                                                                                                                          type StatusInput

                                                                                                                                                                                                                                                                                                                                                                                                                          type StatusInput struct {
                                                                                                                                                                                                                                                                                                                                                                                                                          	State  State
                                                                                                                                                                                                                                                                                                                                                                                                                          	Label  string
                                                                                                                                                                                                                                                                                                                                                                                                                          	Desc   string
                                                                                                                                                                                                                                                                                                                                                                                                                          	Target string
                                                                                                                                                                                                                                                                                                                                                                                                                          	Link   string
                                                                                                                                                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                                                                                                                                                            StatusInput provides the input fields required for creating or updating commit statuses.

                                                                                                                                                                                                                                                                                                                                                                                                                            type TagHook

                                                                                                                                                                                                                                                                                                                                                                                                                            type TagHook struct {
                                                                                                                                                                                                                                                                                                                                                                                                                            	Ref          Reference
                                                                                                                                                                                                                                                                                                                                                                                                                            	Repo         Repository
                                                                                                                                                                                                                                                                                                                                                                                                                            	Action       Action
                                                                                                                                                                                                                                                                                                                                                                                                                            	Sender       User
                                                                                                                                                                                                                                                                                                                                                                                                                            	Installation *InstallationRef
                                                                                                                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                                                                                                                              TagHook represents a tag event, eg create and delete github event types.

                                                                                                                                                                                                                                                                                                                                                                                                                              func (*TagHook) GetInstallationRef

                                                                                                                                                                                                                                                                                                                                                                                                                              func (h *TagHook) GetInstallationRef() *InstallationRef

                                                                                                                                                                                                                                                                                                                                                                                                                                GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                                                                                                                                                                                                                                                                                                                func (*TagHook) Kind

                                                                                                                                                                                                                                                                                                                                                                                                                                func (h *TagHook) Kind() WebhookKind

                                                                                                                                                                                                                                                                                                                                                                                                                                  Kind returns the kind of webhook

                                                                                                                                                                                                                                                                                                                                                                                                                                  func (*TagHook) Repository

                                                                                                                                                                                                                                                                                                                                                                                                                                  func (h *TagHook) Repository() Repository

                                                                                                                                                                                                                                                                                                                                                                                                                                    Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                                                                                                                                                                                                                                                                                                                    type Team

                                                                                                                                                                                                                                                                                                                                                                                                                                    type Team struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                    	ID          int
                                                                                                                                                                                                                                                                                                                                                                                                                                    	Name        string
                                                                                                                                                                                                                                                                                                                                                                                                                                    	Slug        string
                                                                                                                                                                                                                                                                                                                                                                                                                                    	Description string
                                                                                                                                                                                                                                                                                                                                                                                                                                    	Privacy     string
                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                    	// Parent is populated in queries
                                                                                                                                                                                                                                                                                                                                                                                                                                    	Parent *Team
                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                    	// ParentTeamID is only valid when creating / editing teams
                                                                                                                                                                                                                                                                                                                                                                                                                                    	ParentTeamID int
                                                                                                                                                                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                                                                                                                                                                      Team is a organizational team

                                                                                                                                                                                                                                                                                                                                                                                                                                      type TeamMember

                                                                                                                                                                                                                                                                                                                                                                                                                                      type TeamMember struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                      	Login   string `json:"login"`
                                                                                                                                                                                                                                                                                                                                                                                                                                      	IsAdmin bool   `json:"isAdmin,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                                                                                                                                                        TeamMember is a member of an organizational team

                                                                                                                                                                                                                                                                                                                                                                                                                                        type Token

                                                                                                                                                                                                                                                                                                                                                                                                                                        type Token struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                        	Token   string
                                                                                                                                                                                                                                                                                                                                                                                                                                        	Refresh string
                                                                                                                                                                                                                                                                                                                                                                                                                                        	Expires time.Time
                                                                                                                                                                                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                                                                                                                                                                                          Token represents the credentials used to authorize the requests to access protected resources.

                                                                                                                                                                                                                                                                                                                                                                                                                                          type TokenKey

                                                                                                                                                                                                                                                                                                                                                                                                                                          type TokenKey struct{}

                                                                                                                                                                                                                                                                                                                                                                                                                                            TokenKey is the key to use with the context.WithValue function to associate an Token value with a context.

                                                                                                                                                                                                                                                                                                                                                                                                                                            type TokenSource

                                                                                                                                                                                                                                                                                                                                                                                                                                            type TokenSource interface {
                                                                                                                                                                                                                                                                                                                                                                                                                                            	Token(context.Context) (*Token, error)
                                                                                                                                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                                                                                                                                              TokenSource returns a token.

                                                                                                                                                                                                                                                                                                                                                                                                                                              type UnknownWebhook

                                                                                                                                                                                                                                                                                                                                                                                                                                              type UnknownWebhook struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                              	Event string
                                                                                                                                                                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                                                                                                                                                                UnknownWebhook if the webhook is unknown

                                                                                                                                                                                                                                                                                                                                                                                                                                                func (UnknownWebhook) Error

                                                                                                                                                                                                                                                                                                                                                                                                                                                func (e UnknownWebhook) Error() string

                                                                                                                                                                                                                                                                                                                                                                                                                                                type User

                                                                                                                                                                                                                                                                                                                                                                                                                                                type User struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                                	ID      int
                                                                                                                                                                                                                                                                                                                                                                                                                                                	Login   string
                                                                                                                                                                                                                                                                                                                                                                                                                                                	Name    string
                                                                                                                                                                                                                                                                                                                                                                                                                                                	Email   string
                                                                                                                                                                                                                                                                                                                                                                                                                                                	Avatar  string
                                                                                                                                                                                                                                                                                                                                                                                                                                                	Link    string
                                                                                                                                                                                                                                                                                                                                                                                                                                                	IsAdmin bool `json:"isAdmin,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                	Created time.Time
                                                                                                                                                                                                                                                                                                                                                                                                                                                	Updated time.Time
                                                                                                                                                                                                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                                                                                                                                                                                                  User represents a user account.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Example (Find)
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Output:
                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Example (FindLogin)
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Output:
                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                  

                                                                                                                                                                                                                                                                                                                                                                                                                                                  type UserService

                                                                                                                                                                                                                                                                                                                                                                                                                                                  type UserService interface {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// Find returns the authenticated user.
                                                                                                                                                                                                                                                                                                                                                                                                                                                  	Find(context.Context) (*User, *Response, error)
                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// CreateToken creates a user token.
                                                                                                                                                                                                                                                                                                                                                                                                                                                  	CreateToken(context.Context, string, string) (*UserToken, *Response, error)
                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// DeleteToken deletes a user token.
                                                                                                                                                                                                                                                                                                                                                                                                                                                  	DeleteToken(context.Context, int64) (*Response, error)
                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// FindEmail returns the authenticated user email.
                                                                                                                                                                                                                                                                                                                                                                                                                                                  	FindEmail(context.Context) (string, *Response, error)
                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// FindLogin returns the user account by username.
                                                                                                                                                                                                                                                                                                                                                                                                                                                  	FindLogin(context.Context, string) (*User, *Response, error)
                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// ListInvitations lists repository or organization invitations for the current user
                                                                                                                                                                                                                                                                                                                                                                                                                                                  	ListInvitations(context.Context) ([]*Invitation, *Response, error)
                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// AcceptInvitation accepts an invitation for the current user
                                                                                                                                                                                                                                                                                                                                                                                                                                                  	AcceptInvitation(context.Context, int64) (*Response, error)
                                                                                                                                                                                                                                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                                                                                                                                                                                                                                                    UserService provides access to user account resources.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    type UserToken

                                                                                                                                                                                                                                                                                                                                                                                                                                                    type UserToken struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    	ID    int64
                                                                                                                                                                                                                                                                                                                                                                                                                                                    	Token string
                                                                                                                                                                                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                                                                                                                                                                                      UserToken represents a user token.

                                                                                                                                                                                                                                                                                                                                                                                                                                                      type WatchHook

                                                                                                                                                                                                                                                                                                                                                                                                                                                      type WatchHook struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      	Action       string
                                                                                                                                                                                                                                                                                                                                                                                                                                                      	Repo         Repository
                                                                                                                                                                                                                                                                                                                                                                                                                                                      	Sender       User
                                                                                                                                                                                                                                                                                                                                                                                                                                                      	Installation *InstallationRef
                                                                                                                                                                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                                                                                                                                                                        WatchHook represents a watch event. This is currently GitHub-specific.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        func (*WatchHook) GetInstallationRef

                                                                                                                                                                                                                                                                                                                                                                                                                                                        func (h *WatchHook) GetInstallationRef() *InstallationRef

                                                                                                                                                                                                                                                                                                                                                                                                                                                          GetInstallationRef returns the installation reference if the webhook is invoked on a GitHub App

                                                                                                                                                                                                                                                                                                                                                                                                                                                          func (*WatchHook) Kind

                                                                                                                                                                                                                                                                                                                                                                                                                                                          func (h *WatchHook) Kind() WebhookKind

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Kind returns the kind of webhook

                                                                                                                                                                                                                                                                                                                                                                                                                                                            func (*WatchHook) Repository

                                                                                                                                                                                                                                                                                                                                                                                                                                                            func (h *WatchHook) Repository() Repository

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Repository defines the repository webhook and provides a convenient way to get the associated repository without having to cast the type.

                                                                                                                                                                                                                                                                                                                                                                                                                                                              type Webhook

                                                                                                                                                                                                                                                                                                                                                                                                                                                              type Webhook interface {
                                                                                                                                                                                                                                                                                                                                                                                                                                                              	Repository() Repository
                                                                                                                                                                                                                                                                                                                                                                                                                                                              	GetInstallationRef() *InstallationRef
                                                                                                                                                                                                                                                                                                                                                                                                                                                              	Kind() WebhookKind
                                                                                                                                                                                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Webhook defines a webhook for repository events.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Example
                                                                                                                                                                                                                                                                                                                                                                                                                                                                Output:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                Example (LookupSecret)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                Output:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                

                                                                                                                                                                                                                                                                                                                                                                                                                                                                type WebhookKind

                                                                                                                                                                                                                                                                                                                                                                                                                                                                type WebhookKind string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  WebhookKind is the kind of webhook event represented

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  const (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindBranch is for branch events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindBranch WebhookKind = "branch"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindCheckRun is for check run events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindCheckRun WebhookKind = "check_run"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindCheckSuite is for check suite events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindCheckSuite WebhookKind = "check_suite"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindDeploy is for deploy events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindDeploy WebhookKind = "deploy"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindDeploymentStatus is for deployment status events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindDeploymentStatus WebhookKind = "deployment_status"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindFork is for fork events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindFork WebhookKind = "fork"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindInstallation is for app installation events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindInstallation WebhookKind = "installation"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindInstallationRepository is for app isntallation in a repository events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindInstallationRepository WebhookKind = "installation_repository"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindIssue is for issue events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindIssue WebhookKind = "issue"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindIssueComment is for issue comment events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindIssueComment WebhookKind = "issue_comment"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindLabel is for label events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindLabel WebhookKind = "label"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindPing is for ping events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindPing WebhookKind = "ping"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindPullRequest is for pull request events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindPullRequest WebhookKind = "pull_request"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindPullRequestComment is for pull request comment events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindPullRequestComment WebhookKind = "pull_request_comment"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindPush is for push events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindPush WebhookKind = "push"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindRelease is for release events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindRelease WebhookKind = "release"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindRepository is for repository events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindRepository WebhookKind = "repository"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindReview is for review events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindReview WebhookKind = "review"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindReviewCommentHook is for review comment events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindReviewCommentHook WebhookKind = "review_comment"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindStar is for star events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindStar WebhookKind = "star"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindStatus is for status events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindStatus WebhookKind = "status"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindTag is for tag events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindTag WebhookKind = "tag"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// WebhookKindWatch is for watch events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	WebhookKindWatch WebhookKind = "watch"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  )

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type WebhookService

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type WebhookService interface {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	// Parse returns the parsed the repository webhook payload.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  	Parse(req *http.Request, fn SecretFunc) (Webhook, error)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    WebhookService provides abstract functions for parsing and validating webhooks requests.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Directories

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Path Synopsis
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    driver
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    bitbucket
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Package bitbucket implements a Bitbucket Cloud client.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Package bitbucket implements a Bitbucket Cloud client.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    gitea
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Package gitea implements a Gitea client.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Package gitea implements a Gitea client.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    github
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Package github implements a GitHub client.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Package github implements a GitHub client.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    gitlab
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Package gitlab implements a GitLab client.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Package gitlab implements a GitLab client.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    gogs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Package gogs implements a Gogs client.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Package gogs implements a Gogs client.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    stash
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Package stash implements a Bitbucket Server client.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Package stash implements a Bitbucket Server client.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Package transport provides facilities for setting up authenticated http.RoundTripper given credentials and base RoundTripper.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Package transport provides facilities for setting up authenticated http.RoundTripper given credentials and base RoundTripper.