AbuseRateLimitError occurs when GitHub returns 403 Forbidden response with the
"documentation_url" field value equal to "https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits". // error message // HTTP response that caused this error RetryAfter is provided with some abuse rate limit errors. If present,
it is the amount of time that the client should wait before retrying.
Otherwise, the client should try again later (after an unspecified amount of time).(*AbuseRateLimitError) Error() string GetRetryAfter returns the RetryAfter field if it's non-nil, zero value otherwise. Is returns whether the provided error equals this error.
*AbuseRateLimitError : error
AcceptedError occurs when GitHub returns 202 Accepted response with an
empty body, which means a job was scheduled on the GitHub side to process
the information needed and cache it.
Technically, 202 Accepted is not a real error, it's just used to
indicate that results are not ready yet, but should be available soon.
The request can be repeated after some time. Raw contains the response body.(*AcceptedError) Error() string Is returns whether the provided error equals this error.
*AcceptedError : error
ActionsCache represents a GitHub action cache.
GitHub API docs: https://docs.github.com/rest/actions/cache#about-the-cache-apiCreatedAt*TimestampID*int64Key*stringLastAccessedAt*TimestampRef*stringSizeInBytes*int64Version*string GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetKey returns the Key field if it's non-nil, zero value otherwise. GetLastAccessedAt returns the LastAccessedAt field if it's non-nil, zero value otherwise. GetRef returns the Ref field if it's non-nil, zero value otherwise. GetSizeInBytes returns the SizeInBytes field if it's non-nil, zero value otherwise. GetVersion returns the Version field if it's non-nil, zero value otherwise.
ActionsCacheListOptions represents a list of all possible optional Query parameters for ListCaches method.
GitHub API docs: https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository Can be one of: "asc", "desc" Default: descKey*stringListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. The Git reference for the results you want to list.
The ref for a branch can be formatted either as refs/heads/<branch name>
or simply <branch name>. To reference a pull request use refs/pull/<number>/merge Can be one of: "created_at", "last_accessed_at", "size_in_bytes". Default: "last_accessed_at" GetDirection returns the Direction field if it's non-nil, zero value otherwise. GetKey returns the Key field if it's non-nil, zero value otherwise. GetRef returns the Ref field if it's non-nil, zero value otherwise. GetSort returns the Sort field if it's non-nil, zero value otherwise.
func (*ActionsService).ListCaches(ctx context.Context, owner, repo string, opts *ActionsCacheListOptions) (*ActionsCacheList, *Response, error)
ActivityListStarredOptions specifies the optional parameters to the
ActivityService.ListStarred method. Direction in which to sort repositories. Possible values are: asc, desc.
Default is "asc" when sort is "full_name", otherwise default is "desc".ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. How to sort the repository list. Possible values are: created, updated,
pushed, full_name. Default is "full_name".
func (*ActivityService).ListStarred(ctx context.Context, user string, opts *ActivityListStarredOptions) ([]*StarredRepository, *Response, error)
ActorLocation contains information about reported location for an actor.CountryCode*string GetCountryCode returns the CountryCode field if it's non-nil, zero value otherwise.
func (*AuditEntry).GetActorLocation() *ActorLocation
AdminEnforcedChanges represents the changes made to the AdminEnforced policy.From*bool GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*ProtectionChanges).GetAdminEnforced() *AdminEnforcedChanges
AdvancedSecurityCommittersBreakdown represents the user activity breakdown for ActiveCommitters.LastPushedDate*stringUserLogin*string GetLastPushedDate returns the LastPushedDate field if it's non-nil, zero value otherwise. GetUserLogin returns the UserLogin field if it's non-nil, zero value otherwise.
AdvisoryCVSS represents the advisory pertaining to the Common Vulnerability Scoring System.Score*float64VectorString*string GetScore returns the Score field. GetVectorString returns the VectorString field if it's non-nil, zero value otherwise.
func (*DependabotSecurityAdvisory).GetCVSS() *AdvisoryCVSS
func (*SecurityAdvisory).GetCVSS() *AdvisoryCVSS
AdvisoryCWEs represent the advisory pertaining to Common Weakness Enumeration.CWEID*stringName*string GetCWEID returns the CWEID field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise.
AdvisoryIdentifier represents the identifier for a Security Advisory.Type*stringValue*string GetType returns the Type field if it's non-nil, zero value otherwise. GetValue returns the Value field if it's non-nil, zero value otherwise.
AdvisoryReference represents the reference url for the security advisory.URL*string GetURL returns the URL field if it's non-nil, zero value otherwise.
AlertInstancesListOptions specifies optional parameters to the CodeScanningService.ListAlertInstances method.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Return code scanning alert instances for a specific branch reference.
The ref can be formatted as refs/heads/<branch name> or simply <branch name>. To reference a pull request use refs/pull/<number>/merge
func (*CodeScanningService).ListAlertInstances(ctx context.Context, owner, repo string, id int64, opts *AlertInstancesListOptions) ([]*MostRecentInstance, *Response, error)
AlertListOptions specifies optional parameters to the CodeScanningService.ListAlerts method.ListCursorOptionsListCursorOptions A cursor, as given in the Link header. If specified, the query only searches for events after this cursor. A cursor, as given in the Link header. If specified, the query only searches for events before this cursor. A cursor, as given in the Link header. If specified, the query continues the search using this cursor. For paginated result sets, the number of results per page (max 100), starting from the first matching result.
This parameter must not be used in combination with last. For paginated result sets, the number of results per page (max 100), starting from the last matching result.
This parameter must not be used in combination with first. Add ListOptions so offset pagination with integer type "page" query parameter is accepted
since ListCursorOptions accepts "page" as string only. Return code scanning alerts for a specific branch reference.
The ref can be formatted as refs/heads/<branch name> or simply <branch name>. To reference a pull request use refs/pull/<number>/merge If specified, only code scanning alerts with this severity will be returned. Possible values are: critical, high, medium, low, warning, note, error. State of the code scanning alerts to list. Set to closed to list only closed code scanning alerts. Default: open The name of a code scanning tool. Only results by this tool will be listed.
func (*CodeScanningService).ListAlertsForOrg(ctx context.Context, org string, opts *AlertListOptions) ([]*Alert, *Response, error)
func (*CodeScanningService).ListAlertsForRepo(ctx context.Context, owner, repo string, opts *AlertListOptions) ([]*Alert, *Response, error)
AllowDeletionsEnforcementLevelChanges represents the changes made to the AllowDeletionsEnforcementLevel policy.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*ProtectionChanges).GetAllowDeletionsEnforcementLevel() *AllowDeletionsEnforcementLevelChanges
AllowForcePushes represents the configuration to accept forced pushes on protected branches.Enabledbool
func (*Protection).GetAllowForcePushes() *AllowForcePushes
AllowForkSyncing represents whether users can pull changes from upstream when the branch is locked.Enabled*bool GetEnabled returns the Enabled field if it's non-nil, zero value otherwise.
func (*Protection).GetAllowForkSyncing() *AllowForkSyncing
AnalysesListOptions specifies optional parameters to the CodeScanningService.ListAnalysesForRepo method.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Return code scanning analyses for a specific branch reference.
The ref can be formatted as refs/heads/<branch name> or simply <branch name>. To reference a pull request use refs/pull/<number>/merge Return code scanning analyses belonging to the same SARIF upload. GetRef returns the Ref field if it's non-nil, zero value otherwise. GetSarifID returns the SarifID field if it's non-nil, zero value otherwise.
func (*CodeScanningService).ListAnalysesForRepo(ctx context.Context, owner, repo string, opts *AnalysesListOptions) ([]*ScanningAnalysis, *Response, error)
APIMeta represents metadata about the GitHub API. An array of IP addresses in CIDR format specifying the addresses
which serve GitHub APIs. An array of IP addresses in CIDR format specifying the IP addresses
GitHub Actions will originate from. An array of IP addresses in CIDR format specifying the IP addresses
Dependabot will originate from. GitHub services and their associated domains. Note that many of these domains
are represented as wildcards (e.g. "*.github.com"). An array of IP addresses in CIDR format specifying the Git servers
for GitHub.com. An array of IP addresses specifying the addresses that source imports
will originate from on GitHub Enterprise Cloud. An array of IP addresses in CIDR format specifying the addresses
that incoming service hooks will originate from on GitHub.com. An array of IP addresses specifying the addresses that source imports
will originate from on GitHub.com. An array of IP addresses in CIDR format specifying the addresses
which serve GitHub Packages. An array of IP addresses in CIDR format specifying the addresses
which serve GitHub Pages websites. A map of algorithms to SSH key fingerprints. An array of SSH keys. Whether authentication with username and password is supported.
(GitHub Enterprise instances using CAS or OAuth for authentication
will return false. Features like Basic Authentication with a
username and password, sudo mode, and two-factor authentication are
not supported on these servers.) An array of IP addresses in CIDR format specifying the addresses
which serve GitHub websites. GetDomains returns the Domains field. GetSSHKeyFingerprints returns the SSHKeyFingerprints map if it's non-nil, an empty map otherwise. GetVerifiablePasswordAuthentication returns the VerifiablePasswordAuthentication field if it's non-nil, zero value otherwise.
func (*Client).APIMeta(ctx context.Context) (*APIMeta, *Response, error)
func (*MetaService).Get(ctx context.Context) (*APIMeta, *Response, error)
AppConfig describes the configuration of a GitHub App.ClientID*stringClientSecret*stringCreatedAt*TimestampDescription*stringExternalURL*stringHTMLURL*stringID*int64Name*stringNodeID*stringOwner*UserPEM*stringSlug*stringUpdatedAt*TimestampWebhookSecret*string GetClientID returns the ClientID field if it's non-nil, zero value otherwise. GetClientSecret returns the ClientSecret field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDescription returns the Description field if it's non-nil, zero value otherwise. GetExternalURL returns the ExternalURL field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetOwner returns the Owner field. GetPEM returns the PEM field if it's non-nil, zero value otherwise. GetSlug returns the Slug field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. GetWebhookSecret returns the WebhookSecret field if it's non-nil, zero value otherwise.
func (*AppsService).CompleteAppManifest(ctx context.Context, code string) (*AppConfig, *Response, error)
ArchivedAt represents an archiving date change.From*TimestampTo*Timestamp GetFrom returns the From field if it's non-nil, zero value otherwise. GetTo returns the To field if it's non-nil, zero value otherwise.
func (*ProjectV2ItemChange).GetArchivedAt() *ArchivedAt
Artifact represents a GitHub artifact. Artifacts allow sharing
data between jobs in a workflow and provide storage for data
once a workflow is complete.
GitHub API docs: https://docs.github.com/rest/actions/artifactsArchiveDownloadURL*stringCreatedAt*TimestampExpired*boolExpiresAt*TimestampID*int64Name*stringNodeID*stringSizeInBytes*int64URL*stringUpdatedAt*TimestampWorkflowRun*ArtifactWorkflowRun GetArchiveDownloadURL returns the ArchiveDownloadURL field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetExpired returns the Expired field if it's non-nil, zero value otherwise. GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetSizeInBytes returns the SizeInBytes field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. GetWorkflowRun returns the WorkflowRun field.
func (*ActionsService).GetArtifact(ctx context.Context, owner, repo string, artifactID int64) (*Artifact, *Response, error)
ArtifactWorkflowRun represents a GitHub artifact's workflow run.
GitHub API docs: https://docs.github.com/rest/actions/artifactsHeadBranch*stringHeadRepositoryID*int64HeadSHA*stringID*int64RepositoryID*int64 GetHeadBranch returns the HeadBranch field if it's non-nil, zero value otherwise. GetHeadRepositoryID returns the HeadRepositoryID field if it's non-nil, zero value otherwise. GetHeadSHA returns the HeadSHA field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetRepositoryID returns the RepositoryID field if it's non-nil, zero value otherwise.
func (*Artifact).GetWorkflowRun() *ArtifactWorkflowRun
Attachment represents a GitHub Apps attachment.Body*stringID*int64Title*string GetBody returns the Body field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetTitle returns the Title field if it's non-nil, zero value otherwise.
func (*AppsService).CreateAttachment(ctx context.Context, contentReferenceID int64, title, body string) (*Attachment, *Response, error)
AuditEntry describes the fields that may be represented by various audit-log "action" entries.
There are many other fields that may be present depending on the action. You can access those
in AdditionalFields.
For a list of actions see - https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#audit-log-actions // The name of the action that was performed, for example `user.login` or `repo.create`. // The actor who performed the action.ActorID*int64ActorLocation*ActorLocation All fields that are not explicitly defined in the struct are captured here.Business*stringBusinessID*int64CreatedAt*Timestamp Some events types have a data field that contains additional information about the event.DocumentID*stringExternalIdentityNameID*stringExternalIdentityUsername*stringHashedToken*stringOrg*stringOrgID*int64 // The time the audit log event occurred, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time).TokenID*int64TokenScopes*string // The user that was affected by the action performed (if available).UserID*int64 GetAction returns the Action field if it's non-nil, zero value otherwise. GetActor returns the Actor field if it's non-nil, zero value otherwise. GetActorID returns the ActorID field if it's non-nil, zero value otherwise. GetActorLocation returns the ActorLocation field. GetBusiness returns the Business field if it's non-nil, zero value otherwise. GetBusinessID returns the BusinessID field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDocumentID returns the DocumentID field if it's non-nil, zero value otherwise. GetExternalIdentityNameID returns the ExternalIdentityNameID field if it's non-nil, zero value otherwise. GetExternalIdentityUsername returns the ExternalIdentityUsername field if it's non-nil, zero value otherwise. GetHashedToken returns the HashedToken field if it's non-nil, zero value otherwise. GetOrg returns the Org field if it's non-nil, zero value otherwise. GetOrgID returns the OrgID field if it's non-nil, zero value otherwise. GetTimestamp returns the Timestamp field if it's non-nil, zero value otherwise. GetTokenID returns the TokenID field if it's non-nil, zero value otherwise. GetTokenScopes returns the TokenScopes field if it's non-nil, zero value otherwise. GetUser returns the User field if it's non-nil, zero value otherwise. GetUserID returns the UserID field if it's non-nil, zero value otherwise.(*AuditEntry) MarshalJSON() ([]byte, error)(*AuditEntry) UnmarshalJSON(data []byte) error
*AuditEntry : github.com/goccy/go-json.Marshaler
*AuditEntry : github.com/goccy/go-json.Unmarshaler
*AuditEntry : encoding/json.Marshaler
*AuditEntry : encoding/json.Unmarshaler
func (*EnterpriseService).GetAuditLog(ctx context.Context, enterprise string, opts *GetAuditLogOptions) ([]*AuditEntry, *Response, error)
func (*OrganizationsService).GetAuditLog(ctx context.Context, org string, opts *GetAuditLogOptions) ([]*AuditEntry, *Response, error)
Authorization represents an individual GitHub authorization.App*AuthorizationAppCreatedAt*TimestampFingerprint*stringHashedToken*stringID*int64Note*stringNoteURL*stringScopes[]ScopeToken*stringTokenLastEight*stringURL*stringUpdatedAt*Timestamp User is only populated by the Check and Reset methods. GetApp returns the App field. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetFingerprint returns the Fingerprint field if it's non-nil, zero value otherwise. GetHashedToken returns the HashedToken field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetNote returns the Note field if it's non-nil, zero value otherwise. GetNoteURL returns the NoteURL field if it's non-nil, zero value otherwise. GetToken returns the Token field if it's non-nil, zero value otherwise. GetTokenLastEight returns the TokenLastEight field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. GetUser returns the User field.( Authorization) String() string
Authorization : expvar.Var
Authorization : fmt.Stringer
func (*AuthorizationsService).Check(ctx context.Context, clientID, accessToken string) (*Authorization, *Response, error)
func (*AuthorizationsService).CreateImpersonation(ctx context.Context, username string, authReq *AuthorizationRequest) (*Authorization, *Response, error)
func (*AuthorizationsService).Reset(ctx context.Context, clientID, accessToken string) (*Authorization, *Response, error)
AuthorizationApp represents an individual GitHub app (in the context of authorization).ClientID*stringName*stringURL*string GetClientID returns the ClientID field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.( AuthorizationApp) String() string
AuthorizationApp : expvar.Var
AuthorizationApp : fmt.Stringer
func (*Authorization).GetApp() *AuthorizationApp
func (*Grant).GetApp() *AuthorizationApp
AuthorizationRequest represents a request to create an authorization.ClientID*stringClientSecret*stringFingerprint*stringNote*stringNoteURL*stringScopes[]Scope GetClientID returns the ClientID field if it's non-nil, zero value otherwise. GetClientSecret returns the ClientSecret field if it's non-nil, zero value otherwise. GetFingerprint returns the Fingerprint field if it's non-nil, zero value otherwise. GetNote returns the Note field if it's non-nil, zero value otherwise. GetNoteURL returns the NoteURL field if it's non-nil, zero value otherwise.( AuthorizationRequest) String() string
AuthorizationRequest : expvar.Var
AuthorizationRequest : fmt.Stringer
func (*AuthorizationsService).CreateImpersonation(ctx context.Context, username string, authReq *AuthorizationRequest) (*Authorization, *Response, error)
AuthorizationsService handles communication with the authorization related
methods of the GitHub API.
This service requires HTTP Basic Authentication; it cannot be accessed using
an OAuth token.
GitHub API docs: https://docs.github.com/rest/oauth-authorizations Check if an OAuth token is valid for a specific app.
Note that this operation requires the use of BasicAuth, but where the
username is the OAuth application clientID, and the password is its
clientSecret. Invalid tokens will return a 404 Not Found.
The returned Authorization.User field will be populated.
GitHub API docs: https://docs.github.com/rest/apps/oauth-applications#check-a-token CreateImpersonation creates an impersonation OAuth token.
This requires admin permissions. With the returned Authorization.Token
you can e.g. create or delete a user's public SSH key. NOTE: creating a
new token automatically revokes an existing one.
GitHub API docs: https://docs.github.com/enterprise-server@3.12/rest/enterprise-admin/users#create-an-impersonation-oauth-token DeleteGrant deletes an OAuth application grant. Deleting an application's
grant will also delete all OAuth tokens associated with the application for
the user.
GitHub API docs: https://docs.github.com/rest/apps/oauth-applications#delete-an-app-authorization DeleteImpersonation deletes an impersonation OAuth token.
NOTE: there can be only one at a time.
GitHub API docs: https://docs.github.com/enterprise-server@3.12/rest/enterprise-admin/users#delete-an-impersonation-oauth-token Reset is used to reset a valid OAuth token without end user involvement.
Applications must save the "token" property in the response, because changes
take effect immediately.
Note that this operation requires the use of BasicAuth, but where the
username is the OAuth application clientID, and the password is its
clientSecret. Invalid tokens will return a 404 Not Found.
The returned Authorization.User field will be populated.
GitHub API docs: https://docs.github.com/rest/apps/oauth-applications#reset-a-token Revoke an authorization for an application.
Note that this operation requires the use of BasicAuth, but where the
username is the OAuth application clientID, and the password is its
clientSecret. Invalid tokens will return a 404 Not Found.
GitHub API docs: https://docs.github.com/rest/apps/oauth-applications#delete-an-app-token
AuthorizationUpdateRequest represents a request to update an authorization.
Note that for any one update, you must only provide one of the "scopes"
fields. That is, you may provide only one of "Scopes", or "AddScopes", or
"RemoveScopes".
GitHub API docs: https://docs.github.com/rest/oauth-authorizations#update-an-existing-authorizationAddScopes[]stringFingerprint*stringNote*stringNoteURL*stringRemoveScopes[]stringScopes[]string GetFingerprint returns the Fingerprint field if it's non-nil, zero value otherwise. GetNote returns the Note field if it's non-nil, zero value otherwise. GetNoteURL returns the NoteURL field if it's non-nil, zero value otherwise.( AuthorizationUpdateRequest) String() string
AuthorizationUpdateRequest : expvar.Var
AuthorizationUpdateRequest : fmt.Stringer
AuthorizedActorsOnly represents if the branch rule can be edited by authorized actors only.From*bool GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*ProtectionChanges).GetAuthorizedActorsOnly() *AuthorizedActorsOnly
AuthorizedDismissalActorsOnlyChanges represents the changes made to the AuthorizedDismissalActorsOnly policy.From*bool GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*ProtectionChanges).GetAuthorizedDismissalActorsOnly() *AuthorizedDismissalActorsOnlyChanges
AutolinkOptions specifies parameters for RepositoriesService.AddAutolink method.IsAlphanumeric*boolKeyPrefix*stringURLTemplate*string GetIsAlphanumeric returns the IsAlphanumeric field if it's non-nil, zero value otherwise. GetKeyPrefix returns the KeyPrefix field if it's non-nil, zero value otherwise. GetURLTemplate returns the URLTemplate field if it's non-nil, zero value otherwise.
func (*RepositoriesService).AddAutolink(ctx context.Context, owner, repo string, opts *AutolinkOptions) (*Autolink, *Response, error)
AutoTriggerCheck enables or disables automatic creation of CheckSuite events upon pushes to the repository. // The id of the GitHub App. (Required.) // Set to "true" to enable automatic creation of CheckSuite events upon pushes to the repository, or "false" to disable them. Default: "true" (Required.) GetAppID returns the AppID field if it's non-nil, zero value otherwise. GetSetting returns the Setting field if it's non-nil, zero value otherwise.
BasicAuthTransport is an http.RoundTripper that authenticates all requests
using HTTP Basic Authentication with the provided username and password. It
additionally supports users who have two-factor authentication enabled on
their GitHub account. // one-time password for users with two-factor auth enabled // GitHub password Transport is the underlying HTTP transport to use when making requests.
It will default to http.DefaultTransport if nil. // GitHub username Client returns an *http.Client that makes requests that are authenticated
using HTTP Basic Authentication. RoundTrip implements the RoundTripper interface.
*BasicAuthTransport : net/http.RoundTripper
BlockCreations represents whether users can push changes that create branches. If this is true, this
setting blocks pushes that create new branches, unless the push is initiated by a user, team, or app
which has the ability to push.Enabled*bool GetEnabled returns the Enabled field if it's non-nil, zero value otherwise.
func (*Protection).GetBlockCreations() *BlockCreations
Branch represents a repository branchCommit*RepositoryCommitName*stringProtected*bool Protection will always be included in APIs which return the
'Branch With Protection' schema such as 'Get a branch', but may
not be included in APIs that return the `Short Branch` schema
such as 'List branches'. In such cases, if branch protection is
enabled, Protected will be `true` but this will be nil, and
additional protection details can be obtained by calling GetBranch(). GetCommit returns the Commit field. GetName returns the Name field if it's non-nil, zero value otherwise. GetProtected returns the Protected field if it's non-nil, zero value otherwise. GetProtection returns the Protection field.
func (*RepositoriesService).GetBranch(ctx context.Context, owner, repo, branch string, maxRedirects int) (*Branch, *Response, error)
func (*RepositoriesService).ListBranches(ctx context.Context, owner string, repo string, opts *BranchListOptions) ([]*Branch, *Response, error)
func (*RepositoriesService).RenameBranch(ctx context.Context, owner, repo, branch, newName string) (*Branch, *Response, error)
BranchListOptions specifies the optional parameters to the
RepositoriesService.ListBranches method.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Setting to true returns only protected branches.
When set to false, only unprotected branches are returned.
Omitting this parameter returns all branches.
Default: nil GetProtected returns the Protected field if it's non-nil, zero value otherwise.
func (*RepositoriesService).ListBranches(ctx context.Context, owner string, repo string, opts *BranchListOptions) ([]*Branch, *Response, error)
BranchProtectionRule represents the rule applied to a repositories branch.AdminEnforced*boolAllowDeletionsEnforcementLevel*stringAllowForcePushesEnforcementLevel*stringAuthorizedActorNames[]stringAuthorizedActorsOnly*boolAuthorizedDismissalActorsOnly*boolCreatedAt*TimestampDismissStaleReviewsOnPush*boolID*int64IgnoreApprovalsFromContributors*boolLinearHistoryRequirementEnforcementLevel*stringMergeQueueEnforcementLevel*stringName*stringPullRequestReviewsEnforcementLevel*stringRepositoryID*int64RequireCodeOwnerReview*boolRequiredApprovingReviewCount*intRequiredConversationResolutionLevel*stringRequiredDeploymentsEnforcementLevel*stringRequiredStatusChecks[]stringRequiredStatusChecksEnforcementLevel*stringSignatureRequirementEnforcementLevel*stringStrictRequiredStatusChecksPolicy*boolUpdatedAt*Timestamp GetAdminEnforced returns the AdminEnforced field if it's non-nil, zero value otherwise. GetAllowDeletionsEnforcementLevel returns the AllowDeletionsEnforcementLevel field if it's non-nil, zero value otherwise. GetAllowForcePushesEnforcementLevel returns the AllowForcePushesEnforcementLevel field if it's non-nil, zero value otherwise. GetAuthorizedActorsOnly returns the AuthorizedActorsOnly field if it's non-nil, zero value otherwise. GetAuthorizedDismissalActorsOnly returns the AuthorizedDismissalActorsOnly field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDismissStaleReviewsOnPush returns the DismissStaleReviewsOnPush field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetIgnoreApprovalsFromContributors returns the IgnoreApprovalsFromContributors field if it's non-nil, zero value otherwise. GetLinearHistoryRequirementEnforcementLevel returns the LinearHistoryRequirementEnforcementLevel field if it's non-nil, zero value otherwise. GetMergeQueueEnforcementLevel returns the MergeQueueEnforcementLevel field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetPullRequestReviewsEnforcementLevel returns the PullRequestReviewsEnforcementLevel field if it's non-nil, zero value otherwise. GetRepositoryID returns the RepositoryID field if it's non-nil, zero value otherwise. GetRequireCodeOwnerReview returns the RequireCodeOwnerReview field if it's non-nil, zero value otherwise. GetRequiredApprovingReviewCount returns the RequiredApprovingReviewCount field if it's non-nil, zero value otherwise. GetRequiredConversationResolutionLevel returns the RequiredConversationResolutionLevel field if it's non-nil, zero value otherwise. GetRequiredDeploymentsEnforcementLevel returns the RequiredDeploymentsEnforcementLevel field if it's non-nil, zero value otherwise. GetRequiredStatusChecksEnforcementLevel returns the RequiredStatusChecksEnforcementLevel field if it's non-nil, zero value otherwise. GetSignatureRequirementEnforcementLevel returns the SignatureRequirementEnforcementLevel field if it's non-nil, zero value otherwise. GetStrictRequiredStatusChecksPolicy returns the StrictRequiredStatusChecksPolicy field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
func (*BranchProtectionRuleEvent).GetRule() *BranchProtectionRule
BranchRestrictions represents the restriction that only certain users or
teams may push to a branch. The list of app slugs with push access. The list of team slugs with push access. The list of user logins with push access.
func (*Protection).GetRestrictions() *BranchRestrictions
BranchRestrictionsRequest represents the request to create/edit the
restriction that only certain users or teams may push to a branch. It is
separate from BranchRestrictions above because the request structure is
different from the response structure. The list of app slugs with push access. The list of team slugs with push access. (Required; use []string{} instead of nil for empty list.) The list of user logins with push access. (Required; use []string{} instead of nil for empty list.)
func (*ProtectionRequest).GetRestrictions() *BranchRestrictionsRequest
BypassActor represents the bypass actors from a ruleset.ActorID*int64 Possible values for ActorType are: RepositoryRole, Team, Integration, OrganizationAdmin Possible values for BypassMode are: always, pull_request GetActorID returns the ActorID field if it's non-nil, zero value otherwise. GetActorType returns the ActorType field if it's non-nil, zero value otherwise. GetBypassMode returns the BypassMode field if it's non-nil, zero value otherwise.
BypassPullRequestAllowances represents the people, teams, or apps who are allowed to bypass required pull requests. The list of app slugs with push access. The list of team slugs with push access. The list of user logins with push access.
func (*PullRequestReviewsEnforcement).GetBypassPullRequestAllowances() *BypassPullRequestAllowances
BypassPullRequestAllowancesRequest represents the people, teams, or apps who are
allowed to bypass required pull requests.
It is separate from BypassPullRequestAllowances above because the request structure is
different from the response structure. The list of app slugs with push access. The list of team slugs with push access. (Required; use []string{} instead of nil for empty list.) The list of user logins with push access. (Required; use []string{} instead of nil for empty list.)
func (*PullRequestReviewsEnforcementRequest).GetBypassPullRequestAllowancesRequest() *BypassPullRequestAllowancesRequest
func (*PullRequestReviewsEnforcementUpdate).GetBypassPullRequestAllowancesRequest() *BypassPullRequestAllowancesRequest
CheckRunAction exposes further actions the integrator can perform, which a user may trigger. // A short explanation of what this action would do. The maximum size is 40 characters. (Required.) // A reference for the action on the integrator's system. The maximum size is 20 characters. (Required.) // The text to be displayed on a button in the web UI. The maximum size is 20 characters. (Required.)
CheckRunAnnotation represents an annotation object for a CheckRun output.AnnotationLevel*stringEndColumn*intEndLine*intMessage*stringPath*stringRawDetails*stringStartColumn*intStartLine*intTitle*string GetAnnotationLevel returns the AnnotationLevel field if it's non-nil, zero value otherwise. GetEndColumn returns the EndColumn field if it's non-nil, zero value otherwise. GetEndLine returns the EndLine field if it's non-nil, zero value otherwise. GetMessage returns the Message field if it's non-nil, zero value otherwise. GetPath returns the Path field if it's non-nil, zero value otherwise. GetRawDetails returns the RawDetails field if it's non-nil, zero value otherwise. GetStartColumn returns the StartColumn field if it's non-nil, zero value otherwise. GetStartLine returns the StartLine field if it's non-nil, zero value otherwise. GetTitle returns the Title field if it's non-nil, zero value otherwise.
func (*ChecksService).ListCheckRunAnnotations(ctx context.Context, owner, repo string, checkRunID int64, opts *ListOptions) ([]*CheckRunAnnotation, *Response, error)
CheckRunEvent is triggered when a check run is "created", "completed", or "rerequested".
The Webhook event name is "check_run".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#check_run The action performed. Possible values are: "created", "completed", "rerequested" or "requested_action".CheckRun*CheckRunInstallation*InstallationOrg*Organization The following fields are only populated by Webhook events. The action requested by the user. Populated when the Action is "requested_action".Sender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetCheckRun returns the CheckRun field. GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepo returns the Repo field. GetRequestedAction returns the RequestedAction field. GetSender returns the Sender field.
CheckRunImage represents an image object for a CheckRun output.Alt*stringCaption*stringImageURL*string GetAlt returns the Alt field if it's non-nil, zero value otherwise. GetCaption returns the Caption field if it's non-nil, zero value otherwise. GetImageURL returns the ImageURL field if it's non-nil, zero value otherwise.
CheckSuite represents a suite of check runs.AfterSHA*stringApp*AppBeforeSHA*stringConclusion*stringCreatedAt*TimestampHeadBranch*string The following fields are only populated by Webhook events.HeadSHA*stringID*int64LatestCheckRunsCount*int64NodeID*stringPullRequests[]*PullRequestRepository*RepositoryRerequstable*boolRunsRerequstable*boolStatus*stringURL*stringUpdatedAt*Timestamp GetAfterSHA returns the AfterSHA field if it's non-nil, zero value otherwise. GetApp returns the App field. GetBeforeSHA returns the BeforeSHA field if it's non-nil, zero value otherwise. GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetHeadBranch returns the HeadBranch field if it's non-nil, zero value otherwise. GetHeadCommit returns the HeadCommit field. GetHeadSHA returns the HeadSHA field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetLatestCheckRunsCount returns the LatestCheckRunsCount field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetRepository returns the Repository field. GetRerequstable returns the Rerequstable field if it's non-nil, zero value otherwise. GetRunsRerequstable returns the RunsRerequstable field if it's non-nil, zero value otherwise. GetStatus returns the Status field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.( CheckSuite) String() string
CheckSuite : expvar.Var
CheckSuite : fmt.Stringer
func (*CheckRun).GetCheckSuite() *CheckSuite
func (*ChecksService).CreateCheckSuite(ctx context.Context, owner, repo string, opts CreateCheckSuiteOptions) (*CheckSuite, *Response, error)
func (*ChecksService).GetCheckSuite(ctx context.Context, owner, repo string, checkSuiteID int64) (*CheckSuite, *Response, error)
func (*CheckSuiteEvent).GetCheckSuite() *CheckSuite
CheckSuiteEvent is triggered when a check suite is "completed", "requested", or "rerequested".
The Webhook event name is "check_suite".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#check_suite The action performed. Possible values are: "completed", "requested" or "rerequested".CheckSuite*CheckSuiteInstallation*InstallationOrg*Organization The following fields are only populated by Webhook events.Sender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetCheckSuite returns the CheckSuite field. GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field.
A Client manages communication with the GitHub API. Services used for talking to different parts of the GitHub API.Activity*ActivityServiceAdmin*AdminServiceApps*AppsServiceAuthorizations*AuthorizationsService Base URL for API requests. Defaults to the public GitHub API, but can be
set to a domain endpoint to use with GitHub Enterprise. BaseURL should
always be specified with a trailing slash.Billing*BillingServiceChecks*ChecksServiceCodeScanning*CodeScanningServiceCodesOfConduct*CodesOfConductServiceCodespaces*CodespacesServiceCopilot*CopilotServiceDependabot*DependabotServiceDependencyGraph*DependencyGraphServiceEmojis*EmojisServiceEnterprise*EnterpriseServiceGists*GistsServiceGit*GitServiceGitignores*GitignoresServiceInteractions*InteractionsServiceIssueImport*IssueImportServiceIssues*IssuesServiceLicenses*LicensesServiceMarkdown*MarkdownServiceMarketplace*MarketplaceServiceMeta*MetaServiceMigrations*MigrationServiceOrganizations*OrganizationsServiceProjects*ProjectsServicePullRequests*PullRequestsServiceRateLimit*RateLimitServiceReactions*ReactionsServiceRepositories*RepositoriesServiceSCIM*SCIMServiceSearch*SearchServiceSecretScanning*SecretScanningServiceSecurityAdvisories*SecurityAdvisoriesServiceTeams*TeamsService Base URL for uploading files. User agent used when communicating with the GitHub API.Users*UsersService APIMeta returns information about GitHub.com.
Deprecated: Use MetaService.Get instead. BareDo sends an API request and lets you handle the api response. If an error
or API Error occurs, the error will contain more information. Otherwise you
are supposed to read and close the response's Body. If rate limit is exceeded
and reset time is in the future, BareDo returns *RateLimitError immediately
without making a network API call.
The provided ctx must be non-nil, if it is nil an error is returned. If it is
canceled or times out, ctx.Err() will be returned. Client returns the http.Client used by this GitHub client.
This should only be used for requests to the GitHub API because
request headers will contain an authorization token. 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 body will be written to v, without attempting to first
decode it. If v is nil, and no error happens, the response is returned as is.
If rate limit is exceeded and reset time is in the future, Do returns
*RateLimitError immediately without making a network API call.
The provided ctx must be non-nil, if it is nil an error is returned. If it
is canceled or times out, ctx.Err() will be returned. GetCodeOfConduct returns an individual code of conduct.
Deprecated: Use CodesOfConductService.Get instead ListCodesOfConduct returns all codes of conduct.
Deprecated: Use CodesOfConductService.List instead ListEmojis returns the emojis available to use on GitHub.
Deprecated: Use EmojisService.List instead NewFormRequest creates an API request. A relative URL can be provided in urlStr,
in which case it is resolved relative to the BaseURL of the Client.
Relative URLs should always be specified without a preceding slash.
Body is sent with Content-Type: application/x-www-form-urlencoded. NewRequest creates an API request. A relative URL can be provided in urlStr,
in which case it is resolved relative to the BaseURL of the Client.
Relative URLs should always be specified without a preceding slash. If
specified, the value pointed to by body is JSON encoded and included as the
request body. NewUploadRequest creates an upload request. A relative URL can be provided in
urlStr, in which case it is resolved relative to the UploadURL of the Client.
Relative URLs should always be specified without a preceding slash. Octocat returns an ASCII art octocat with the specified message in a speech
bubble. If message is empty, a random zen phrase is used.
Deprecated: Use MetaService.Octocat instead. RateLimits returns the rate limits for the current client.
Deprecated: Use RateLimitService.Get instead. WithAuthToken returns a copy of the client configured to use the provided token for the Authorization header. WithEnterpriseURLs returns a copy of the client configured to use the provided base and
upload URLs. If the base URL does not have the suffix "/api/v3/", it will be added
automatically. If the upload URL does not have the suffix "/api/uploads", it will be
added automatically.
Note that WithEnterpriseURLs is a convenience helper only;
its behavior is equivalent to setting the BaseURL and UploadURL fields.
Another important thing is that by default, the GitHub Enterprise URL format
should be http(s)://[hostname]/api/v3/ or you will always receive the 406 status code.
The upload URL format should be http(s)://[hostname]/api/uploads/. Zen returns a random line from The Zen of GitHub.
Deprecated: Use MetaService.Zen instead.
func NewClient(httpClient *http.Client) *Client
func NewClientWithEnvProxy() *Client
func NewEnterpriseClient(baseURL, uploadURL string, httpClient *http.Client) (*Client, error)
func NewTokenClient(_ context.Context, token string) *Client
func (*Client).WithAuthToken(token string) *Client
func (*Client).WithEnterpriseURLs(baseURL, uploadURL string) (*Client, error)
CodeResult represents a single search result.HTMLURL*stringName*stringPath*stringRepository*RepositorySHA*stringTextMatches[]*TextMatch GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetPath returns the Path field if it's non-nil, zero value otherwise. GetRepository returns the Repository field. GetSHA returns the SHA field if it's non-nil, zero value otherwise.( CodeResult) String() string
CodeResult : expvar.Var
CodeResult : fmt.Stringer
CodeScanningAlertState specifies the state of a code scanning alert.
GitHub API docs: https://docs.github.com/rest/code-scanning DismissedComment is associated with the dismissal of the alert. DismissedReason represents the reason for dismissing or closing the alert.
It is required when the state is "dismissed".
It can be one of: "false positive", "won't fix", "used in tests". State sets the state of the code scanning alert and is a required field.
You must also provide DismissedReason when you set the state to "dismissed".
State can be one of: "open", "dismissed". GetDismissedComment returns the DismissedComment field if it's non-nil, zero value otherwise. GetDismissedReason returns the DismissedReason field if it's non-nil, zero value otherwise.
func (*CodeScanningService).UpdateAlert(ctx context.Context, owner, repo string, id int64, stateInfo *CodeScanningAlertState) (*Alert, *Response, error)
CodeScanningService handles communication with the code scanning related
methods of the GitHub API.
GitHub API docs: https://docs.github.com/rest/code-scanning DeleteAnalysis deletes a single code scanning analysis from a repository.
You must use an access token with the repo scope to use this endpoint.
GitHub Apps must have the security_events read permission to use this endpoint.
The security analysis_id is the ID of the analysis, as returned from the ListAnalysesForRepo operation.
GitHub API docs: https://docs.github.com/rest/code-scanning/code-scanning#delete-a-code-scanning-analysis-from-a-repository GetAlert gets a single code scanning alert for a repository.
You must use an access token with the security_events scope to use this endpoint.
GitHub Apps must have the security_events read permission to use this endpoint.
The security alert_id is the number at the end of the security alert's URL.
GitHub API docs: https://docs.github.com/rest/code-scanning/code-scanning#get-a-code-scanning-alert GetAnalysis gets a single code scanning analysis for a repository.
You must use an access token with the security_events scope to use this endpoint.
GitHub Apps must have the security_events read permission to use this endpoint.
The security analysis_id is the ID of the analysis, as returned from the ListAnalysesForRepo operation.
GitHub API docs: https://docs.github.com/rest/code-scanning/code-scanning#get-a-code-scanning-analysis-for-a-repository GetCodeQLDatabase gets a CodeQL database for a language in a repository.
You must use an access token with the security_events scope to use this endpoint.
GitHub Apps must have the contents read permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/code-scanning/code-scanning#get-a-codeql-database-for-a-repository GetDefaultSetupConfiguration gets a code scanning default setup configuration.
You must use an access token with the repo scope to use this
endpoint with private repos or the public_repo scope for public repos. GitHub Apps must have the repo write
permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/code-scanning/code-scanning#get-a-code-scanning-default-setup-configuration GetSARIF gets information about a SARIF upload.
You must use an access token with the security_events scope to use this endpoint.
GitHub Apps must have the security_events read permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/code-scanning/code-scanning#get-information-about-a-sarif-upload ListAlertInstances lists instances of a code scanning alert.
You must use an access token with the security_events scope to use this endpoint.
GitHub Apps must have the security_events read permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/code-scanning/code-scanning#list-instances-of-a-code-scanning-alert ListAlertsForOrg lists code scanning alerts for an org.
You must use an access token with the security_events scope to use this endpoint. GitHub Apps must have the security_events
read permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/code-scanning/code-scanning#list-code-scanning-alerts-for-an-organization ListAlertsForRepo lists code scanning alerts for a repository.
Lists all open code scanning alerts for the default branch (usually master) and protected branches in a repository.
You must use an access token with the security_events scope to use this endpoint. GitHub Apps must have the security_events
read permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/code-scanning/code-scanning#list-code-scanning-alerts-for-a-repository ListAnalysesForRepo lists code scanning analyses for a repository.
Lists the details of all code scanning analyses for a repository, starting with the most recent.
You must use an access token with the security_events scope to use this endpoint.
GitHub Apps must have the security_events read permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/code-scanning/code-scanning#list-code-scanning-analyses-for-a-repository ListCodeQLDatabases lists the CodeQL databases that are available in a repository.
You must use an access token with the security_events scope to use this endpoint.
GitHub Apps must have the contents read permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/code-scanning/code-scanning#list-codeql-databases-for-a-repository UpdateAlert updates the state of a single code scanning alert for a repository.
You must use an access token with the security_events scope to use this endpoint.
GitHub Apps must have the security_events read permission to use this endpoint.
The security alert_id is the number at the end of the security alert's URL.
GitHub API docs: https://docs.github.com/rest/code-scanning/code-scanning#update-a-code-scanning-alert UpdateDefaultSetupConfiguration updates a code scanning default setup configuration.
You must use an access token with the repo scope to use this
endpoint with private repos or the public_repo scope for public repos. GitHub Apps must have the repo write
permission to use this endpoint.
This method might return an AcceptedError and a status code of 202. This is because this is the status that GitHub
returns to signify that it has now scheduled the update of the pull request branch in a background task.
GitHub API docs: https://docs.github.com/rest/code-scanning/code-scanning#update-a-code-scanning-default-setup-configuration UploadSarif uploads the result of code scanning job to GitHub.
For the parameter sarif, you must first compress your SARIF file using gzip and then translate the contents of the file into a Base64 encoding string.
You must use an access token with the security_events scope to use this endpoint. GitHub Apps must have the security_events
write permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/code-scanning/code-scanning#upload-an-analysis-as-sarif-data
Codespace represents a codespace.
GitHub API docs: https://docs.github.com/rest/codespacesBillableOwner*UserCreatedAt*TimestampDevcontainerPath*stringDisplayName*stringEnvironmentID*stringGitStatus*CodespacesGitStatusID*int64IdleTimeoutMinutes*intIdleTimeoutNotice*stringLastKnownStopNotice*stringLastUsedAt*TimestampLocation*stringMachine*CodespacesMachineMachinesURL*stringName*stringOwner*UserPendingOperation*boolPendingOperationDisabledReason*stringPrebuild*boolPullsURL*stringRecentFolders[]stringRepository*RepositoryRetentionExpiresAt*TimestampRetentionPeriodMinutes*intRuntimeConstraints*CodespacesRuntimeConstraintsStartURL*stringState*stringStopURL*stringURL*stringUpdatedAt*TimestampWebURL*string GetBillableOwner returns the BillableOwner field. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDevcontainerPath returns the DevcontainerPath field if it's non-nil, zero value otherwise. GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise. GetEnvironmentID returns the EnvironmentID field if it's non-nil, zero value otherwise. GetGitStatus returns the GitStatus field. GetID returns the ID field if it's non-nil, zero value otherwise. GetIdleTimeoutMinutes returns the IdleTimeoutMinutes field if it's non-nil, zero value otherwise. GetIdleTimeoutNotice returns the IdleTimeoutNotice field if it's non-nil, zero value otherwise. GetLastKnownStopNotice returns the LastKnownStopNotice field if it's non-nil, zero value otherwise. GetLastUsedAt returns the LastUsedAt field if it's non-nil, zero value otherwise. GetLocation returns the Location field if it's non-nil, zero value otherwise. GetMachine returns the Machine field. GetMachinesURL returns the MachinesURL field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetOwner returns the Owner field. GetPendingOperation returns the PendingOperation field if it's non-nil, zero value otherwise. GetPendingOperationDisabledReason returns the PendingOperationDisabledReason field if it's non-nil, zero value otherwise. GetPrebuild returns the Prebuild field if it's non-nil, zero value otherwise. GetPullsURL returns the PullsURL field if it's non-nil, zero value otherwise. GetRepository returns the Repository field. GetRetentionExpiresAt returns the RetentionExpiresAt field if it's non-nil, zero value otherwise. GetRetentionPeriodMinutes returns the RetentionPeriodMinutes field if it's non-nil, zero value otherwise. GetRuntimeConstraints returns the RuntimeConstraints field. GetStartURL returns the StartURL field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise. GetStopURL returns the StopURL field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. GetWebURL returns the WebURL field if it's non-nil, zero value otherwise.
func (*CodespacesService).CreateInRepo(ctx context.Context, owner, repo string, request *CreateCodespaceOptions) (*Codespace, *Response, error)
func (*CodespacesService).Start(ctx context.Context, codespaceName string) (*Codespace, *Response, error)
func (*CodespacesService).Stop(ctx context.Context, codespaceName string) (*Codespace, *Response, error)
CodespacesGitStatus represents the git status of a codespace.Ahead*intBehind*intHasUncommittedChanges*boolHasUnpushedChanges*boolRef*string GetAhead returns the Ahead field if it's non-nil, zero value otherwise. GetBehind returns the Behind field if it's non-nil, zero value otherwise. GetHasUncommittedChanges returns the HasUncommittedChanges field if it's non-nil, zero value otherwise. GetHasUnpushedChanges returns the HasUnpushedChanges field if it's non-nil, zero value otherwise. GetRef returns the Ref field if it's non-nil, zero value otherwise.
func (*Codespace).GetGitStatus() *CodespacesGitStatus
CodespacesMachine represents the machine type of a codespace.CPUs*intDisplayName*stringMemoryInBytes*int64Name*stringOperatingSystem*stringPrebuildAvailability*stringStorageInBytes*int64 GetCPUs returns the CPUs field if it's non-nil, zero value otherwise. GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise. GetMemoryInBytes returns the MemoryInBytes field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetOperatingSystem returns the OperatingSystem field if it's non-nil, zero value otherwise. GetPrebuildAvailability returns the PrebuildAvailability field if it's non-nil, zero value otherwise. GetStorageInBytes returns the StorageInBytes field if it's non-nil, zero value otherwise.
func (*Codespace).GetMachine() *CodespacesMachine
CodespacesService handles communication with the Codespaces related
methods of the GitHub API.
GitHub API docs: https://docs.github.com/rest/codespaces/ AddSelectedRepoToOrgSecret adds a repository to the list of repositories that have been granted the ability to use an organization's codespace secret.
Adds a repository to an organization secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org scope to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/organization-secrets#add-selected-repository-to-an-organization-secret AddSelectedRepoToUserSecret adds a repository to the list of repositories that have been granted the ability to use a user's codespace secret.
Adds a repository to the selected repositories for a user's codespace secret. You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint. GitHub Apps must have write access to the codespaces_user_secrets user permission and write access to the codespaces_secrets repository permission on the referenced repository to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/secrets#add-a-selected-repository-to-a-user-secret CreateInRepo creates a codespace in a repository.
Creates a codespace owned by the authenticated user in the specified repository.
You must authenticate using an access token with the codespace scope to use this endpoint.
GitHub Apps must have write access to the codespaces repository permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/codespaces#create-a-codespace-in-a-repository CreateOrUpdateOrgSecret creates or updates an orgs codespace secret
Creates or updates an organization secret with an encrypted value. Encrypt your secret using LibSodium. You must authenticate using an access token with the admin:org scope to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/organization-secrets#create-or-update-an-organization-secret CreateOrUpdateRepoSecret creates or updates a repos codespace secret
Creates or updates a repository secret with an encrypted value. Encrypt your secret using LibSodium. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have write access to the codespaces_secrets repository permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/repository-secrets#create-or-update-a-repository-secret CreateOrUpdateUserSecret creates or updates a users codespace secret
Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using LibSodium.
You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must also have Codespaces access to use this endpoint.
GitHub Apps must have write access to the codespaces_user_secrets user permission and codespaces_secrets repository permission on all referenced repositories to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/secrets#create-or-update-a-secret-for-the-authenticated-user Delete deletes a codespace.
You must authenticate using an access token with the codespace scope to use this endpoint.
GitHub Apps must have write access to the codespaces repository permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/codespaces#delete-a-codespace-for-the-authenticated-user DeleteOrgSecret deletes an orgs codespace secret
Deletes an organization secret using the secret name. You must authenticate using an access token with the admin:org scope to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/organization-secrets#delete-an-organization-secret DeleteRepoSecret deletes a repos codespace secret
Deletes a secret in a repository using the secret name. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have write access to the codespaces_secrets repository permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/repository-secrets#delete-a-repository-secret DeleteUserSecret deletes a users codespace secret
Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret.
You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub Apps must have write access to the codespaces_user_secrets user permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/secrets#delete-a-secret-for-the-authenticated-user GetOrgPublicKey gets the org public key for encrypting codespace secrets
Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. You must authenticate using an access token with the admin:org scope to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/organization-secrets#get-an-organization-public-key GetOrgSecret gets an org codespace secret
Gets an organization secret without revealing its encrypted value. You must authenticate using an access token with the admin:org scope to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/organization-secrets#get-an-organization-secret GetRepoPublicKey gets the repo public key for encrypting codespace secrets
Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have write access to the codespaces_secrets repository permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/repository-secrets#get-a-repository-public-key GetRepoSecret gets a repo codespace secret
Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have write access to the codespaces_secrets repository permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/repository-secrets#get-a-repository-secret GetUserPublicKey gets the users public key for encrypting codespace secrets
Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets.
You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub Apps must have read access to the codespaces_user_secrets user permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/secrets#get-public-key-for-the-authenticated-user GetUserSecret gets a users codespace secret
Gets a secret available to a user's codespaces without revealing its encrypted value.
You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub Apps must have read access to the codespaces_user_secrets user permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/secrets#get-a-secret-for-the-authenticated-user List lists codespaces for an authenticated user.
Lists the authenticated user's codespaces.
You must authenticate using an access token with the codespace scope to use this endpoint.
GitHub Apps must have read access to the codespaces repository permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/codespaces#list-codespaces-for-the-authenticated-user ListInRepo lists codespaces for a user in a repository.
Lists the codespaces associated with a specified repository and the authenticated user.
You must authenticate using an access token with the codespace scope to use this endpoint.
GitHub Apps must have read access to the codespaces repository permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user ListOrgSecrets list all secrets available to an org
Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. You must authenticate using an access token with the admin:org scope to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/organization-secrets#list-organization-secrets ListRepoSecrets list all secrets available to a repo
Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have write access to the codespaces_secrets repository permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/repository-secrets#list-repository-secrets ListSelectedReposForOrgSecret lists the repositories that have been granted the ability to use an organization's codespace secret.
Lists all repositories that have been selected when the visibility for repository access to a secret is set to selected. You must authenticate using an access token with the admin:org scope to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/organization-secrets#list-selected-repositories-for-an-organization-secret ListSelectedReposForUserSecret lists the repositories that have been granted the ability to use a user's codespace secret.
You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub Apps must have read access to the codespaces_user_secrets user permission and write access to the codespaces_secrets repository permission on all referenced repositories to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/secrets#list-selected-repositories-for-a-user-secret ListUserSecrets list all secrets available for a users codespace
Lists all secrets available for a user's Codespaces without revealing their encrypted values
You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint
GitHub Apps must have read access to the codespaces_user_secrets user permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/secrets#list-secrets-for-the-authenticated-user RemoveSelectedRepoFromOrgSecret removes a repository from the list of repositories that have been granted the ability to use an organization's codespace secret.
Removes a repository from an organization secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org scope to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/organization-secrets#remove-selected-repository-from-an-organization-secret RemoveSelectedRepoFromUserSecret removes a repository from the list of repositories that have been granted the ability to use a user's codespace secret.
Removes a repository from the selected repositories for a user's codespace secret. You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint. GitHub Apps must have write access to the codespaces_user_secrets user permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/secrets#remove-a-selected-repository-from-a-user-secret SetSelectedReposForOrgSecret sets the repositories that have been granted the ability to use a user's codespace secret.
Replaces all repositories for an organization secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret. You must authenticate using an access token with the admin:org scope to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/organization-secrets#set-selected-repositories-for-an-organization-secret SetSelectedReposForUserSecret sets the repositories that have been granted the ability to use a user's codespace secret.
You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User must have Codespaces access to use this endpoint.
GitHub Apps must have write access to the codespaces_user_secrets user permission and write access to the codespaces_secrets repository permission on all referenced repositories to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/secrets#set-selected-repositories-for-a-user-secret Start starts a codespace.
You must authenticate using an access token with the codespace scope to use this endpoint.
GitHub Apps must have write access to the codespaces_lifecycle_admin repository permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/codespaces#start-a-codespace-for-the-authenticated-user Stop stops a codespace.
You must authenticate using an access token with the codespace scope to use this endpoint.
GitHub Apps must have write access to the codespaces_lifecycle_admin repository permission to use this endpoint.
GitHub API docs: https://docs.github.com/rest/codespaces/codespaces#stop-a-codespace-for-the-authenticated-user
CombinedStatus represents the combined status of a repository at a particular reference.CommitURL*stringName*stringRepositoryURL*stringSHA*string State is the combined state of the repository. Possible values are:
failure, pending, or success.Statuses[]*RepoStatusTotalCount*int GetCommitURL returns the CommitURL field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. GetSHA returns the SHA field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise. GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise.( CombinedStatus) String() string
CombinedStatus : expvar.Var
CombinedStatus : fmt.Stringer
func (*RepositoriesService).GetCombinedStatus(ctx context.Context, owner, repo, ref string, opts *ListOptions) (*CombinedStatus, *Response, error)
Comment represents comments of issue to import.BodystringCreatedAt*Timestamp GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
CommentDiscussion represents a comment in a GitHub DiscussionCommentEvent.AuthorAssociation*stringBody*stringChildCommentCount*intCreatedAt*TimestampDiscussionID*int64HTMLURL*stringID*int64NodeID*stringParentID*int64Reactions*ReactionsRepositoryURL*stringUpdatedAt*TimestampUser*User GetAuthorAssociation returns the AuthorAssociation field if it's non-nil, zero value otherwise. GetBody returns the Body field if it's non-nil, zero value otherwise. GetChildCommentCount returns the ChildCommentCount field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDiscussionID returns the DiscussionID field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetParentID returns the ParentID field if it's non-nil, zero value otherwise. GetReactions returns the Reactions field. GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. GetUser returns the User field.
func (*DiscussionCommentEvent).GetComment() *CommentDiscussion
CommentStats represents the number of total comments on commits, gists, issues
and pull requests.TotalCommitComments*intTotalGistComments*intTotalIssueComments*intTotalPullRequestComments*int GetTotalCommitComments returns the TotalCommitComments field if it's non-nil, zero value otherwise. GetTotalGistComments returns the TotalGistComments field if it's non-nil, zero value otherwise. GetTotalIssueComments returns the TotalIssueComments field if it's non-nil, zero value otherwise. GetTotalPullRequestComments returns the TotalPullRequestComments field if it's non-nil, zero value otherwise.( CommentStats) String() string
CommentStats : expvar.Var
CommentStats : fmt.Stringer
func (*AdminStats).GetComments() *CommentStats
CommitCommentEvent is triggered when a commit comment is created.
The Webhook event name is "commit_comment".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#commit_comment The following fields are only populated by Webhook events.Comment*RepositoryCommentInstallation*Installation The following field is only present when the webhook is triggered on
a repository belonging to an organization.Repo*RepositorySender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetComment returns the Comment field. GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field.
CommitFile represents a file modified in a commit.Additions*intBlobURL*stringChanges*intContentsURL*stringDeletions*intFilename*stringPatch*stringPreviousFilename*stringRawURL*stringSHA*stringStatus*string GetAdditions returns the Additions field if it's non-nil, zero value otherwise. GetBlobURL returns the BlobURL field if it's non-nil, zero value otherwise. GetChanges returns the Changes field if it's non-nil, zero value otherwise. GetContentsURL returns the ContentsURL field if it's non-nil, zero value otherwise. GetDeletions returns the Deletions field if it's non-nil, zero value otherwise. GetFilename returns the Filename field if it's non-nil, zero value otherwise. GetPatch returns the Patch field if it's non-nil, zero value otherwise. GetPreviousFilename returns the PreviousFilename field if it's non-nil, zero value otherwise. GetRawURL returns the RawURL field if it's non-nil, zero value otherwise. GetSHA returns the SHA field if it's non-nil, zero value otherwise. GetStatus returns the Status field if it's non-nil, zero value otherwise.( CommitFile) String() string
CommitFile : expvar.Var
CommitFile : fmt.Stringer
func (*PullRequestsService).ListFiles(ctx context.Context, owner string, repo string, number int, opts *ListOptions) ([]*CommitFile, *Response, error)
CommitResult represents a commit object as returned in commit search endpoint response.Author*UserCommentsURL*stringCommit*CommitCommitter*UserHTMLURL*stringParents[]*CommitRepository*RepositorySHA*stringScore*float64URL*string GetAuthor returns the Author field. GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. GetCommit returns the Commit field. GetCommitter returns the Committer field. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetRepository returns the Repository field. GetSHA returns the SHA field if it's non-nil, zero value otherwise. GetScore returns the Score field. GetURL returns the URL field if it's non-nil, zero value otherwise.
CommitsComparison is the result of comparing two commits.
See CompareCommits() for details.AheadBy*intBaseCommit*RepositoryCommitBehindBy*intCommits[]*RepositoryCommitDiffURL*stringFiles[]*CommitFileHTMLURL*stringMergeBaseCommit*RepositoryCommitPatchURL*stringPermalinkURL*string Head can be 'behind' or 'ahead'TotalCommits*int // API URL. GetAheadBy returns the AheadBy field if it's non-nil, zero value otherwise. GetBaseCommit returns the BaseCommit field. GetBehindBy returns the BehindBy field if it's non-nil, zero value otherwise. GetDiffURL returns the DiffURL field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetMergeBaseCommit returns the MergeBaseCommit field. GetPatchURL returns the PatchURL field if it's non-nil, zero value otherwise. GetPermalinkURL returns the PermalinkURL field if it's non-nil, zero value otherwise. GetStatus returns the Status field if it's non-nil, zero value otherwise. GetTotalCommits returns the TotalCommits field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.( CommitsComparison) String() string
CommitsComparison : expvar.Var
CommitsComparison : fmt.Stringer
func (*RepositoriesService).CompareCommits(ctx context.Context, owner, repo string, base, head string, opts *ListOptions) (*CommitsComparison, *Response, error)
CommitsListOptions specifies the optional parameters to the
RepositoriesService.ListCommits method. Author of by which to filter Commits.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Path that should be touched by the returned Commits. SHA or branch to start listing Commits from. Since when should Commits be included in the response. Until when should Commits be included in the response.
func (*RepositoriesService).ListCommits(ctx context.Context, owner, repo string, opts *CommitsListOptions) ([]*RepositoryCommit, *Response, error)
CommitStats represents the number of additions / deletions from a file in a given RepositoryCommit or GistCommit.Additions*intDeletions*intTotal*int GetAdditions returns the Additions field if it's non-nil, zero value otherwise. GetDeletions returns the Deletions field if it's non-nil, zero value otherwise. GetTotal returns the Total field if it's non-nil, zero value otherwise.( CommitStats) String() string
CommitStats : expvar.Var
CommitStats : fmt.Stringer
func (*Commit).GetStats() *CommitStats
func (*GistCommit).GetChangeStatus() *CommitStats
func (*RepositoryCommit).GetStats() *CommitStats
CommunityHealthMetrics represents a response containing the community metrics of a repository.ContentReportsEnabled*boolDescription*stringDocumentation*stringFiles*CommunityHealthFilesHealthPercentage*intUpdatedAt*Timestamp GetContentReportsEnabled returns the ContentReportsEnabled field if it's non-nil, zero value otherwise. GetDescription returns the Description field if it's non-nil, zero value otherwise. GetDocumentation returns the Documentation field if it's non-nil, zero value otherwise. GetFiles returns the Files field. GetHealthPercentage returns the HealthPercentage field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
func (*RepositoriesService).GetCommunityHealthMetrics(ctx context.Context, owner, repo string) (*CommunityHealthMetrics, *Response, error)
ContentReference represents a reference to a URL in an issue or pull request.ID*int64NodeID*stringReference*string GetID returns the ID field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetReference returns the Reference field if it's non-nil, zero value otherwise.
func (*ContentReferenceEvent).GetContentReference() *ContentReference
Contributor represents a repository contributorAvatarURL*stringContributions*intEmail*stringEventsURL*stringFollowersURL*stringFollowingURL*stringGistsURL*stringGravatarID*stringHTMLURL*stringID*int64Login*stringName*stringNodeID*stringOrganizationsURL*stringReceivedEventsURL*stringReposURL*stringSiteAdmin*boolStarredURL*stringSubscriptionsURL*stringType*stringURL*string GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise. GetContributions returns the Contributions field if it's non-nil, zero value otherwise. GetEmail returns the Email field if it's non-nil, zero value otherwise. GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. GetFollowersURL returns the FollowersURL field if it's non-nil, zero value otherwise. GetFollowingURL returns the FollowingURL field if it's non-nil, zero value otherwise. GetGistsURL returns the GistsURL field if it's non-nil, zero value otherwise. GetGravatarID returns the GravatarID field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetLogin returns the Login field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetOrganizationsURL returns the OrganizationsURL field if it's non-nil, zero value otherwise. GetReceivedEventsURL returns the ReceivedEventsURL field if it's non-nil, zero value otherwise. GetReposURL returns the ReposURL field if it's non-nil, zero value otherwise. GetSiteAdmin returns the SiteAdmin field if it's non-nil, zero value otherwise. GetStarredURL returns the StarredURL field if it's non-nil, zero value otherwise. GetSubscriptionsURL returns the SubscriptionsURL field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.
func (*ContributorStats).GetAuthor() *Contributor
func (*RepositoriesService).ListContributors(ctx context.Context, owner string, repository string, opts *ListContributorsOptions) ([]*Contributor, *Response, error)
CopilotSeatDetails represents the details of a Copilot for Business seat. Assignee can either be a User, Team, or Organization.AssigningTeam*TeamCreatedAt*TimestampLastActivityAt*TimestampLastActivityEditor*stringPendingCancellationDate*stringUpdatedAt*Timestamp GetAssigningTeam returns the AssigningTeam field. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetLastActivityAt returns the LastActivityAt field if it's non-nil, zero value otherwise. GetLastActivityEditor returns the LastActivityEditor field if it's non-nil, zero value otherwise. GetOrganization gets the Organization from the CopilotSeatDetails if the assignee is an organization. GetPendingCancellationDate returns the PendingCancellationDate field if it's non-nil, zero value otherwise. GetTeam gets the Team from the CopilotSeatDetails if the assignee is a team. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. GetUser gets the User from the CopilotSeatDetails if the assignee is a user.(*CopilotSeatDetails) UnmarshalJSON(data []byte) error
*CopilotSeatDetails : github.com/goccy/go-json.Unmarshaler
*CopilotSeatDetails : encoding/json.Unmarshaler
func (*CopilotService).GetSeatDetails(ctx context.Context, org, user string) (*CopilotSeatDetails, *Response, error)
CreateCheckRunOptions sets up parameters needed to create a CheckRun. // Possible further actions the integrator can perform, which a user may trigger. (Optional.) // The time the check completed. (Optional. Required if you provide conclusion.) // Can be one of "success", "failure", "neutral", "cancelled", "skipped", "timed_out", or "action_required". (Optional. Required if you provide a status of "completed".) // The URL of the integrator's site that has the full details of the check. (Optional.) // A reference for the run on the integrator's system. (Optional.) // The SHA of the commit. (Required.) // The name of the check (e.g., "code-coverage"). (Required.) // Provide descriptive details about the run. (Optional) // The time that the check run began. (Optional.) // The current status. Can be one of "queued", "in_progress", or "completed". Default: "queued". (Optional.) GetCompletedAt returns the CompletedAt field if it's non-nil, zero value otherwise. GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. GetDetailsURL returns the DetailsURL field if it's non-nil, zero value otherwise. GetExternalID returns the ExternalID field if it's non-nil, zero value otherwise. GetOutput returns the Output field. GetStartedAt returns the StartedAt field if it's non-nil, zero value otherwise. GetStatus returns the Status field if it's non-nil, zero value otherwise.
func (*ChecksService).CreateCheckRun(ctx context.Context, owner, repo string, opts CreateCheckRunOptions) (*CheckRun, *Response, error)
CreateCheckSuiteOptions sets up parameters to manually create a check suites // The name of the head branch where the code changes are implemented. // The sha of the head commit. (Required.) GetHeadBranch returns the HeadBranch field if it's non-nil, zero value otherwise.
func (*ChecksService).CreateCheckSuite(ctx context.Context, owner, repo string, opts CreateCheckSuiteOptions) (*CheckSuite, *Response, error)
CreateCodespaceOptions represents options for the creation of a codespace in a repository.ClientIP*stringDevcontainerPath*stringDisplayName*string Geo represents the geographic area for this codespace.
If not specified, the value is assigned by IP.
This property replaces location, which is being deprecated.
Geo can be one of: `EuropeWest`, `SoutheastAsia`, `UsEast`, `UsWest`.IdleTimeoutMinutes*intMachine*stringMultiRepoPermissionsOptOut*boolRef*string RetentionPeriodMinutes represents the duration in minutes after codespace has gone idle in which it will be deleted.
Must be integer minutes between 0 and 43200 (30 days).WorkingDirectory*string GetClientIP returns the ClientIP field if it's non-nil, zero value otherwise. GetDevcontainerPath returns the DevcontainerPath field if it's non-nil, zero value otherwise. GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise. GetGeo returns the Geo field if it's non-nil, zero value otherwise. GetIdleTimeoutMinutes returns the IdleTimeoutMinutes field if it's non-nil, zero value otherwise. GetMachine returns the Machine field if it's non-nil, zero value otherwise. GetMultiRepoPermissionsOptOut returns the MultiRepoPermissionsOptOut field if it's non-nil, zero value otherwise. GetRef returns the Ref field if it's non-nil, zero value otherwise. GetRetentionPeriodMinutes returns the RetentionPeriodMinutes field if it's non-nil, zero value otherwise. GetWorkingDirectory returns the WorkingDirectory field if it's non-nil, zero value otherwise.
func (*CodespacesService).CreateInRepo(ctx context.Context, owner, repo string, request *CreateCodespaceOptions) (*Codespace, *Response, error)
CreateCommit will sign the commit with this signer. See MessageSigner doc for more details.
Ignored on commits where Verification.Signature is defined.
func (*GitService).CreateCommit(ctx context.Context, owner string, repo string, commit *Commit, opts *CreateCommitOptions) (*Commit, *Response, error)
CreateEnterpriseRunnerGroupRequest represents a request to create a Runner group for an enterprise. If set to True, public repos can use this runner groupName*string If true, the runner group will be restricted to running only the workflows specified in the SelectedWorkflows slice. Runners represent a list of runner IDs to add to the runner group. List of organization IDs that can access the runner group. List of workflows the runner group should be allowed to run. This setting will be ignored unless RestrictedToWorkflows is set to true.Visibility*string GetAllowsPublicRepositories returns the AllowsPublicRepositories field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetRestrictedToWorkflows returns the RestrictedToWorkflows field if it's non-nil, zero value otherwise. GetVisibility returns the Visibility field if it's non-nil, zero value otherwise.
func (*EnterpriseService).CreateEnterpriseRunnerGroup(ctx context.Context, enterprise string, createReq CreateEnterpriseRunnerGroupRequest) (*EnterpriseRunnerGroup, *Response, error)
CreateEvent represents a created repository, branch, or tag.
The Webhook event name is "create".
Note: webhooks will not receive this event for created repositories.
Additionally, webhooks will not receive this event for tags if more
than three tags are pushed at once.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/github-event-types#createeventDescription*stringInstallation*InstallationMasterBranch*stringOrg*OrganizationPusherType*stringRef*string RefType is the object that was created. Possible values are: "repository", "branch", "tag". The following fields are only populated by Webhook events.Sender*User GetDescription returns the Description field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetMasterBranch returns the MasterBranch field if it's non-nil, zero value otherwise. GetOrg returns the Org field. GetPusherType returns the PusherType field if it's non-nil, zero value otherwise. GetRef returns the Ref field if it's non-nil, zero value otherwise. GetRefType returns the RefType field if it's non-nil, zero value otherwise. GetRepo returns the Repo field. GetSender returns the Sender field.
CreateOrgInvitationOptions specifies the parameters to the OrganizationService.Invite
method. Email address of the person you are inviting, which can be an existing GitHub user.
Not required if you provide InviteeID GitHub user ID for the person you are inviting. Not required if you provide Email. Specify role for new member. Can be one of:
* admin - Organization owners with full administrative rights to the
organization and complete access to all repositories and teams.
* direct_member - Non-owner organization members with ability to see
other members and join teams by invitation.
* billing_manager - Non-owner organization members with ability to
manage the billing settings of your organization.
Default is "direct_member".TeamID[]int64 GetEmail returns the Email field if it's non-nil, zero value otherwise. GetInviteeID returns the InviteeID field if it's non-nil, zero value otherwise. GetRole returns the Role field if it's non-nil, zero value otherwise.
func (*OrganizationsService).CreateOrgInvitation(ctx context.Context, org string, opts *CreateOrgInvitationOptions) (*Invitation, *Response, error)
CreateProtectedChanges represents the changes made to the CreateProtected policy.From*bool GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*ProtectionChanges).GetCreateProtected() *CreateProtectedChanges
CreateRunnerGroupRequest represents a request to create a Runner group for an organization. If set to True, public repos can use this runner groupName*string If true, the runner group will be restricted to running only the workflows specified in the SelectedWorkflows slice. Runners represent a list of runner IDs to add to the runner group. List of repository IDs that can access the runner group. List of workflows the runner group should be allowed to run. This setting will be ignored unless RestrictedToWorkflows is set to true.Visibility*string GetAllowsPublicRepositories returns the AllowsPublicRepositories field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetRestrictedToWorkflows returns the RestrictedToWorkflows field if it's non-nil, zero value otherwise. GetVisibility returns the Visibility field if it's non-nil, zero value otherwise.
func (*ActionsService).CreateOrganizationRunnerGroup(ctx context.Context, org string, createReq CreateRunnerGroupRequest) (*RunnerGroup, *Response, error)
CreateUpdateEnvironment represents the fields required for the create/update operation
following the Create/Update release example.
See https://github.com/google/go-github/issues/992 for more information.
Removed omitempty here as the API expects null values for reviewers and deployment_branch_policy to clear them.CanAdminsBypass*boolDeploymentBranchPolicy*BranchPolicyPreventSelfReview*boolReviewers[]*EnvReviewersWaitTimer*int GetCanAdminsBypass returns the CanAdminsBypass field if it's non-nil, zero value otherwise. GetDeploymentBranchPolicy returns the DeploymentBranchPolicy field. GetPreventSelfReview returns the PreventSelfReview field if it's non-nil, zero value otherwise. GetWaitTimer returns the WaitTimer field if it's non-nil, zero value otherwise. MarshalJSON implements the json.Marshaler interface.
As the only way to clear a WaitTimer is to set it to 0, a missing WaitTimer object should default to 0, not null.
As the default value for CanAdminsBypass is true, a nil value here marshals to true.
*CreateUpdateEnvironment : github.com/goccy/go-json.Marshaler
*CreateUpdateEnvironment : encoding/json.Marshaler
func (*RepositoriesService).CreateUpdateEnvironment(ctx context.Context, owner, repo, name string, environment *CreateUpdateEnvironment) (*Environment, *Response, error)
CreateUserProjectOptions specifies the parameters to the UsersService.CreateProject method. The description of the project. (Optional.) The name of the project. (Required.) GetBody returns the Body field if it's non-nil, zero value otherwise.
func (*UsersService).CreateProject(ctx context.Context, opts *CreateUserProjectOptions) (*Project, *Response, error)
CreateUserRequest represents the fields sent to the `CreateUser` endpoint.
Note that `Login` is a required field.Email*stringLoginstringSuspended*bool GetEmail returns the Email field if it's non-nil, zero value otherwise. GetSuspended returns the Suspended field if it's non-nil, zero value otherwise.
func (*AdminService).CreateUser(ctx context.Context, userReq CreateUserRequest) (*User, *Response, error)
CreateWorkflowDispatchEventRequest represents a request to create a workflow dispatch event. Inputs represents input keys and values configured in the workflow file.
The maximum number of properties is 10.
Default: Any default properties configured in the workflow file will be used when `inputs` are omitted. Ref represents the reference of the workflow run.
The reference can be a branch or a tag.
Ref is required when creating a workflow dispatch event.
func (*ActionsService).CreateWorkflowDispatchEventByFileName(ctx context.Context, owner, repo, workflowFileName string, event CreateWorkflowDispatchEventRequest) (*Response, error)
func (*ActionsService).CreateWorkflowDispatchEventByID(ctx context.Context, owner, repo string, workflowID int64, event CreateWorkflowDispatchEventRequest) (*Response, error)
CreationInfo represents when the SBOM was created and who created it.Created*TimestampCreators[]string GetCreated returns the Created field if it's non-nil, zero value otherwise.
func (*SBOMInfo).GetCreationInfo() *CreationInfo
CredentialAuthorization represents a credential authorized through SAML SSO. The expiry for the token.
This will only be present when the credential is a token.AuthorizedCredentialID*int64 The note given to the token.
This will only be present when the credential is a token. The title given to the ssh key.
This will only be present when the credential is an ssh key. Date when the credential was last accessed.
May be null if it was never accessed. Date when the credential was authorized for use. Unique identifier for the credential. Human-readable description of the credential type. Unique string to distinguish the credential.
Only included in responses with credential_type of SSH Key. User login that owns the underlying credential. List of oauth scopes the token has been granted. Last eight characters of the credential.
Only included in responses with credential_type of personal access token. GetAuthorizedCredentialExpiresAt returns the AuthorizedCredentialExpiresAt field if it's non-nil, zero value otherwise. GetAuthorizedCredentialID returns the AuthorizedCredentialID field if it's non-nil, zero value otherwise. GetAuthorizedCredentialNote returns the AuthorizedCredentialNote field if it's non-nil, zero value otherwise. GetAuthorizedCredentialTitle returns the AuthorizedCredentialTitle field if it's non-nil, zero value otherwise. GetCredentialAccessedAt returns the CredentialAccessedAt field if it's non-nil, zero value otherwise. GetCredentialAuthorizedAt returns the CredentialAuthorizedAt field if it's non-nil, zero value otherwise. GetCredentialID returns the CredentialID field if it's non-nil, zero value otherwise. GetCredentialType returns the CredentialType field if it's non-nil, zero value otherwise. GetFingerprint returns the Fingerprint field if it's non-nil, zero value otherwise. GetLogin returns the Login field if it's non-nil, zero value otherwise. GetTokenLastEight returns the TokenLastEight field if it's non-nil, zero value otherwise.
func (*OrganizationsService).ListCredentialAuthorizations(ctx context.Context, org string, opts *CredentialAuthorizationsListOptions) ([]*CredentialAuthorization, *Response, error)
Credit represents the credit object for a global security advisory.Type*stringUser*User GetType returns the Type field if it's non-nil, zero value otherwise. GetUser returns the User field.
CustomDeploymentProtectionRuleApp represents a single deployment protection rule app for an environment.ID*int64IntegrationURL*stringNodeID*stringSlug*string GetID returns the ID field if it's non-nil, zero value otherwise. GetIntegrationURL returns the IntegrationURL field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetSlug returns the Slug field if it's non-nil, zero value otherwise.
func (*CustomDeploymentProtectionRule).GetApp() *CustomDeploymentProtectionRuleApp
CustomProperty represents an organization custom property object. An ordered list of the allowed values of the property. The property can have up to 200
allowed values. Default value of the property. Short description of the property. PropertyName is required for most endpoints except when calling CreateOrUpdateCustomProperty;
where this is sent in the path and thus can be omitted. Whether the property is required. The type of the value for the property. Can be one of: string, single_select. Who can edit the values of the property. Can be one of: org_actors, org_and_repo_actors, nil (null). GetDefaultValue returns the DefaultValue field if it's non-nil, zero value otherwise. GetDescription returns the Description field if it's non-nil, zero value otherwise. GetPropertyName returns the PropertyName field if it's non-nil, zero value otherwise. GetRequired returns the Required field if it's non-nil, zero value otherwise. GetValuesEditableBy returns the ValuesEditableBy field if it's non-nil, zero value otherwise.
func (*OrganizationsService).CreateOrUpdateCustomProperties(ctx context.Context, org string, properties []*CustomProperty) ([]*CustomProperty, *Response, error)
func (*OrganizationsService).CreateOrUpdateCustomProperty(ctx context.Context, org, customPropertyName string, property *CustomProperty) (*CustomProperty, *Response, error)
func (*OrganizationsService).GetAllCustomProperties(ctx context.Context, org string) ([]*CustomProperty, *Response, error)
func (*OrganizationsService).GetCustomProperty(ctx context.Context, org, name string) (*CustomProperty, *Response, error)
func (*OrganizationsService).CreateOrUpdateCustomProperties(ctx context.Context, org string, properties []*CustomProperty) ([]*CustomProperty, *Response, error)
func (*OrganizationsService).CreateOrUpdateCustomProperty(ctx context.Context, org, customPropertyName string, property *CustomProperty) (*CustomProperty, *Response, error)
DeleteAnalysis represents a successful deletion of a code scanning analysis. Next deletable analysis in chain, with last analysis deletion confirmation Next deletable analysis in chain, without last analysis deletion confirmation GetConfirmDeleteURL returns the ConfirmDeleteURL field if it's non-nil, zero value otherwise. GetNextAnalysisURL returns the NextAnalysisURL field if it's non-nil, zero value otherwise.
func (*CodeScanningService).DeleteAnalysis(ctx context.Context, owner, repo string, id int64) (*DeleteAnalysis, *Response, error)
DeleteEvent represents a deleted branch or tag.
The Webhook event name is "delete".
Note: webhooks will not receive this event for tags if more than three tags
are deleted at once.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/github-event-types#deleteeventInstallation*Installation The following field is only present when the webhook is triggered on
a repository belonging to an organization. The following fields are only populated by Webhook events.Ref*string RefType is the object that was deleted. Possible values are: "branch", "tag".Repo*RepositorySender*User GetInstallation returns the Installation field. GetOrg returns the Org field. GetPusherType returns the PusherType field if it's non-nil, zero value otherwise. GetRef returns the Ref field if it's non-nil, zero value otherwise. GetRefType returns the RefType field if it's non-nil, zero value otherwise. GetRepo returns the Repo field. GetSender returns the Sender field.
DependabotAlertEvent is triggered when there is activity relating to Dependabot alerts.
The Webhook event name is "dependabot_alert".
GitHub API docs: https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#dependabot_alertAction*stringAlert*DependabotAlertEnterprise*Enterprise The following fields are only populated by Webhook events. The following field is only present when the webhook is triggered on
a repository belonging to an organization.Repo*RepositorySender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetAlert returns the Alert field. GetEnterprise returns the Enterprise field. GetInstallation returns the Installation field. GetOrganization returns the Organization field. GetRepo returns the Repo field. GetSender returns the Sender field.
DependabotAlertState represents the state of a Dependabot alert to update. DismissedComment is associated with the dismissal of the alert. DismissedReason represents the reason for dismissing or closing the alert.
It is required when the state is "dismissed".
It can be one of: "false positive", "won't fix", "used in tests". State sets the state of the code scanning alert and is a required field.
You must also provide DismissedReason when you set the state to "dismissed".
State can be one of: "open", "dismissed". GetDismissedComment returns the DismissedComment field if it's non-nil, zero value otherwise. GetDismissedReason returns the DismissedReason field if it's non-nil, zero value otherwise.
func (*DependabotService).UpdateAlert(ctx context.Context, owner, repo string, number int, stateInfo *DependabotAlertState) (*DependabotAlert, *Response, error)
Dependency represents the vulnerable dependency.ManifestPath*stringPackage*VulnerabilityPackageScope*string GetManifestPath returns the ManifestPath field if it's non-nil, zero value otherwise. GetPackage returns the Package field. GetScope returns the Scope field if it's non-nil, zero value otherwise.
func (*DependabotAlert).GetDependency() *Dependency
DependencyGraphSnapshotCreationData represents the dependency snapshot's creation result.
GitHub API docs: https://docs.github.com/rest/dependency-graph/dependency-submission#create-a-snapshot-of-dependencies-for-a-repositoryCreatedAt*TimestampIDint64Message*string Represents the snapshot creation result.
Can have the following values:
- "SUCCESS": indicates that the snapshot was successfully created and the repository's dependencies were updated.
- "ACCEPTED": indicates that the snapshot was successfully created, but the repository's dependencies were not updated.
- "INVALID": indicates that the snapshot was malformed. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetMessage returns the Message field if it's non-nil, zero value otherwise. GetResult returns the Result field if it's non-nil, zero value otherwise.
func (*DependencyGraphService).CreateSnapshot(ctx context.Context, owner, repo string, dependencyGraphSnapshot *DependencyGraphSnapshot) (*DependencyGraphSnapshotCreationData, *Response, error)
DependencyGraphSnapshotResolvedDependency represents a resolved dependency in a dependency graph snapshot.
GitHub API docs: https://docs.github.com/rest/dependency-graph/dependency-submission#create-a-snapshot-of-dependencies-for-a-repositoryDependencies[]stringPackageURL*string Represents whether the dependency is requested directly by the manifest or is a dependency of another dependency.
Can have the following values:
- "direct": indicates that the dependency is requested directly by the manifest.
- "indirect": indicates that the dependency is a dependency of another dependency. Represents whether the dependency is required for the primary build artifact or is only used for development.
Can have the following values:
- "runtime": indicates that the dependency is required for the primary build artifact.
- "development": indicates that the dependency is only used for development. GetPackageURL returns the PackageURL field if it's non-nil, zero value otherwise. GetRelationship returns the Relationship field if it's non-nil, zero value otherwise. GetScope returns the Scope field if it's non-nil, zero value otherwise.
DeployKeyEvent is triggered when a deploy key is added or removed from a repository.
The Webhook event name is "deploy_key".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#deploy_key Action is the action that was performed. Possible values are:
"created" or "deleted".Installation*Installation The deploy key resource. The following field is only present when the webhook is triggered on
a repository belonging to an organization. The Repository where the event occurred The following fields are only populated by Webhook events. GetAction returns the Action field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetKey returns the Key field. GetOrganization returns the Organization field. GetRepo returns the Repo field. GetSender returns the Sender field.
DeploymentEvent represents a deployment.
The Webhook event name is "deployment".
Events of this type are not visible in timelines, they are only used to trigger hooks.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#deploymentDeployment*DeploymentInstallation*Installation The following field is only present when the webhook is triggered on
a repository belonging to an organization.Repo*Repository The following fields are only populated by Webhook events.Workflow*WorkflowWorkflowRun*WorkflowRun GetDeployment returns the Deployment field. GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field. GetWorkflow returns the Workflow field. GetWorkflowRun returns the WorkflowRun field.
DeploymentProtectionRuleEvent represents a deployment protection rule event.
The Webhook event name is "deployment_protection_rule".
GitHub API docs: https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment_protection_ruleAction*stringDeployment*Deployment The URL Github provides for a third-party to use in order to pass/fail a deployment gateEnvironment*stringEvent*stringInstallation*InstallationOrganization*OrganizationPullRequests[]*PullRequestRepo*RepositorySender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetDeployment returns the Deployment field. GetDeploymentCallbackURL returns the DeploymentCallbackURL field if it's non-nil, zero value otherwise. GetEnvironment returns the Environment field if it's non-nil, zero value otherwise. GetEvent returns the Event field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetOrganization returns the Organization field. GetRepo returns the Repo field. GetSender returns the Sender field.
DeploymentRequest represents a deployment requestAutoMerge*boolDescription*stringEnvironment*stringPayloadinterface{}ProductionEnvironment*boolRef*stringRequiredContexts*[]stringTask*stringTransientEnvironment*bool GetAutoMerge returns the AutoMerge field if it's non-nil, zero value otherwise. GetDescription returns the Description field if it's non-nil, zero value otherwise. GetEnvironment returns the Environment field if it's non-nil, zero value otherwise. GetProductionEnvironment returns the ProductionEnvironment field if it's non-nil, zero value otherwise. GetRef returns the Ref field if it's non-nil, zero value otherwise. GetRequiredContexts returns the RequiredContexts field if it's non-nil, zero value otherwise. GetTask returns the Task field if it's non-nil, zero value otherwise. GetTransientEnvironment returns the TransientEnvironment field if it's non-nil, zero value otherwise.
func (*RepositoriesService).CreateDeployment(ctx context.Context, owner, repo string, request *DeploymentRequest) (*Deployment, *Response, error)
DeploymentReviewEvent represents a deployment review event.
The Webhook event name is "deployment_review".
GitHub API docs: https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads?#deployment_review The action performed. Possible values are: "requested", "approved", or "rejected". The following will be populated only if approved or rejected.Comment*stringEnterprise*EnterpriseEnvironment*stringInstallation*InstallationOrganization*OrganizationRepo*Repository The following will be populated only if requested.Reviewers[]*RequiredReviewerSender*UserSince*stringWorkflowJobRun*WorkflowJobRunWorkflowJobRuns[]*WorkflowJobRunWorkflowRun*WorkflowRun GetAction returns the Action field if it's non-nil, zero value otherwise. GetApprover returns the Approver field. GetComment returns the Comment field if it's non-nil, zero value otherwise. GetEnterprise returns the Enterprise field. GetEnvironment returns the Environment field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetOrganization returns the Organization field. GetRepo returns the Repo field. GetRequester returns the Requester field. GetSender returns the Sender field. GetSince returns the Since field if it's non-nil, zero value otherwise. GetWorkflowJobRun returns the WorkflowJobRun field. GetWorkflowRun returns the WorkflowRun field.
DeploymentsListOptions specifies the optional parameters to the
RepositoriesService.ListDeployments method. List deployments for a given environment.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. List deployments for a given ref. SHA of the Deployment. List deployments for a given task.
func (*RepositoriesService).ListDeployments(ctx context.Context, owner, repo string, opts *DeploymentsListOptions) ([]*Deployment, *Response, error)
DeploymentStatus represents the status of a
particular deployment.CreatedAt*TimestampCreator*UserDeploymentURL*stringDescription*stringEnvironment*stringEnvironmentURL*stringID*int64LogURL*stringNodeID*stringRepositoryURL*string State is the deployment state.
Possible values are: "pending", "success", "failure", "error",
"inactive", "in_progress", "queued".TargetURL*stringURL*stringUpdatedAt*Timestamp GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetCreator returns the Creator field. GetDeploymentURL returns the DeploymentURL field if it's non-nil, zero value otherwise. GetDescription returns the Description field if it's non-nil, zero value otherwise. GetEnvironment returns the Environment field if it's non-nil, zero value otherwise. GetEnvironmentURL returns the EnvironmentURL field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetLogURL returns the LogURL field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise. GetTargetURL returns the TargetURL field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
func (*DeploymentStatusEvent).GetDeploymentStatus() *DeploymentStatus
func (*RepositoriesService).CreateDeploymentStatus(ctx context.Context, owner, repo string, deployment int64, request *DeploymentStatusRequest) (*DeploymentStatus, *Response, error)
func (*RepositoriesService).GetDeploymentStatus(ctx context.Context, owner, repo string, deploymentID, deploymentStatusID int64) (*DeploymentStatus, *Response, error)
func (*RepositoriesService).ListDeploymentStatuses(ctx context.Context, owner, repo string, deployment int64, opts *ListOptions) ([]*DeploymentStatus, *Response, error)
DeploymentStatusEvent represents a deployment status.
The Webhook event name is "deployment_status".
Events of this type are not visible in timelines, they are only used to trigger hooks.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#deployment_statusAction*stringDeployment*DeploymentDeploymentStatus*DeploymentStatusInstallation*Installation The following field is only present when the webhook is triggered on
a repository belonging to an organization.Repo*Repository The following fields are only populated by Webhook events. GetAction returns the Action field if it's non-nil, zero value otherwise. GetDeployment returns the Deployment field. GetDeploymentStatus returns the DeploymentStatus field. GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field.
DeploymentStatusRequest represents a deployment requestAutoInactive*boolDescription*stringEnvironment*stringEnvironmentURL*stringLogURL*stringState*string GetAutoInactive returns the AutoInactive field if it's non-nil, zero value otherwise. GetDescription returns the Description field if it's non-nil, zero value otherwise. GetEnvironment returns the Environment field if it's non-nil, zero value otherwise. GetEnvironmentURL returns the EnvironmentURL field if it's non-nil, zero value otherwise. GetLogURL returns the LogURL field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise.
func (*RepositoriesService).CreateDeploymentStatus(ctx context.Context, owner, repo string, deployment int64, request *DeploymentStatusRequest) (*DeploymentStatus, *Response, error)
Discussion represents a discussion in a GitHub DiscussionEvent.ActiveLockReason*stringAnswerChosenAt*TimestampAnswerChosenBy*stringAnswerHTMLURL*stringAuthorAssociation*stringBody*stringComments*intCreatedAt*TimestampDiscussionCategory*DiscussionCategoryHTMLURL*stringID*int64Locked*boolNodeID*stringNumber*intRepositoryURL*stringState*stringTitle*stringUpdatedAt*TimestampUser*User GetActiveLockReason returns the ActiveLockReason field if it's non-nil, zero value otherwise. GetAnswerChosenAt returns the AnswerChosenAt field if it's non-nil, zero value otherwise. GetAnswerChosenBy returns the AnswerChosenBy field if it's non-nil, zero value otherwise. GetAnswerHTMLURL returns the AnswerHTMLURL field if it's non-nil, zero value otherwise. GetAuthorAssociation returns the AuthorAssociation field if it's non-nil, zero value otherwise. GetBody returns the Body field if it's non-nil, zero value otherwise. GetComments returns the Comments field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDiscussionCategory returns the DiscussionCategory field. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetLocked returns the Locked field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetNumber returns the Number field if it's non-nil, zero value otherwise. GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise. GetTitle returns the Title field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. GetUser returns the User field.
func (*DiscussionCommentEvent).GetDiscussion() *Discussion
func (*DiscussionEvent).GetDiscussion() *Discussion
DiscussionCategory represents a discussion category in a GitHub DiscussionEvent.CreatedAt*TimestampDescription*stringEmoji*stringID*int64IsAnswerable*boolName*stringNodeID*stringRepositoryID*int64Slug*stringUpdatedAt*Timestamp GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDescription returns the Description field if it's non-nil, zero value otherwise. GetEmoji returns the Emoji field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetIsAnswerable returns the IsAnswerable field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetRepositoryID returns the RepositoryID field if it's non-nil, zero value otherwise. GetSlug returns the Slug field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
func (*Discussion).GetDiscussionCategory() *DiscussionCategory
DiscussionEvent represents a webhook event for a discussion.
The Webhook event name is "discussion".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#discussion Action is the action that was performed. Possible values are:
created, edited, deleted, pinned, unpinned, locked, unlocked,
transferred, category_changed, answered, or unanswered.Discussion*DiscussionInstallation*InstallationOrg*OrganizationRepo*RepositorySender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetDiscussion returns the Discussion field. GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field.
DismissalRestrictions specifies which users and teams can dismiss pull request reviews. The list of app slugs with push access. The list of team slugs with push access. The list of user logins with push access.
func (*PullRequestReviewsEnforcement).GetDismissalRestrictions() *DismissalRestrictions
DismissalRestrictionsRequest represents the request to create/edit the
restriction to allows only specific users, teams or apps to dismiss pull request reviews. It is
separate from DismissalRestrictions above because the request structure is
different from the response structure.
Note: Both Users and Teams must be nil, or both must be non-nil. The list of app slugs which can dismiss pull request reviews. (Required; use nil to disable dismissal_restrictions or &[]string{} otherwise.) The list of team slugs which can dismiss pull request reviews. (Required; use nil to disable dismissal_restrictions or &[]string{} otherwise.) The list of user logins who can dismiss pull request reviews. (Required; use nil to disable dismissal_restrictions or &[]string{} otherwise.) GetApps returns the Apps field if it's non-nil, zero value otherwise. GetTeams returns the Teams field if it's non-nil, zero value otherwise. GetUsers returns the Users field if it's non-nil, zero value otherwise.
func (*PullRequestReviewsEnforcementRequest).GetDismissalRestrictionsRequest() *DismissalRestrictionsRequest
func (*PullRequestReviewsEnforcementUpdate).GetDismissalRestrictionsRequest() *DismissalRestrictionsRequest
DismissedReview represents details for 'dismissed_review' events.DismissalCommitID*stringDismissalMessage*stringReviewID*int64 State represents the state of the dismissed review.
Possible values are: "commented", "approved", and "changes_requested". GetDismissalCommitID returns the DismissalCommitID field if it's non-nil, zero value otherwise. GetDismissalMessage returns the DismissalMessage field if it's non-nil, zero value otherwise. GetReviewID returns the ReviewID field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise.
func (*IssueEvent).GetDismissedReview() *DismissedReview
DismissStaleReviewsOnPushChanges represents the changes made to the DismissStaleReviewsOnPushChanges policy.From*bool GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*ProtectionChanges).GetDismissStaleReviewsOnPush() *DismissStaleReviewsOnPushChanges
DispatchRequestOptions represents a request to trigger a repository_dispatch event. ClientPayload is a custom JSON payload with extra information about the webhook event.
Defaults to an empty JSON object. EventType is a custom webhook event name. (Required.) GetClientPayload returns the ClientPayload field if it's non-nil, zero value otherwise.
func (*RepositoriesService).Dispatch(ctx context.Context, owner, repo string, opts DispatchRequestOptions) (*Repository, *Response, error)
DraftReviewComment represents a comment part of the review.Body*stringLine*intPath*stringPosition*intSide*stringStartLine*int The new comfort-fade-preview fields GetBody returns the Body field if it's non-nil, zero value otherwise. GetLine returns the Line field if it's non-nil, zero value otherwise. GetPath returns the Path field if it's non-nil, zero value otherwise. GetPosition returns the Position field if it's non-nil, zero value otherwise. GetSide returns the Side field if it's non-nil, zero value otherwise. GetStartLine returns the StartLine field if it's non-nil, zero value otherwise. GetStartSide returns the StartSide field if it's non-nil, zero value otherwise.( DraftReviewComment) String() string
DraftReviewComment : expvar.Var
DraftReviewComment : fmt.Stringer
EditBase represents the change of a pull-request base branch.Ref*EditRefSHA*EditSHA GetRef returns the Ref field. GetSHA returns the SHA field.
func (*EditChange).GetBase() *EditBase
EditBody represents a change of pull-request body.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*EditChange).GetBody() *EditBody
EditDefaultBranch represents a change of repository's default branch name.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*EditChange).GetDefaultBranch() *EditDefaultBranch
EditOwner represents a change of repository ownership.OwnerInfo*OwnerInfo GetOwnerInfo returns the OwnerInfo field.
func (*EditChange).GetOwner() *EditOwner
EditRef represents a ref change of a pull-request.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*EditBase).GetRef() *EditRef
EditRepo represents a change of repository name.Name*RepoName GetName returns the Name field.
func (*EditChange).GetRepo() *EditRepo
EditSHA represents a sha change of a pull-request.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*EditBase).GetSHA() *EditSHA
EditTitle represents a pull-request title change.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*EditChange).GetTitle() *EditTitle
Environment represents a single environment in a repository.CanAdminsBypass*boolCreatedAt*TimestampDeploymentBranchPolicy*BranchPolicyEnvironmentName*stringHTMLURL*string Return/response only valuesName*stringNodeID*stringOwner*stringProtectionRules[]*ProtectionRuleRepo*stringReviewers[]*EnvReviewersURL*stringUpdatedAt*TimestampWaitTimer*int GetCanAdminsBypass returns the CanAdminsBypass field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDeploymentBranchPolicy returns the DeploymentBranchPolicy field. GetEnvironmentName returns the EnvironmentName field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetOwner returns the Owner field if it's non-nil, zero value otherwise. GetRepo returns the Repo field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. GetWaitTimer returns the WaitTimer field if it's non-nil, zero value otherwise.
func (*RepositoriesService).CreateUpdateEnvironment(ctx context.Context, owner, repo, name string, environment *CreateUpdateEnvironment) (*Environment, *Response, error)
func (*RepositoriesService).GetEnvironment(ctx context.Context, owner, repo, name string) (*Environment, *Response, error)
EnvironmentListOptions specifies the optional parameters to the
RepositoriesService.ListEnvironments method.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page.
func (*RepositoriesService).ListEnvironments(ctx context.Context, owner, repo string, opts *EnvironmentListOptions) (*EnvResponse, *Response, error)
EnvReviewers represents a single environment reviewer entry.ID*int64Type*string GetID returns the ID field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise.
An Error reports more details on an individual error in an ErrorResponse.
These are the possible validation error codes:
missing:
resource does not exist
missing_field:
a required field on a resource has not been set
invalid:
the formatting of a field is invalid
already_exists:
another resource has the same valid as this field
custom:
some resources return this (e.g. github.User.CreateKey()), additional
information is set in the Message field of the Error
GitHub error responses structure are often undocumented and inconsistent.
Sometimes error is just a simple string (Issue #540).
In such cases, Message represents an error message as a workaround.
GitHub API docs: https://docs.github.com/rest/#client-errors // validation error code // field on which the error occurred // Message describing the error. Errors with Code == "custom" will always have this set. // resource on which the error occurred(*Error) Error() string(*Error) UnmarshalJSON(data []byte) error
*Error : github.com/goccy/go-json.Unmarshaler
*Error : error
*Error : encoding/json.Unmarshaler
An ErrorResponse reports one or more errors caused by an API request.
GitHub API docs: https://docs.github.com/rest/#client-errors Block is only populated on certain types of errors such as code 451. Most errors will also include a documentation_url field pointing
to some content that might help you resolve the error, see
https://docs.github.com/rest/#client-errors // more detail on individual errors // error message // HTTP response that caused this error(*ErrorResponse) Error() string GetBlock returns the Block field. Is returns whether the provided error equals this error.
*ErrorResponse : error
ExternalGroupMember represents a member of an external group.MemberEmail*stringMemberID*int64MemberLogin*stringMemberName*string GetMemberEmail returns the MemberEmail field if it's non-nil, zero value otherwise. GetMemberID returns the MemberID field if it's non-nil, zero value otherwise. GetMemberLogin returns the MemberLogin field if it's non-nil, zero value otherwise. GetMemberName returns the MemberName field if it's non-nil, zero value otherwise.
ExternalGroupTeam represents a team connected to an external group.TeamID*int64TeamName*string GetTeamID returns the TeamID field if it's non-nil, zero value otherwise. GetTeamName returns the TeamName field if it's non-nil, zero value otherwise.
FirstPatchedVersion represents the identifier for the first patched version of that vulnerability.Identifier*string GetIdentifier returns the Identifier field if it's non-nil, zero value otherwise.
func (*AdvisoryVulnerability).GetFirstPatchedVersion() *FirstPatchedVersion
GetAuditLogOptions sets up optional parameters to query audit-log endpoint. // Event type includes. Can be one of "web", "git", "all". Default: "web". (Optional.)ListCursorOptionsListCursorOptions A cursor, as given in the Link header. If specified, the query only searches for events after this cursor. A cursor, as given in the Link header. If specified, the query only searches for events before this cursor. A cursor, as given in the Link header. If specified, the query continues the search using this cursor. For paginated result sets, the number of results per page (max 100), starting from the first matching result.
This parameter must not be used in combination with last. For paginated result sets, the number of results per page (max 100), starting from the last matching result.
This parameter must not be used in combination with first. For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. // The order of audit log events. Can be one of "asc" or "desc". Default: "desc". (Optional.) // A search phrase. (Optional.) GetInclude returns the Include field if it's non-nil, zero value otherwise. GetOrder returns the Order field if it's non-nil, zero value otherwise. GetPhrase returns the Phrase field if it's non-nil, zero value otherwise.
func (*EnterpriseService).GetAuditLog(ctx context.Context, enterprise string, opts *GetAuditLogOptions) ([]*AuditEntry, *Response, error)
func (*OrganizationsService).GetAuditLog(ctx context.Context, org string, opts *GetAuditLogOptions) ([]*AuditEntry, *Response, error)
GetCodeownersErrorsOptions specifies the optional parameters to the
RepositoriesService.GetCodeownersErrors method. A branch, tag or commit name used to determine which version of the CODEOWNERS file to use.
Default: the repository's default branch (e.g. main).
func (*RepositoriesService).GetCodeownersErrors(ctx context.Context, owner, repo string, opts *GetCodeownersErrorsOptions) (*CodeownersErrors, *Response, error)
GistCommit represents a commit on a gist.ChangeStatus*CommitStatsCommittedAt*TimestampNodeID*stringURL*stringUser*UserVersion*string GetChangeStatus returns the ChangeStatus field. GetCommittedAt returns the CommittedAt field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUser returns the User field. GetVersion returns the Version field if it's non-nil, zero value otherwise.( GistCommit) String() string
GistCommit : expvar.Var
GistCommit : fmt.Stringer
func (*GistsService).ListCommits(ctx context.Context, id string, opts *ListOptions) ([]*GistCommit, *Response, error)
GistFile represents a file on a gist.Content*stringFilename*stringLanguage*stringRawURL*stringSize*intType*string GetContent returns the Content field if it's non-nil, zero value otherwise. GetFilename returns the Filename field if it's non-nil, zero value otherwise. GetLanguage returns the Language field if it's non-nil, zero value otherwise. GetRawURL returns the RawURL field if it's non-nil, zero value otherwise. GetSize returns the Size field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise.( GistFile) String() string
GistFile : expvar.Var
GistFile : fmt.Stringer
func (*Gist).GetFiles() map[GistFilename]GistFile
GistFilename represents filename on a gist.
func (*Gist).GetFiles() map[GistFilename]GistFile
GistFork represents a fork of a gist.CreatedAt*TimestampID*stringNodeID*stringURL*stringUpdatedAt*TimestampUser*User GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. GetUser returns the User field.( GistFork) String() string
GistFork : expvar.Var
GistFork : fmt.Stringer
func (*GistsService).ListForks(ctx context.Context, id string, opts *ListOptions) ([]*GistFork, *Response, error)
GistStats represents the number of total, private and public gists.PrivateGists*intPublicGists*intTotalGists*int GetPrivateGists returns the PrivateGists field if it's non-nil, zero value otherwise. GetPublicGists returns the PublicGists field if it's non-nil, zero value otherwise. GetTotalGists returns the TotalGists field if it's non-nil, zero value otherwise.( GistStats) String() string
GistStats : expvar.Var
GistStats : fmt.Stringer
func (*AdminStats).GetGists() *GistStats
GitHubAppAuthorizationEvent is triggered when a user's authorization for a
GitHub Application is revoked.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#github_app_authorization The action performed. Possible value is: "revoked".Installation*Installation The following fields are only populated by Webhook events. GetAction returns the Action field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetSender returns the Sender field.
Gitignore represents a .gitignore file as returned by the GitHub API.Name*stringSource*string GetName returns the Name field if it's non-nil, zero value otherwise. GetSource returns the Source field if it's non-nil, zero value otherwise.( Gitignore) String() string
Gitignore : expvar.Var
Gitignore : fmt.Stringer
func (*GitignoresService).Get(ctx context.Context, name string) (*Gitignore, *Response, error)
GitObject represents a Git object.SHA*stringType*stringURL*string GetSHA returns the SHA field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.( GitObject) String() string
GitObject : expvar.Var
GitObject : fmt.Stringer
func (*Reference).GetObject() *GitObject
func (*Tag).GetObject() *GitObject
GlobalSecurityVulnerability represents a vulnerability for a global security advisory.FirstPatchedVersion*stringPackage*VulnerabilityPackageVulnerableFunctions[]stringVulnerableVersionRange*string GetFirstPatchedVersion returns the FirstPatchedVersion field if it's non-nil, zero value otherwise. GetPackage returns the Package field. GetVulnerableVersionRange returns the VulnerableVersionRange field if it's non-nil, zero value otherwise.
GollumEvent is triggered when a Wiki page is created or updated.
The Webhook event name is "gollum".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#gollumInstallation*Installation The following field is only present when the webhook is triggered on
a repository belonging to an organization.Pages[]*Page The following fields are only populated by Webhook events.Sender*User GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field.
GPGEmail represents an email address associated to a GPG key.Email*stringVerified*bool GetEmail returns the Email field if it's non-nil, zero value otherwise. GetVerified returns the Verified field if it's non-nil, zero value otherwise.
Grant represents an OAuth application that has been granted access to an account.App*AuthorizationAppCreatedAt*TimestampID*int64Scopes[]stringURL*stringUpdatedAt*Timestamp GetApp returns the App field. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.( Grant) String() string
Grant : expvar.Var
Grant : fmt.Stringer
HeadCommit represents a git commit in a GitHub PushEvent.Added[]stringAuthor*CommitAuthorCommitter*CommitAuthorDistinct*bool The following fields are only populated by Webhook events.Message*stringModified[]stringRemoved[]string The following fields are only populated by Events API.Timestamp*TimestampTreeID*stringURL*string GetAuthor returns the Author field. GetCommitter returns the Committer field. GetDistinct returns the Distinct field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetMessage returns the Message field if it's non-nil, zero value otherwise. GetSHA returns the SHA field if it's non-nil, zero value otherwise. GetTimestamp returns the Timestamp field if it's non-nil, zero value otherwise. GetTreeID returns the TreeID field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.( HeadCommit) String() string
HeadCommit : expvar.Var
HeadCommit : fmt.Stringer
func (*PushEvent).GetCommits() []*HeadCommit
func (*PushEvent).GetHeadCommit() *HeadCommit
func (*WorkflowRun).GetHeadCommit() *HeadCommit
HookRequest is a part of HookDelivery that contains
the HTTP headers and the JSON payload of the webhook request.Headersmap[string]stringRawPayload*json.RawMessage GetHeaders returns the Headers map if it's non-nil, an empty map otherwise. GetRawPayload returns the RawPayload field if it's non-nil, zero value otherwise.( HookRequest) String() string
HookRequest : expvar.Var
HookRequest : fmt.Stringer
func (*HookDelivery).GetRequest() *HookRequest
HookResponse is a part of HookDelivery that contains
the HTTP headers and the response body served by the webhook endpoint.Headersmap[string]stringRawPayload*json.RawMessage GetHeaders returns the Headers map if it's non-nil, an empty map otherwise. GetRawPayload returns the RawPayload field if it's non-nil, zero value otherwise.( HookResponse) String() string
HookResponse : expvar.Var
HookResponse : fmt.Stringer
func (*HookDelivery).GetResponse() *HookResponse
HookStats represents the number of total, active and inactive hooks.ActiveHooks*intInactiveHooks*intTotalHooks*int GetActiveHooks returns the ActiveHooks field if it's non-nil, zero value otherwise. GetInactiveHooks returns the InactiveHooks field if it's non-nil, zero value otherwise. GetTotalHooks returns the TotalHooks field if it's non-nil, zero value otherwise.( HookStats) String() string
HookStats : expvar.Var
HookStats : fmt.Stringer
func (*AdminStats).GetHooks() *HookStats
HovercardOptions specifies optional parameters to the UsersService.GetHovercard
method. SubjectID specifies the ID for the SubjectType. (Required when using subject_type.) SubjectType specifies the additional information to be received about the hovercard.
Possible values are: organization, repository, issue, pull_request. (Required when using subject_id.)
func (*UsersService).GetHovercard(ctx context.Context, user string, opts *HovercardOptions) (*Hovercard, *Response, error)
IDPGroup represents an external identity provider (IDP) group.GroupDescription*stringGroupID*stringGroupName*string GetGroupDescription returns the GroupDescription field if it's non-nil, zero value otherwise. GetGroupID returns the GroupID field if it's non-nil, zero value otherwise. GetGroupName returns the GroupName field if it's non-nil, zero value otherwise.
Import represents a repository import request.AuthorsCount*intAuthorsURL*stringCommitCount*intFailedStep*stringHTMLURL*string Describes whether files larger than 100MB were found during the
importing step. Human readable display name, provided when the Import appears as
part of ProjectChoices. The total number of files larger than 100MB found in the originating
repository. To see a list of these files, call LargeFiles. The total size in gigabytes of files larger than 100MB found in the
originating repository.Message*stringPercent*int When the importer finds several projects or repositories at the
provided URLs, this will identify the available choices. Call
UpdateImport with the selected Import value.PushPercent*intRepositoryURL*string Identifies the current status of an import. An import that does not
have errors will progress through these steps:
detecting - the "detection" step of the import is in progress
because the request did not include a VCS parameter. The
import is identifying the type of source control present at
the URL.
importing - the "raw" step of the import is in progress. This is
where commit data is fetched from the original repository.
The import progress response will include CommitCount (the
total number of raw commits that will be imported) and
Percent (0 - 100, the current progress through the import).
mapping - the "rewrite" step of the import is in progress. This
is where SVN branches are converted to Git branches, and
where author updates are applied. The import progress
response does not include progress information.
pushing - the "push" step of the import is in progress. This is
where the importer updates the repository on GitHub. The
import progress response will include PushPercent, which is
the percent value reported by git push when it is "Writing
objects".
complete - the import is complete, and the repository is ready
on GitHub.
If there are problems, you will see one of these in the status field:
auth_failed - the import requires authentication in order to
connect to the original repository. Make an UpdateImport
request, and include VCSUsername and VCSPassword.
error - the import encountered an error. The import progress
response will include the FailedStep and an error message.
Contact GitHub support for more information.
detection_needs_auth - the importer requires authentication for
the originating repository to continue detection. Make an
UpdateImport request, and include VCSUsername and
VCSPassword.
detection_found_nothing - the importer didn't recognize any
source control at the URL.
detection_found_multiple - the importer found several projects
or repositories at the provided URL. When this is the case,
the Import Progress response will also include a
ProjectChoices field with the possible project choices as
values. Make an UpdateImport request, and include VCS and
(if applicable) TFVCProject.StatusText*string For a tfvc import, the name of the project that is being imported.URL*string Describes whether the import has been opted in or out of using Git
LFS. The value can be 'opt_in', 'opt_out', or 'undecided' if no
action has been taken. The originating VCS type. Can be one of 'subversion', 'git',
'mercurial', or 'tfvc'. Without this parameter, the import job will
take additional time to detect the VCS type before beginning the
import. This detection step will be reflected in the response.VCSPassword*string The URL of the originating repository. VCSUsername and VCSPassword are only used for StartImport calls that
are importing a password-protected repository. GetAuthorsCount returns the AuthorsCount field if it's non-nil, zero value otherwise. GetAuthorsURL returns the AuthorsURL field if it's non-nil, zero value otherwise. GetCommitCount returns the CommitCount field if it's non-nil, zero value otherwise. GetFailedStep returns the FailedStep field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetHasLargeFiles returns the HasLargeFiles field if it's non-nil, zero value otherwise. GetHumanName returns the HumanName field if it's non-nil, zero value otherwise. GetLargeFilesCount returns the LargeFilesCount field if it's non-nil, zero value otherwise. GetLargeFilesSize returns the LargeFilesSize field if it's non-nil, zero value otherwise. GetMessage returns the Message field if it's non-nil, zero value otherwise. GetPercent returns the Percent field if it's non-nil, zero value otherwise. GetPushPercent returns the PushPercent field if it's non-nil, zero value otherwise. GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. GetStatus returns the Status field if it's non-nil, zero value otherwise. GetStatusText returns the StatusText field if it's non-nil, zero value otherwise. GetTFVCProject returns the TFVCProject field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUseLFS returns the UseLFS field if it's non-nil, zero value otherwise. GetVCS returns the VCS field if it's non-nil, zero value otherwise. GetVCSPassword returns the VCSPassword field if it's non-nil, zero value otherwise. GetVCSURL returns the VCSURL field if it's non-nil, zero value otherwise. GetVCSUsername returns the VCSUsername field if it's non-nil, zero value otherwise.( Import) String() string
Import : expvar.Var
Import : fmt.Stringer
func (*MigrationService).ImportProgress(ctx context.Context, owner, repo string) (*Import, *Response, error)
func (*MigrationService).SetLFSPreference(ctx context.Context, owner, repo string, in *Import) (*Import, *Response, error)
func (*MigrationService).StartImport(ctx context.Context, owner, repo string, in *Import) (*Import, *Response, error)
func (*MigrationService).UpdateImport(ctx context.Context, owner, repo string, in *Import) (*Import, *Response, error)
func (*MigrationService).SetLFSPreference(ctx context.Context, owner, repo string, in *Import) (*Import, *Response, error)
func (*MigrationService).StartImport(ctx context.Context, owner, repo string, in *Import) (*Import, *Response, error)
func (*MigrationService).UpdateImport(ctx context.Context, owner, repo string, in *Import) (*Import, *Response, error)
InstallationEvent is triggered when a GitHub App has been installed, uninstalled, suspend, unsuspended
or new permissions have been accepted.
The Webhook event name is "installation".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#installation The action that was performed. Can be either "created", "deleted", "suspend", "unsuspend" or "new_permissions_accepted".Installation*Installation The following field is only present when the webhook is triggered on
a repository belonging to an organization.Repositories[]*RepositoryRequester*UserSender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetOrg returns the Org field. GetRequester returns the Requester field. GetSender returns the Sender field.
InstallationLoginChange represents a change in login on an installation.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*InstallationChanges).GetLogin() *InstallationLoginChange
InstallationPermissions lists the repository and organization permissions for an installation.
Permission names taken from:
https://docs.github.com/enterprise-server@3.0/rest/apps#create-an-installation-access-token-for-an-app
https://docs.github.com/rest/apps#create-an-installation-access-token-for-an-appActions*stringActionsVariables*stringAdministration*stringBlocking*stringChecks*stringContentReferences*stringContents*stringDeployments*stringEmails*stringEnvironments*stringFollowers*stringIssues*stringMembers*stringMetadata*stringOrganizationAdministration*stringOrganizationCustomOrgRoles*stringOrganizationCustomProperties*stringOrganizationCustomRoles*stringOrganizationHooks*stringOrganizationPackages*stringOrganizationPersonalAccessTokenRequests*stringOrganizationPersonalAccessTokens*stringOrganizationPlan*stringOrganizationPreReceiveHooks*stringOrganizationProjects*stringOrganizationSecrets*stringOrganizationSelfHostedRunners*stringOrganizationUserBlocking*stringPackages*stringPages*stringPullRequests*stringRepositoryHooks*stringRepositoryPreReceiveHooks*stringRepositoryProjects*stringSecretScanningAlerts*stringSecrets*stringSecurityEvents*stringSingleFile*stringStatuses*stringTeamDiscussions*stringVulnerabilityAlerts*stringWorkflows*string GetActions returns the Actions field if it's non-nil, zero value otherwise. GetActionsVariables returns the ActionsVariables field if it's non-nil, zero value otherwise. GetAdministration returns the Administration field if it's non-nil, zero value otherwise. GetBlocking returns the Blocking field if it's non-nil, zero value otherwise. GetChecks returns the Checks field if it's non-nil, zero value otherwise. GetContentReferences returns the ContentReferences field if it's non-nil, zero value otherwise. GetContents returns the Contents field if it's non-nil, zero value otherwise. GetDeployments returns the Deployments field if it's non-nil, zero value otherwise. GetEmails returns the Emails field if it's non-nil, zero value otherwise. GetEnvironments returns the Environments field if it's non-nil, zero value otherwise. GetFollowers returns the Followers field if it's non-nil, zero value otherwise. GetIssues returns the Issues field if it's non-nil, zero value otherwise. GetMembers returns the Members field if it's non-nil, zero value otherwise. GetMetadata returns the Metadata field if it's non-nil, zero value otherwise. GetOrganizationAdministration returns the OrganizationAdministration field if it's non-nil, zero value otherwise. GetOrganizationCustomOrgRoles returns the OrganizationCustomOrgRoles field if it's non-nil, zero value otherwise. GetOrganizationCustomProperties returns the OrganizationCustomProperties field if it's non-nil, zero value otherwise. GetOrganizationCustomRoles returns the OrganizationCustomRoles field if it's non-nil, zero value otherwise. GetOrganizationHooks returns the OrganizationHooks field if it's non-nil, zero value otherwise. GetOrganizationPackages returns the OrganizationPackages field if it's non-nil, zero value otherwise. GetOrganizationPersonalAccessTokenRequests returns the OrganizationPersonalAccessTokenRequests field if it's non-nil, zero value otherwise. GetOrganizationPersonalAccessTokens returns the OrganizationPersonalAccessTokens field if it's non-nil, zero value otherwise. GetOrganizationPlan returns the OrganizationPlan field if it's non-nil, zero value otherwise. GetOrganizationPreReceiveHooks returns the OrganizationPreReceiveHooks field if it's non-nil, zero value otherwise. GetOrganizationProjects returns the OrganizationProjects field if it's non-nil, zero value otherwise. GetOrganizationSecrets returns the OrganizationSecrets field if it's non-nil, zero value otherwise. GetOrganizationSelfHostedRunners returns the OrganizationSelfHostedRunners field if it's non-nil, zero value otherwise. GetOrganizationUserBlocking returns the OrganizationUserBlocking field if it's non-nil, zero value otherwise. GetPackages returns the Packages field if it's non-nil, zero value otherwise. GetPages returns the Pages field if it's non-nil, zero value otherwise. GetPullRequests returns the PullRequests field if it's non-nil, zero value otherwise. GetRepositoryHooks returns the RepositoryHooks field if it's non-nil, zero value otherwise. GetRepositoryPreReceiveHooks returns the RepositoryPreReceiveHooks field if it's non-nil, zero value otherwise. GetRepositoryProjects returns the RepositoryProjects field if it's non-nil, zero value otherwise. GetSecretScanningAlerts returns the SecretScanningAlerts field if it's non-nil, zero value otherwise. GetSecrets returns the Secrets field if it's non-nil, zero value otherwise. GetSecurityEvents returns the SecurityEvents field if it's non-nil, zero value otherwise. GetSingleFile returns the SingleFile field if it's non-nil, zero value otherwise. GetStatuses returns the Statuses field if it's non-nil, zero value otherwise. GetTeamDiscussions returns the TeamDiscussions field if it's non-nil, zero value otherwise. GetVulnerabilityAlerts returns the VulnerabilityAlerts field if it's non-nil, zero value otherwise. GetWorkflows returns the Workflows field if it's non-nil, zero value otherwise.
func (*App).GetPermissions() *InstallationPermissions
func (*Installation).GetPermissions() *InstallationPermissions
func (*InstallationToken).GetPermissions() *InstallationPermissions
func (*InstallationTokenListRepoOptions).GetPermissions() *InstallationPermissions
func (*InstallationTokenOptions).GetPermissions() *InstallationPermissions
InstallationRequest represents a pending GitHub App installation request.Account*UserCreatedAt*TimestampID*int64NodeID*stringRequester*User GetAccount returns the Account field. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetRequester returns the Requester field.
func (*AppsService).ListInstallationRequests(ctx context.Context, opts *ListOptions) ([]*InstallationRequest, *Response, error)
InstallationSlugChange represents a change in slug on an installation.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*InstallationChanges).GetSlug() *InstallationSlugChange
The permissions granted to the access token.
The permissions object includes the permission names and their access type. The names of the repositories that the installation token can access.
Providing repository names restricts the access of an installation token to specific repositories. The IDs of the repositories that the installation token can access.
Providing repository IDs restricts the access of an installation token to specific repositories. GetPermissions returns the Permissions field.
func (*AppsService).CreateInstallationTokenListRepos(ctx context.Context, id int64, opts *InstallationTokenListRepoOptions) (*InstallationToken, *Response, error)
InstallationTokenOptions allow restricting a token's access to specific repositories. The permissions granted to the access token.
The permissions object includes the permission names and their access type. The names of the repositories that the installation token can access.
Providing repository names restricts the access of an installation token to specific repositories. The IDs of the repositories that the installation token can access.
Providing repository IDs restricts the access of an installation token to specific repositories. GetPermissions returns the Permissions field.
func (*AppsService).CreateInstallationToken(ctx context.Context, id int64, opts *InstallationTokenOptions) (*InstallationToken, *Response, error)
InteractionRestriction represents the interaction restrictions for repository and organization. ExpiresAt specifies the time after which the interaction restrictions expire.
The default expiry time is 24 hours from the time restriction is created. Specifies the group of GitHub users who can
comment, open issues, or create pull requests for the given repository.
Possible values are: "existing_users", "contributors_only" and "collaborators_only". Origin specifies the type of the resource to interact with.
Possible values are: "repository" and "organization". GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. GetLimit returns the Limit field if it's non-nil, zero value otherwise. GetOrigin returns the Origin field if it's non-nil, zero value otherwise.
func (*InteractionsService).GetRestrictionsForOrg(ctx context.Context, organization string) (*InteractionRestriction, *Response, error)
func (*InteractionsService).GetRestrictionsForRepo(ctx context.Context, owner, repo string) (*InteractionRestriction, *Response, error)
func (*InteractionsService).UpdateRestrictionsForOrg(ctx context.Context, organization, limit string) (*InteractionRestriction, *Response, error)
func (*InteractionsService).UpdateRestrictionsForRepo(ctx context.Context, owner, repo, limit string) (*InteractionRestriction, *Response, error)
Issue represents a GitHub issue on a repository.
Note: As far as the GitHub API is concerned, every pull request is an issue,
but not every issue is a pull request. Some endpoints, events, and webhooks
may also return pull requests via this struct. If PullRequestLinks is nil,
this is an issue, and if PullRequestLinks is not nil, this is a pull request.
The IsPullRequest helper method can be used to check that. ActiveLockReason is populated only when LockReason is provided while locking the issue.
Possible values are: "off-topic", "too heated", "resolved", and "spam".Assignee*UserAssignees[]*UserAuthorAssociation*stringBody*stringClosedAt*TimestampClosedBy*UserComments*intCommentsURL*stringCreatedAt*TimestampDraft*boolEventsURL*stringHTMLURL*stringID*int64Labels[]*LabelLabelsURL*stringLocked*boolMilestone*MilestoneNodeID*stringNumber*intPullRequestLinks*PullRequestLinksReactions*ReactionsRepository*RepositoryRepositoryURL*stringState*string StateReason can be one of: "completed", "not_planned", "reopened". TextMatches is only populated from search results that request text matches
See: search.go and https://docs.github.com/rest/search/#text-match-metadataTitle*stringURL*stringUpdatedAt*TimestampUser*User GetActiveLockReason returns the ActiveLockReason field if it's non-nil, zero value otherwise. GetAssignee returns the Assignee field. GetAuthorAssociation returns the AuthorAssociation field if it's non-nil, zero value otherwise. GetBody returns the Body field if it's non-nil, zero value otherwise. GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise. GetClosedBy returns the ClosedBy field. GetComments returns the Comments field if it's non-nil, zero value otherwise. GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDraft returns the Draft field if it's non-nil, zero value otherwise. GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetLabelsURL returns the LabelsURL field if it's non-nil, zero value otherwise. GetLocked returns the Locked field if it's non-nil, zero value otherwise. GetMilestone returns the Milestone field. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetNumber returns the Number field if it's non-nil, zero value otherwise. GetPullRequestLinks returns the PullRequestLinks field. GetReactions returns the Reactions field. GetRepository returns the Repository field. GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise. GetStateReason returns the StateReason field if it's non-nil, zero value otherwise. GetTitle returns the Title field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. GetUser returns the User field. IsPullRequest reports whether the issue is also a pull request. It uses the
method recommended by GitHub's API documentation, which is to check whether
PullRequestLinks is non-nil.( Issue) String() string
Issue : expvar.Var
Issue : fmt.Stringer
func (*IssueCommentEvent).GetIssue() *Issue
func (*IssueEvent).GetIssue() *Issue
func (*IssuesEvent).GetIssue() *Issue
func (*IssuesService).AddAssignees(ctx context.Context, owner, repo string, number int, assignees []string) (*Issue, *Response, error)
func (*IssuesService).Create(ctx context.Context, owner string, repo string, issue *IssueRequest) (*Issue, *Response, error)
func (*IssuesService).Edit(ctx context.Context, owner string, repo string, number int, issue *IssueRequest) (*Issue, *Response, error)
func (*IssuesService).Get(ctx context.Context, owner string, repo string, number int) (*Issue, *Response, error)
func (*IssuesService).List(ctx context.Context, all bool, opts *IssueListOptions) ([]*Issue, *Response, error)
func (*IssuesService).ListByOrg(ctx context.Context, org string, opts *IssueListOptions) ([]*Issue, *Response, error)
func (*IssuesService).ListByRepo(ctx context.Context, owner string, repo string, opts *IssueListByRepoOptions) ([]*Issue, *Response, error)
func (*IssuesService).RemoveAssignees(ctx context.Context, owner, repo string, number int, assignees []string) (*Issue, *Response, error)
func (*IssuesService).RemoveMilestone(ctx context.Context, owner, repo string, issueNumber int) (*Issue, *Response, error)
func (*Source).GetIssue() *Issue
IssueCommentEvent is triggered when an issue comment is created on an issue
or pull request.
The Webhook event name is "issue_comment".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#issue_comment Action is the action that was performed on the comment.
Possible values are: "created", "edited", "deleted". The following fields are only populated by Webhook events.Comment*IssueCommentInstallation*InstallationIssue*Issue The following field is only present when the webhook is triggered on
a repository belonging to an organization.Repo*RepositorySender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetChanges returns the Changes field. GetComment returns the Comment field. GetInstallation returns the Installation field. GetIssue returns the Issue field. GetOrganization returns the Organization field. GetRepo returns the Repo field. GetSender returns the Sender field.
IssueEvent represents an event that occurred around an Issue or Pull Request. The action corresponding to the event. The User that generated this event.Assignee*UserAssigner*UserCommitID*stringCreatedAt*TimestampDismissedReview*DismissedReview Event identifies the actual type of Event that occurred. Possible
values are:
closed
The Actor closed the issue.
If the issue was closed by commit message, CommitID holds the SHA1 hash of the commit.
merged
The Actor merged into master a branch containing a commit mentioning the issue.
CommitID holds the SHA1 of the merge commit.
referenced
The Actor committed to master a commit mentioning the issue in its commit message.
CommitID holds the SHA1 of the commit.
reopened, unlocked
The Actor did that to the issue.
locked
The Actor locked the issue.
LockReason holds the reason of locking the issue (if provided while locking).
renamed
The Actor changed the issue title from Rename.From to Rename.To.
mentioned
Someone unspecified @mentioned the Actor [sic] in an issue comment body.
assigned, unassigned
The Assigner assigned the issue to or removed the assignment from the Assignee.
labeled, unlabeled
The Actor added or removed the Label from the issue.
milestoned, demilestoned
The Actor added or removed the issue from the Milestone.
subscribed, unsubscribed
The Actor subscribed to or unsubscribed from notifications for an issue.
head_ref_deleted, head_ref_restored
The pull request’s branch was deleted or restored.
review_dismissed
The review was dismissed and `DismissedReview` will be populated below.
review_requested, review_request_removed
The Actor requested or removed the request for a review.
RequestedReviewer or RequestedTeam, and ReviewRequester will be populated below.ID*int64Issue*IssueLabel*LabelLockReason*stringMilestone*MilestonePerformedViaGithubApp*AppProjectCard*ProjectCardRename*Rename Only present on certain events; see above.RequestedReviewer*UserRequestedTeam*TeamReviewRequester*UserURL*string GetActor returns the Actor field. GetAssignee returns the Assignee field. GetAssigner returns the Assigner field. GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDismissedReview returns the DismissedReview field. GetEvent returns the Event field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetIssue returns the Issue field. GetLabel returns the Label field. GetLockReason returns the LockReason field if it's non-nil, zero value otherwise. GetMilestone returns the Milestone field. GetPerformedViaGithubApp returns the PerformedViaGithubApp field. GetProjectCard returns the ProjectCard field. GetRename returns the Rename field. GetRepository returns the Repository field. GetRequestedReviewer returns the RequestedReviewer field. GetRequestedTeam returns the RequestedTeam field. GetReviewRequester returns the ReviewRequester field. GetURL returns the URL field if it's non-nil, zero value otherwise.
func (*ActivityService).ListIssueEventsForRepository(ctx context.Context, owner, repo string, opts *ListOptions) ([]*IssueEvent, *Response, error)
func (*IssuesService).GetEvent(ctx context.Context, owner, repo string, id int64) (*IssueEvent, *Response, error)
func (*IssuesService).ListIssueEvents(ctx context.Context, owner, repo string, number int, opts *ListOptions) ([]*IssueEvent, *Response, error)
func (*IssuesService).ListRepositoryEvents(ctx context.Context, owner, repo string, opts *ListOptions) ([]*IssueEvent, *Response, error)
IssueImport represents body of issue to import.Assignee*stringBodystringClosed*boolClosedAt*TimestampCreatedAt*TimestampLabels[]stringMilestone*intTitlestringUpdatedAt*Timestamp GetAssignee returns the Assignee field if it's non-nil, zero value otherwise. GetClosed returns the Closed field if it's non-nil, zero value otherwise. GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetMilestone returns the Milestone field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
IssueImportError represents errors of an issue import create request.Code*stringField*stringLocation*stringResource*stringValue*string GetCode returns the Code field if it's non-nil, zero value otherwise. GetField returns the Field field if it's non-nil, zero value otherwise. GetLocation returns the Location field if it's non-nil, zero value otherwise. GetResource returns the Resource field if it's non-nil, zero value otherwise. GetValue returns the Value field if it's non-nil, zero value otherwise.
IssueListByRepoOptions specifies the optional parameters to the
IssuesService.ListByRepo method. Assignee filters issues based on their assignee. Possible values are a
user name, "none" for issues that are not assigned, "*" for issues with
any assigned user. Creator filters issues based on their creator. Direction in which to sort issues. Possible values are: asc, desc.
Default is "desc". Labels filters issues based on their label.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Mentioned filters issues to those mentioned a specific user. Milestone limits issues for the specified milestone. Possible values are
a milestone number, "none" for issues with no milestone, "*" for issues
with any milestone. Since filters issues by time. Sort specifies how to sort issues. Possible values are: created, updated,
and comments. Default value is "created". State filters issues based on their state. Possible values are: open,
closed, all. Default is "open".
func (*IssuesService).ListByRepo(ctx context.Context, owner string, repo string, opts *IssueListByRepoOptions) ([]*Issue, *Response, error)
IssueListCommentsOptions specifies the optional parameters to the
IssuesService.ListComments method. Direction in which to sort comments. Possible values are: asc, desc.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Since filters comments by time. Sort specifies how to sort comments. Possible values are: created, updated. GetDirection returns the Direction field if it's non-nil, zero value otherwise. GetSince returns the Since field if it's non-nil, zero value otherwise. GetSort returns the Sort field if it's non-nil, zero value otherwise.
func (*IssuesService).ListComments(ctx context.Context, owner string, repo string, number int, opts *IssueListCommentsOptions) ([]*IssueComment, *Response, error)
IssueListOptions specifies the optional parameters to the IssuesService.List
and IssuesService.ListByOrg methods. Direction in which to sort issues. Possible values are: asc, desc.
Default is "desc". Filter specifies which issues to list. Possible values are: assigned,
created, mentioned, subscribed, all. Default is "assigned". Labels filters issues based on their label.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Since filters issues by time. Sort specifies how to sort issues. Possible values are: created, updated,
and comments. Default value is "created". State filters issues based on their state. Possible values are: open,
closed, all. Default is "open".
func (*IssuesService).List(ctx context.Context, all bool, opts *IssueListOptions) ([]*Issue, *Response, error)
func (*IssuesService).ListByOrg(ctx context.Context, org string, opts *IssueListOptions) ([]*Issue, *Response, error)
IssueRequest represents a request to create/edit an issue.
It is separate from Issue above because otherwise Labels
and Assignee fail to serialize to the correct JSON.Assignee*stringAssignees*[]stringBody*stringLabels*[]stringMilestone*intState*string StateReason can be 'completed' or 'not_planned'.Title*string GetAssignee returns the Assignee field if it's non-nil, zero value otherwise. GetAssignees returns the Assignees field if it's non-nil, zero value otherwise. GetBody returns the Body field if it's non-nil, zero value otherwise. GetLabels returns the Labels field if it's non-nil, zero value otherwise. GetMilestone returns the Milestone field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise. GetStateReason returns the StateReason field if it's non-nil, zero value otherwise. GetTitle returns the Title field if it's non-nil, zero value otherwise.
func (*IssuesService).Create(ctx context.Context, owner string, repo string, issue *IssueRequest) (*Issue, *Response, error)
func (*IssuesService).Edit(ctx context.Context, owner string, repo string, number int, issue *IssueRequest) (*Issue, *Response, error)
IssuesEvent is triggered when an issue is opened, edited, deleted, transferred,
pinned, unpinned, closed, reopened, assigned, unassigned, labeled, unlabeled,
locked, unlocked, milestoned, or demilestoned.
The Webhook event name is "issues".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#issues Action is the action that was performed. Possible values are: "opened",
"edited", "deleted", "transferred", "pinned", "unpinned", "closed", "reopened",
"assigned", "unassigned", "labeled", "unlabeled", "locked", "unlocked",
"milestoned", or "demilestoned".Assignee*User The following fields are only populated by Webhook events.Installation*InstallationIssue*IssueLabel*LabelMilestone*Milestone The following field is only present when the webhook is triggered on
a repository belonging to an organization.Repo*RepositorySender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetAssignee returns the Assignee field. GetChanges returns the Changes field. GetInstallation returns the Installation field. GetIssue returns the Issue field. GetLabel returns the Label field. GetMilestone returns the Milestone field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field.
IssueStats represents the number of total, open and closed issues.ClosedIssues*intOpenIssues*intTotalIssues*int GetClosedIssues returns the ClosedIssues field if it's non-nil, zero value otherwise. GetOpenIssues returns the OpenIssues field if it's non-nil, zero value otherwise. GetTotalIssues returns the TotalIssues field if it's non-nil, zero value otherwise.( IssueStats) String() string
IssueStats : expvar.Var
IssueStats : fmt.Stringer
func (*AdminStats).GetIssues() *IssueStats
LabelEvent is triggered when a repository's label is created, edited, or deleted.
The Webhook event name is "label"
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#label Action is the action that was performed. Possible values are:
"created", "edited", "deleted"Changes*EditChangeInstallation*InstallationLabel*LabelOrg*Organization The following fields are only populated by Webhook events.Sender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetChanges returns the Changes field. GetInstallation returns the Installation field. GetLabel returns the Label field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field.
LabelResult represents a single search result.Color*stringDefault*boolDescription*stringID*int64Name*stringScore*float64URL*string GetColor returns the Color field if it's non-nil, zero value otherwise. GetDefault returns the Default field if it's non-nil, zero value otherwise. GetDescription returns the Description field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetScore returns the Score field. GetURL returns the URL field if it's non-nil, zero value otherwise.( LabelResult) String() string
LabelResult : expvar.Var
LabelResult : fmt.Stringer
License represents an open source license.Body*stringConditions*[]stringDescription*stringFeatured*boolHTMLURL*stringImplementation*stringKey*stringLimitations*[]stringName*stringPermissions*[]stringSPDXID*stringURL*string GetBody returns the Body field if it's non-nil, zero value otherwise. GetConditions returns the Conditions field if it's non-nil, zero value otherwise. GetDescription returns the Description field if it's non-nil, zero value otherwise. GetFeatured returns the Featured field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetImplementation returns the Implementation field if it's non-nil, zero value otherwise. GetKey returns the Key field if it's non-nil, zero value otherwise. GetLimitations returns the Limitations field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetPermissions returns the Permissions field if it's non-nil, zero value otherwise. GetSPDXID returns the SPDXID field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.( License) String() string
License : expvar.Var
License : fmt.Stringer
func (*LicensesService).Get(ctx context.Context, licenseName string) (*License, *Response, error)
func (*LicensesService).List(ctx context.Context) ([]*License, *Response, error)
func (*Repository).GetLicense() *License
func (*RepositoryLicense).GetLicense() *License
LinearHistoryRequirementEnforcementLevelChanges represents the changes made to the LinearHistoryRequirementEnforcementLevel policy.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*ProtectionChanges).GetLinearHistoryRequirementEnforcementLevel() *LinearHistoryRequirementEnforcementLevelChanges
ListAlertsOptions specifies the optional parameters to the DependabotService.ListRepoAlerts
and DependabotService.ListOrgAlerts methods.Direction*stringEcosystem*stringListCursorOptionsListCursorOptions A cursor, as given in the Link header. If specified, the query only searches for events after this cursor. A cursor, as given in the Link header. If specified, the query only searches for events before this cursor. A cursor, as given in the Link header. If specified, the query continues the search using this cursor. For paginated result sets, the number of results per page (max 100), starting from the first matching result.
This parameter must not be used in combination with last. For paginated result sets, the number of results per page (max 100), starting from the last matching result.
This parameter must not be used in combination with first.ListOptionsListOptionsPackage*stringScope*stringSeverity*stringSort*stringState*string GetDirection returns the Direction field if it's non-nil, zero value otherwise. GetEcosystem returns the Ecosystem field if it's non-nil, zero value otherwise. GetPackage returns the Package field if it's non-nil, zero value otherwise. GetScope returns the Scope field if it's non-nil, zero value otherwise. GetSeverity returns the Severity field if it's non-nil, zero value otherwise. GetSort returns the Sort field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise.
func (*DependabotService).ListOrgAlerts(ctx context.Context, org string, opts *ListAlertsOptions) ([]*DependabotAlert, *Response, error)
func (*DependabotService).ListRepoAlerts(ctx context.Context, owner, repo string, opts *ListAlertsOptions) ([]*DependabotAlert, *Response, error)
ListCheckRunsOptions represents parameters to list check runs. // Filters check runs by GitHub App ID. // Returns check runs with the specified name. // Filters check runs by their completed_at timestamp. Can be one of "latest" (returning the most recent check runs) or "all". Default: "latest"ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. // Returns check runs with the specified status. Can be one of "queued", "in_progress", or "completed". GetAppID returns the AppID field if it's non-nil, zero value otherwise. GetCheckName returns the CheckName field if it's non-nil, zero value otherwise. GetFilter returns the Filter field if it's non-nil, zero value otherwise. GetStatus returns the Status field if it's non-nil, zero value otherwise.
func (*ChecksService).ListCheckRunsCheckSuite(ctx context.Context, owner, repo string, checkSuiteID int64, opts *ListCheckRunsOptions) (*ListCheckRunsResults, *Response, error)
func (*ChecksService).ListCheckRunsForRef(ctx context.Context, owner, repo, ref string, opts *ListCheckRunsOptions) (*ListCheckRunsResults, *Response, error)
ListCheckSuiteOptions represents parameters to list check suites. // Filters check suites by GitHub App id. // Filters checks suites by the name of the check run.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. GetAppID returns the AppID field if it's non-nil, zero value otherwise. GetCheckName returns the CheckName field if it's non-nil, zero value otherwise.
func (*ChecksService).ListCheckSuitesForRef(ctx context.Context, owner, repo, ref string, opts *ListCheckSuiteOptions) (*ListCheckSuiteResults, *Response, error)
ListCollaboratorOptions specifies the optional parameters to the
ProjectsService.ListProjectCollaborators method. Affiliation specifies how collaborators should be filtered by their affiliation.
Possible values are:
"outside" - All outside collaborators of an organization-owned repository
"direct" - All collaborators with permissions to an organization-owned repository,
regardless of organization membership status
"all" - All collaborators the authenticated user can see
Default value is "all".ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. GetAffiliation returns the Affiliation field if it's non-nil, zero value otherwise.
func (*ProjectsService).ListProjectCollaborators(ctx context.Context, id int64, opts *ListCollaboratorOptions) ([]*User, *Response, error)
ListCollaboratorsOptions specifies the optional parameters to the
RepositoriesService.ListCollaborators method. Affiliation specifies how collaborators should be filtered by their affiliation.
Possible values are:
outside - All outside collaborators of an organization-owned repository
direct - All collaborators with permissions to an organization-owned repository,
regardless of organization membership status
all - All collaborators the authenticated user can see
Default value is "all".ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Permission specifies how collaborators should be filtered by the permissions they have on the repository.
Possible values are:
"pull", "triage", "push", "maintain", "admin"
If not specified, all collaborators will be returned.
func (*RepositoriesService).ListCollaborators(ctx context.Context, owner, repo string, opts *ListCollaboratorsOptions) ([]*User, *Response, error)
ListCommentReactionOptions specifies the optional parameters to the
ReactionsService.ListCommentReactions method. Content restricts the returned comment reactions to only those with the given type.
Omit this parameter to list all reactions to a commit comment.
Possible values are: "+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", or "eyes".ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page.
func (*ReactionsService).ListCommentReactions(ctx context.Context, owner, repo string, id int64, opts *ListCommentReactionOptions) ([]*Reaction, *Response, error)
ListContributorsOptions specifies the optional parameters to the
RepositoriesService.ListContributors method. Include anonymous contributors in results or notListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page.
func (*RepositoriesService).ListContributors(ctx context.Context, owner string, repository string, opts *ListContributorsOptions) ([]*Contributor, *Response, error)
ListCursorOptions specifies the optional parameters to various List methods that
support cursor pagination. A cursor, as given in the Link header. If specified, the query only searches for events after this cursor. A cursor, as given in the Link header. If specified, the query only searches for events before this cursor. A cursor, as given in the Link header. If specified, the query continues the search using this cursor. For paginated result sets, the number of results per page (max 100), starting from the first matching result.
This parameter must not be used in combination with last. For paginated result sets, the number of results per page (max 100), starting from the last matching result.
This parameter must not be used in combination with first. For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page.
func (*AppsService).ListHookDeliveries(ctx context.Context, opts *ListCursorOptions) ([]*HookDelivery, *Response, error)
func (*OrganizationsService).ListHookDeliveries(ctx context.Context, org string, id int64, opts *ListCursorOptions) ([]*HookDelivery, *Response, error)
func (*RepositoriesService).ListHookDeliveries(ctx context.Context, owner, repo string, id int64, opts *ListCursorOptions) ([]*HookDelivery, *Response, error)
ListEnterpriseRunnerGroupOptions extend ListOptions to have the optional parameters VisibleToOrganization.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Only return runner groups that are allowed to be used by this organization.
func (*EnterpriseService).ListRunnerGroups(ctx context.Context, enterprise string, opts *ListEnterpriseRunnerGroupOptions) (*EnterpriseRunnerGroups, *Response, error)
ListExternalGroupsOptions specifies the optional parameters to the
TeamsService.ListExternalGroups method.DisplayName*stringListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise.
func (*TeamsService).ListExternalGroups(ctx context.Context, org string, opts *ListExternalGroupsOptions) (*ExternalGroupList, *Response, error)
ListFineGrainedPATOptions specifies optional parameters to ListFineGrainedPersonalAccessTokens. The direction to sort the results by.
Default: desc
Value: asc, desc Only show fine-grained personal access tokens used after the given time.
This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Only show fine-grained personal access tokens used before the given time.
This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. A list of owner usernames to use to filter the results. The permission to use to filter the results. The name of the repository to use to filter the results. The property by which to sort the results.
Default: created_at
Value: created_at
func (*OrganizationsService).ListFineGrainedPersonalAccessTokens(ctx context.Context, org string, opts *ListFineGrainedPATOptions) ([]*PersonalAccessToken, *Response, error)
ListGlobalSecurityAdvisoriesOptions specifies the optional parameters to list the global security advisories. If specified, only return advisories that affect any of package or package@version.
A maximum of 1000 packages can be specified. If the query parameter causes
the URL to exceed the maximum URL length supported by your client, you must specify fewer packages.
Example: affects=package1,package2@1.0.0,package3@^2.0.0 or affects[]=package1&affects[]=package2@1.0.0 If specified, only advisories with this CVE (Common Vulnerabilities and Exposures) identifier will be returned. If specified, only advisories with these Common Weakness Enumerations (CWEs) will be returned.
Example: cwes=79,284,22 or cwes[]=79&cwes[]=284&cwes[]=22 If specified, only advisories for these ecosystems will be returned.
Can be one of: actions, composer, erlang, go, maven, npm, nuget, other, pip, pub, rubygems, rust If specified, only advisories with this GHSA (GitHub Security Advisory) identifier will be returned. Whether to only return advisories that have been withdrawn.ListCursorOptionsListCursorOptions A cursor, as given in the Link header. If specified, the query only searches for events after this cursor. A cursor, as given in the Link header. If specified, the query only searches for events before this cursor. A cursor, as given in the Link header. If specified, the query continues the search using this cursor. For paginated result sets, the number of results per page (max 100), starting from the first matching result.
This parameter must not be used in combination with last. For paginated result sets, the number of results per page (max 100), starting from the last matching result.
This parameter must not be used in combination with first. For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. If specified, only show advisories that were updated or published on a date or date range. If specified, only return advisories that were published on a date or date range. If specified, only advisories with these severities will be returned.
Can be one of: unknown, low, medium, high, critical If specified, only advisories of this type will be returned.
By default, a request with no other parameters defined will only return reviewed advisories that are not malware.
Default: reviewed
Can be one of: reviewed, malware, unreviewed If specified, only return advisories that were updated on a date or date range. GetAffects returns the Affects field if it's non-nil, zero value otherwise. GetCVEID returns the CVEID field if it's non-nil, zero value otherwise. GetEcosystem returns the Ecosystem field if it's non-nil, zero value otherwise. GetGHSAID returns the GHSAID field if it's non-nil, zero value otherwise. GetIsWithdrawn returns the IsWithdrawn field if it's non-nil, zero value otherwise. GetModified returns the Modified field if it's non-nil, zero value otherwise. GetPublished returns the Published field if it's non-nil, zero value otherwise. GetSeverity returns the Severity field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise. GetUpdated returns the Updated field if it's non-nil, zero value otherwise.
func (*SecurityAdvisoriesService).ListGlobalSecurityAdvisories(ctx context.Context, opts *ListGlobalSecurityAdvisoriesOptions) ([]*GlobalSecurityAdvisory, *Response, error)
ListIDPGroupsOptions specifies the optional parameters to the ListIDPGroupsInOrganization method.ListCursorOptionsListCursorOptions A cursor, as given in the Link header. If specified, the query only searches for events after this cursor. A cursor, as given in the Link header. If specified, the query only searches for events before this cursor. A cursor, as given in the Link header. If specified, the query continues the search using this cursor. For paginated result sets, the number of results per page (max 100), starting from the first matching result.
This parameter must not be used in combination with last. For paginated result sets, the number of results per page (max 100), starting from the last matching result.
This parameter must not be used in combination with first. For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Filters the results to return only those that begin with the value specified by this parameter.
func (*TeamsService).ListIDPGroupsInOrganization(ctx context.Context, org string, opts *ListIDPGroupsOptions) (*IDPGroupList, *Response, error)
ListMembersOptions specifies optional parameters to the
OrganizationsService.ListMembers method. Filter members returned in the list. Possible values are:
2fa_disabled, all. Default is "all".ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. If true (or if the authenticated user is not an owner of the
organization), list only publicly visible members. Role filters members returned by their role in the organization.
Possible values are:
all - all members of the organization, regardless of role
admin - organization owners
member - non-owner organization members
Default is "all".
func (*OrganizationsService).ListMembers(ctx context.Context, org string, opts *ListMembersOptions) ([]*User, *Response, error)
ListOrgMembershipsOptions specifies optional parameters to the
OrganizationsService.ListOrgMemberships method.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Filter memberships to include only those with the specified state.
Possible values are: "active", "pending".
func (*OrganizationsService).ListOrgMemberships(ctx context.Context, opts *ListOrgMembershipsOptions) ([]*Membership, *Response, error)
ListOrgRunnerGroupOptions extend ListOptions to have the optional parameters VisibleToRepository.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Only return runner groups that are allowed to be used by this repository.
func (*ActionsService).ListOrganizationRunnerGroups(ctx context.Context, org string, opts *ListOrgRunnerGroupOptions) (*RunnerGroups, *Response, error)
ListOutsideCollaboratorsOptions specifies optional parameters to the
OrganizationsService.ListOutsideCollaborators method. Filter specifies how jobs should be filtered by their completed_at timestamp.
Possible values are:
latest - Returns jobs from the most recent execution of the workflow run
all - Returns all jobs for a workflow run, including from old executions of the workflow run
Default value is "latest".ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page.
func (*OrganizationsService).ListOutsideCollaborators(ctx context.Context, org string, opts *ListOutsideCollaboratorsOptions) ([]*User, *Response, error)
ListRepositorySecurityAdvisoriesOptions specifies the optional parameters to list the repository security advisories. Direction in which to sort advisories. Possible values are: asc, desc.
Default is "asc".ListCursorOptionsListCursorOptions A cursor, as given in the Link header. If specified, the query only searches for events after this cursor. A cursor, as given in the Link header. If specified, the query only searches for events before this cursor. A cursor, as given in the Link header. If specified, the query continues the search using this cursor. For paginated result sets, the number of results per page (max 100), starting from the first matching result.
This parameter must not be used in combination with last. For paginated result sets, the number of results per page (max 100), starting from the last matching result.
This parameter must not be used in combination with first. For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Sort specifies how to sort advisories. Possible values are: created, updated,
and published. Default value is "created". State filters advisories based on their state. Possible values are: triage, draft, published, closed.
func (*SecurityAdvisoriesService).ListRepositorySecurityAdvisories(ctx context.Context, owner, repo string, opt *ListRepositorySecurityAdvisoriesOptions) ([]*SecurityAdvisory, *Response, error)
func (*SecurityAdvisoriesService).ListRepositorySecurityAdvisoriesForOrg(ctx context.Context, org string, opt *ListRepositorySecurityAdvisoriesOptions) ([]*SecurityAdvisory, *Response, error)
ListSCIMProvisionedIdentitiesOptions represents options for ListSCIMProvisionedIdentities.
GitHub API docs: https://docs.github.com/rest/scim#list-scim-provisioned-identities--parameters // Used for pagination: the number of results to return. (Optional.) Filter results using the equals query parameter operator (eq).
You can filter results that are equal to id, userName, emails, and external_id.
For example, to search for an identity with the userName Octocat, you would use this query: ?filter=userName%20eq%20\"Octocat\".
To filter results for the identity with the email octocat@github.com, you would use this query: ?filter=emails%20eq%20\"octocat@github.com\".
(Optional.) // Used for pagination: the index of the first result to return. (Optional.) GetCount returns the Count field if it's non-nil, zero value otherwise. GetFilter returns the Filter field if it's non-nil, zero value otherwise. GetStartIndex returns the StartIndex field if it's non-nil, zero value otherwise.
func (*SCIMService).ListSCIMProvisionedIdentities(ctx context.Context, org string, opts *ListSCIMProvisionedIdentitiesOptions) (*SCIMProvisionedIdentities, *Response, error)
ListWorkflowJobsOptions specifies optional parameters to ListWorkflowJobs. Filter specifies how jobs should be filtered by their completed_at timestamp.
Possible values are:
latest - Returns jobs from the most recent execution of the workflow run
all - Returns all jobs for a workflow run, including from old executions of the workflow run
Default value is "latest".ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page.
func (*ActionsService).ListWorkflowJobs(ctx context.Context, owner, repo string, runID int64, opts *ListWorkflowJobsOptions) (*Jobs, *Response, error)
Location represents the exact location of the GitHub Code Scanning Alert in the scanned project.EndColumn*intEndLine*intPath*stringStartColumn*intStartLine*int GetEndColumn returns the EndColumn field if it's non-nil, zero value otherwise. GetEndLine returns the EndLine field if it's non-nil, zero value otherwise. GetPath returns the Path field if it's non-nil, zero value otherwise. GetStartColumn returns the StartColumn field if it's non-nil, zero value otherwise. GetStartLine returns the StartLine field if it's non-nil, zero value otherwise.
func (*MostRecentInstance).GetLocation() *Location
LockBranch represents if the branch is marked as read-only. If this is true, users will not be able to push to the branch.Enabled*bool GetEnabled returns the Enabled field if it's non-nil, zero value otherwise.
func (*Protection).GetLockBranch() *LockBranch
LockIssueOptions specifies the optional parameters to the
IssuesService.Lock method. LockReason specifies the reason to lock this issue.
Providing a lock reason can help make it clearer to contributors why an issue
was locked. Possible values are: "off-topic", "too heated", "resolved", and "spam".
func (*IssuesService).Lock(ctx context.Context, owner string, repo string, number int, opts *LockIssueOptions) (*Response, error)
MarkdownOptions specifies optional parameters to the Render method. Context identifies the repository context. Only taken into account
when rendering as "gfm". Mode identifies the rendering mode. Possible values are:
markdown - render a document as plain Render, just like
README files are rendered.
gfm - to render a document as user-content, e.g. like user
comments or issues are rendered. In GFM mode, hard line breaks are
always taken into account, and issue and user mentions are linked
accordingly.
Default is "markdown".
func (*MarkdownService).Render(ctx context.Context, text string, opts *MarkdownOptions) (string, *Response, error)
MarketplacePendingChange represents a pending change to a GitHub Apps Marketplace Plan.EffectiveDate*TimestampID*int64Plan*MarketplacePlanUnitCount*int GetEffectiveDate returns the EffectiveDate field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetPlan returns the Plan field. GetUnitCount returns the UnitCount field if it's non-nil, zero value otherwise.
func (*MarketplacePlanAccount).GetMarketplacePendingChange() *MarketplacePendingChange
MarketplacePlan represents a GitHub Apps Marketplace Listing Plan.AccountsURL*stringBullets*[]stringDescription*stringHasFreeTrial*boolID*int64MonthlyPriceInCents*intName*stringNumber*int The pricing model for this listing. Can be one of "flat-rate", "per-unit", or "free". State can be one of the values "draft" or "published".URL*stringUnitName*stringYearlyPriceInCents*int GetAccountsURL returns the AccountsURL field if it's non-nil, zero value otherwise. GetBullets returns the Bullets field if it's non-nil, zero value otherwise. GetDescription returns the Description field if it's non-nil, zero value otherwise. GetHasFreeTrial returns the HasFreeTrial field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetMonthlyPriceInCents returns the MonthlyPriceInCents field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetNumber returns the Number field if it's non-nil, zero value otherwise. GetPriceModel returns the PriceModel field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUnitName returns the UnitName field if it's non-nil, zero value otherwise. GetYearlyPriceInCents returns the YearlyPriceInCents field if it's non-nil, zero value otherwise.
func (*MarketplacePendingChange).GetPlan() *MarketplacePlan
func (*MarketplacePurchase).GetPlan() *MarketplacePlan
func (*MarketplaceService).ListPlans(ctx context.Context, opts *ListOptions) ([]*MarketplacePlan, *Response, error)
MarketplacePurchaseAccount represents a GitHub Account (user or organization) for a Purchase.Email*stringID*int64Login*stringNodeID*stringOrganizationBillingEmail*stringType*stringURL*string GetEmail returns the Email field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetLogin returns the Login field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetOrganizationBillingEmail returns the OrganizationBillingEmail field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.
func (*MarketplacePurchase).GetAccount() *MarketplacePurchaseAccount
MarketplacePurchaseEvent is triggered when a user purchases, cancels, or changes
their GitHub Marketplace plan.
Webhook event name "marketplace_purchase".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#marketplace_purchase Action is the action that was performed. Possible values are:
"purchased", "cancelled", "pending_change", "pending_change_cancelled", "changed". The following fields are only populated by Webhook events.Installation*InstallationMarketplacePurchase*MarketplacePurchase The following field is only present when the webhook is triggered on
a repository belonging to an organization.PreviousMarketplacePurchase*MarketplacePurchaseSender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetEffectiveDate returns the EffectiveDate field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetMarketplacePurchase returns the MarketplacePurchase field. GetOrg returns the Org field. GetPreviousMarketplacePurchase returns the PreviousMarketplacePurchase field. GetSender returns the Sender field.
MemberChangesPermission represents changes to a repository collaborator's permissions.From*stringTo*string GetFrom returns the From field if it's non-nil, zero value otherwise. GetTo returns the To field if it's non-nil, zero value otherwise.
func (*MemberChanges).GetPermission() *MemberChangesPermission
MemberChangesRoleName represents changes to a repository collaborator's role.From*stringTo*string GetFrom returns the From field if it's non-nil, zero value otherwise. GetTo returns the To field if it's non-nil, zero value otherwise.
func (*MemberChanges).GetRoleName() *MemberChangesRoleName
MemberEvent is triggered when a user's membership as a collaborator to a repository changes.
The Webhook event name is "member".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#member Action is the action that was performed. Possible values are:
"added", "edited", "removed".Changes*MemberChangesInstallation*InstallationMember*User The following field is only present when the webhook is triggered on
a repository belonging to an organization. The following fields are only populated by Webhook events.Sender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetChanges returns the Changes field. GetInstallation returns the Installation field. GetMember returns the Member field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field.
MembershipEvent is triggered when a user is added or removed from a team.
The Webhook event name is "membership".
Events of this type are not visible in timelines, they are only used to
trigger organization webhooks.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#membership Action is the action that was performed. Possible values are: "added", "removed".Installation*InstallationMember*User The following fields are only populated by Webhook events. Scope is the scope of the membership. Possible value is: "team".Sender*UserTeam*Team GetAction returns the Action field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetMember returns the Member field. GetOrg returns the Org field. GetScope returns the Scope field if it's non-nil, zero value otherwise. GetSender returns the Sender field. GetTeam returns the Team field.
MergeGroup represents the merge group in a merge queue. The full ref of the branch the merge group will be merged into. The SHA of the merge group's parent commit. An expanded representation of the head_sha commit. The full ref of the merge group. The SHA of the merge group. GetBaseRef returns the BaseRef field if it's non-nil, zero value otherwise. GetBaseSHA returns the BaseSHA field if it's non-nil, zero value otherwise. GetHeadCommit returns the HeadCommit field. GetHeadRef returns the HeadRef field if it's non-nil, zero value otherwise. GetHeadSHA returns the HeadSHA field if it's non-nil, zero value otherwise.
func (*MergeGroupEvent).GetMergeGroup() *MergeGroup
MergeGroupEvent represents activity related to merge groups in a merge queue. The type of activity is specified
in the action property of the payload object.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#merge_group The action that was performed. Currently, can only be checks_requested.Installation*Installation The merge group.Org*Organization The following fields are only populated by Webhook events.Sender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetMergeGroup returns the MergeGroup field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field.
Message is a part of MostRecentInstance struct which provides the appropriate message when any action is performed on the analysis object.Text*string GetText returns the Text field if it's non-nil, zero value otherwise.
func (*MostRecentInstance).GetMessage() *Message
MessageSigner is used by GitService.CreateCommit to sign a commit.
To create a MessageSigner that signs a commit with a [golang.org/x/crypto/openpgp.Entity],
or [github.com/ProtonMail/go-crypto/openpgp.Entity], use:
commit.Signer = github.MessageSignerFunc(func(w io.Writer, r io.Reader) error {
return openpgp.ArmoredDetachSign(w, openpgpEntity, r, nil)
})( MessageSigner) Sign(w io.Writer, r io.Reader) errorMessageSignerFunc
MessageSignerFunc is a single function implementation of MessageSigner.( MessageSignerFunc) Sign(w io.Writer, r io.Reader) error
MessageSignerFunc : MessageSigner
MetaEvent is triggered when the webhook that this event is configured on is deleted.
This event will only listen for changes to the particular hook the event is installed on.
Therefore, it must be selected for each hook that you'd like to receive meta events for.
The Webhook event name is "meta".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#meta Action is the action that was performed. Possible value is: "deleted". The modified webhook.
This will contain different keys based on the type of webhook it is: repository,
organization, business, app, or GitHub Marketplace. The ID of the modified webhook.Installation*InstallationOrg*Organization The following fields are only populated by Webhook events.Sender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetHook returns the Hook field. GetHookID returns the HookID field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field.
Migration represents a GitHub migration (archival).CreatedAt*string ExcludeAttachments indicates whether attachments should be excluded from
the migration (to reduce migration archive file size).GUID*stringID*int64 LockRepositories indicates whether repositories are locked (to prevent
manipulation) while migrating data.Repositories[]*Repository State is the current state of a migration.
Possible values are:
"pending" which means the migration hasn't started yet,
"exporting" which means the migration is in progress,
"exported" which means the migration finished successfully, or
"failed" which means the migration failed.URL*stringUpdatedAt*string GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetExcludeAttachments returns the ExcludeAttachments field if it's non-nil, zero value otherwise. GetGUID returns the GUID field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetLockRepositories returns the LockRepositories field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.( Migration) String() string
Migration : expvar.Var
Migration : fmt.Stringer
func (*MigrationService).ListMigrations(ctx context.Context, org string, opts *ListOptions) ([]*Migration, *Response, error)
func (*MigrationService).MigrationStatus(ctx context.Context, org string, id int64) (*Migration, *Response, error)
func (*MigrationService).StartMigration(ctx context.Context, org string, repos []string, opts *MigrationOptions) (*Migration, *Response, error)
MigrationOptions specifies the optional parameters to Migration methods. ExcludeAttachments indicates whether attachments should be excluded from
the migration (to reduce migration archive file size). LockRepositories indicates whether repositories should be locked (to prevent
manipulation) while migrating data.
func (*MigrationService).StartMigration(ctx context.Context, org string, repos []string, opts *MigrationOptions) (*Migration, *Response, error)
MilestoneEvent is triggered when a milestone is created, closed, opened, edited, or deleted.
The Webhook event name is "milestone".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#milestone Action is the action that was performed. Possible values are:
"created", "closed", "opened", "edited", "deleted" The following fields are only populated by Webhook events.Installation*InstallationMilestone*MilestoneOrg*OrganizationRepo*RepositorySender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetChanges returns the Changes field. GetInstallation returns the Installation field. GetMilestone returns the Milestone field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field.
MilestoneListOptions specifies the optional parameters to the
IssuesService.ListMilestones method. Direction in which to sort milestones. Possible values are: asc, desc.
Default is "asc".ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Sort specifies how to sort milestones. Possible values are: due_on, completeness.
Default value is "due_on". State filters milestones based on their state. Possible values are:
open, closed, all. Default is "open".
func (*IssuesService).ListMilestones(ctx context.Context, owner string, repo string, opts *MilestoneListOptions) ([]*Milestone, *Response, error)
MilestoneStats represents the number of total, open and close milestones.ClosedMilestones*intOpenMilestones*intTotalMilestones*int GetClosedMilestones returns the ClosedMilestones field if it's non-nil, zero value otherwise. GetOpenMilestones returns the OpenMilestones field if it's non-nil, zero value otherwise. GetTotalMilestones returns the TotalMilestones field if it's non-nil, zero value otherwise.( MilestoneStats) String() string
MilestoneStats : expvar.Var
MilestoneStats : fmt.Stringer
func (*AdminStats).GetMilestones() *MilestoneStats
MinutesUsedBreakdown counts the actions minutes used by machine type (e.g. UBUNTU, WINDOWS, MACOS).
MostRecentInstance provides details of the most recent instance of this alert for the default branch or for the specified Git reference.AnalysisKey*stringCategory*stringClassifications[]stringCommitSHA*stringEnvironment*stringHTMLURL*stringLocation*LocationMessage*MessageRef*stringState*string GetAnalysisKey returns the AnalysisKey field if it's non-nil, zero value otherwise. GetCategory returns the Category field if it's non-nil, zero value otherwise. GetCommitSHA returns the CommitSHA field if it's non-nil, zero value otherwise. GetEnvironment returns the Environment field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetLocation returns the Location field. GetMessage returns the Message field. GetRef returns the Ref field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise.
func (*Alert).GetMostRecentInstance() *MostRecentInstance
func (*CodeScanningService).ListAlertInstances(ctx context.Context, owner, repo string, id int64, opts *AlertInstancesListOptions) ([]*MostRecentInstance, *Response, error)
NewPullRequest represents a new pull request to be created. The name of the branch you want the changes pulled into. This should be
an existing branch on the current repository. You cannot submit a pull
request to one repository that requests a merge to a base of another
repository.Body*stringDraft*bool The name of the branch where your changes are implemented. For
cross-repository pull requests in the same network, namespace head with
a user like this: username:branch.HeadRepo*stringIssue*intMaintainerCanModify*boolTitle*string GetBase returns the Base field if it's non-nil, zero value otherwise. GetBody returns the Body field if it's non-nil, zero value otherwise. GetDraft returns the Draft field if it's non-nil, zero value otherwise. GetHead returns the Head field if it's non-nil, zero value otherwise. GetHeadRepo returns the HeadRepo field if it's non-nil, zero value otherwise. GetIssue returns the Issue field if it's non-nil, zero value otherwise. GetMaintainerCanModify returns the MaintainerCanModify field if it's non-nil, zero value otherwise. GetTitle returns the Title field if it's non-nil, zero value otherwise.
func (*PullRequestsService).Create(ctx context.Context, owner string, repo string, pull *NewPullRequest) (*PullRequest, *Response, error)
NewTeam represents a team to be created or modified.Description*string LDAPDN may be used in GitHub Enterprise when the team membership
is synchronized with LDAP.Maintainers[]string // Name of the team. (Required.) NotificationSetting can be one of: "notifications_enabled", "notifications_disabled".ParentTeamID*int64 Deprecated: Permission is deprecated when creating or editing a team in an org
using the new GitHub permission model. It no longer identifies the
permission a team has on its repos, but only specifies the default
permission a repo is initially added with. Avoid confusion by
specifying a permission value when calling AddTeamRepo. Privacy identifies the level of privacy this team should have.
Possible values are:
secret - only visible to organization owners and members of this team
closed - visible to all members of this organization
Default is "secret".RepoNames[]string GetDescription returns the Description field if it's non-nil, zero value otherwise. GetLDAPDN returns the LDAPDN field if it's non-nil, zero value otherwise. GetNotificationSetting returns the NotificationSetting field if it's non-nil, zero value otherwise. GetParentTeamID returns the ParentTeamID field if it's non-nil, zero value otherwise. GetPermission returns the Permission field if it's non-nil, zero value otherwise. GetPrivacy returns the Privacy field if it's non-nil, zero value otherwise.( NewTeam) String() string
NewTeam : expvar.Var
NewTeam : fmt.Stringer
func (*TeamsService).CreateTeam(ctx context.Context, org string, team NewTeam) (*Team, *Response, error)
func (*TeamsService).EditTeamByID(ctx context.Context, orgID, teamID int64, team NewTeam, removeParent bool) (*Team, *Response, error)
func (*TeamsService).EditTeamBySlug(ctx context.Context, org, slug string, team NewTeam, removeParent bool) (*Team, *Response, error)
NotificationSubject identifies the subject of a notification.LatestCommentURL*stringTitle*stringType*stringURL*string GetLatestCommentURL returns the LatestCommentURL field if it's non-nil, zero value otherwise. GetTitle returns the Title field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.
func (*Notification).GetSubject() *NotificationSubject
OAuthAPP represents the GitHub Site Administrator OAuth app.ClientID*stringName*stringURL*string GetClientID returns the ClientID field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.( OAuthAPP) String() string
OAuthAPP : expvar.Var
OAuthAPP : fmt.Stringer
func (*UserAuthorization).GetApp() *OAuthAPP
Organization represents a GitHub organization account. AdvancedSecurityAuditLogEnabled toggles whether the advanced security audit log is enabled.AvatarURL*stringBillingEmail*stringBlog*stringCollaborators*intCompany*stringCreatedAt*Timestamp DefaultRepoPermission can be one of: "read", "write", "admin", or "none". (Default: "read").
It is only used in OrganizationsService.Edit. DefaultRepoSettings can be one of: "read", "write", "admin", or "none". (Default: "read").
It is only used in OrganizationsService.Get. DependabotAlertsEnabled toggles whether dependabot alerts are enabled. DependabotSecurityUpdatesEnabled toggles whether dependabot security updates are enabled. DependabotGraphEnabledForNewRepos toggles whether dependabot graph is enabled on new repositories.Description*stringDiskUsage*intEmail*stringEventsURL*stringFollowers*intFollowing*intHTMLURL*stringHasOrganizationProjects*boolHasRepositoryProjects*boolHooksURL*stringID*int64IsVerified*boolIssuesURL*stringLocation*stringLogin*string MembersAllowedRepositoryCreationType denotes if organization members can create repositories
and the type of repositories they can create. Possible values are: "all", "private", or "none".
Deprecated: Use MembersCanCreatePublicRepos, MembersCanCreatePrivateRepos, MembersCanCreateInternalRepos
instead. The new fields overrides the existing MembersAllowedRepositoryCreationType during 'edit'
operation and does not consider 'internal' repositories during 'get' operationMembersCanCreateInternalRepos*bool MembersCanCreatePages toggles whether organization members can create GitHub Pages sites. MembersCanCreatePrivatePages toggles whether organization members can create private GitHub Pages sites.MembersCanCreatePrivateRepos*bool MembersCanCreatePublicPages toggles whether organization members can create public GitHub Pages sites.https://developer.github.com/changes/2019-12-03-internal-visibility-changes/#rest-v3-api MembersCanCreateRepos default value is true and is only used in Organizations.Edit. MembersCanForkPrivateRepos toggles whether organization members can fork private organization repositories.MembersURL*stringName*stringNodeID*stringOwnedPrivateRepos*int64Plan*PlanPrivateGists*intPublicGists*intPublicMembersURL*stringPublicRepos*intReposURL*string SecretScanningEnabled toggles whether secret scanning is enabled on new repositories. SecretScanningPushProtectionEnabledForNewRepos toggles whether secret scanning push protection is enabled on new repositories. SecretScanningValidityChecksEnabled toggles whether secret scanning validity check is enabled.TotalPrivateRepos*int64TwitterUsername*stringTwoFactorRequirementEnabled*boolType*string API URLsUpdatedAt*Timestamp WebCommitSignoffRequire toggles GetAdvancedSecurityEnabledForNewRepos returns the AdvancedSecurityEnabledForNewRepos field if it's non-nil, zero value otherwise. GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise. GetBillingEmail returns the BillingEmail field if it's non-nil, zero value otherwise. GetBlog returns the Blog field if it's non-nil, zero value otherwise. GetCollaborators returns the Collaborators field if it's non-nil, zero value otherwise. GetCompany returns the Company field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDefaultRepoPermission returns the DefaultRepoPermission field if it's non-nil, zero value otherwise. GetDefaultRepoSettings returns the DefaultRepoSettings field if it's non-nil, zero value otherwise. GetDependabotAlertsEnabledForNewRepos returns the DependabotAlertsEnabledForNewRepos field if it's non-nil, zero value otherwise. GetDependabotSecurityUpdatesEnabledForNewRepos returns the DependabotSecurityUpdatesEnabledForNewRepos field if it's non-nil, zero value otherwise. GetDependencyGraphEnabledForNewRepos returns the DependencyGraphEnabledForNewRepos field if it's non-nil, zero value otherwise. GetDescription returns the Description field if it's non-nil, zero value otherwise. GetDiskUsage returns the DiskUsage field if it's non-nil, zero value otherwise. GetEmail returns the Email field if it's non-nil, zero value otherwise. GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. GetFollowers returns the Followers field if it's non-nil, zero value otherwise. GetFollowing returns the Following field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetHasOrganizationProjects returns the HasOrganizationProjects field if it's non-nil, zero value otherwise. GetHasRepositoryProjects returns the HasRepositoryProjects field if it's non-nil, zero value otherwise. GetHooksURL returns the HooksURL field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetIsVerified returns the IsVerified field if it's non-nil, zero value otherwise. GetIssuesURL returns the IssuesURL field if it's non-nil, zero value otherwise. GetLocation returns the Location field if it's non-nil, zero value otherwise. GetLogin returns the Login field if it's non-nil, zero value otherwise. GetMembersAllowedRepositoryCreationType returns the MembersAllowedRepositoryCreationType field if it's non-nil, zero value otherwise. GetMembersCanCreateInternalRepos returns the MembersCanCreateInternalRepos field if it's non-nil, zero value otherwise. GetMembersCanCreatePages returns the MembersCanCreatePages field if it's non-nil, zero value otherwise. GetMembersCanCreatePrivatePages returns the MembersCanCreatePrivatePages field if it's non-nil, zero value otherwise. GetMembersCanCreatePrivateRepos returns the MembersCanCreatePrivateRepos field if it's non-nil, zero value otherwise. GetMembersCanCreatePublicPages returns the MembersCanCreatePublicPages field if it's non-nil, zero value otherwise. GetMembersCanCreatePublicRepos returns the MembersCanCreatePublicRepos field if it's non-nil, zero value otherwise. GetMembersCanCreateRepos returns the MembersCanCreateRepos field if it's non-nil, zero value otherwise. GetMembersCanForkPrivateRepos returns the MembersCanForkPrivateRepos field if it's non-nil, zero value otherwise. GetMembersURL returns the MembersURL field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetOwnedPrivateRepos returns the OwnedPrivateRepos field if it's non-nil, zero value otherwise. GetPlan returns the Plan field. GetPrivateGists returns the PrivateGists field if it's non-nil, zero value otherwise. GetPublicGists returns the PublicGists field if it's non-nil, zero value otherwise. GetPublicMembersURL returns the PublicMembersURL field if it's non-nil, zero value otherwise. GetPublicRepos returns the PublicRepos field if it's non-nil, zero value otherwise. GetReposURL returns the ReposURL field if it's non-nil, zero value otherwise. GetSecretScanningEnabledForNewRepos returns the SecretScanningEnabledForNewRepos field if it's non-nil, zero value otherwise. GetSecretScanningPushProtectionEnabledForNewRepos returns the SecretScanningPushProtectionEnabledForNewRepos field if it's non-nil, zero value otherwise. GetSecretScanningValidityChecksEnabled returns the SecretScanningValidityChecksEnabled field if it's non-nil, zero value otherwise. GetTotalPrivateRepos returns the TotalPrivateRepos field if it's non-nil, zero value otherwise. GetTwitterUsername returns the TwitterUsername field if it's non-nil, zero value otherwise. GetTwoFactorRequirementEnabled returns the TwoFactorRequirementEnabled field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. GetWebCommitSignoffRequired returns the WebCommitSignoffRequired field if it's non-nil, zero value otherwise.( Organization) String() string
Organization : expvar.Var
Organization : fmt.Stringer
func (*AdminService).CreateOrg(ctx context.Context, org *Organization, admin string) (*Organization, *Response, error)
func (*BranchProtectionRuleEvent).GetOrg() *Organization
func (*CheckRunEvent).GetOrg() *Organization
func (*CheckSuiteEvent).GetOrg() *Organization
func (*CodeScanningAlertEvent).GetOrg() *Organization
func (*CommitCommentEvent).GetOrg() *Organization
func (*CopilotSeatDetails).GetOrganization() (*Organization, bool)
func (*CreateEvent).GetOrg() *Organization
func (*CustomOrgRoles).GetOrg() *Organization
func (*CustomRepoRoles).GetOrg() *Organization
func (*DeleteEvent).GetOrg() *Organization
func (*DependabotAlertEvent).GetOrganization() *Organization
func (*DeployKeyEvent).GetOrganization() *Organization
func (*DeploymentEvent).GetOrg() *Organization
func (*DeploymentProtectionRuleEvent).GetOrganization() *Organization
func (*DeploymentReviewEvent).GetOrganization() *Organization
func (*DeploymentStatusEvent).GetOrg() *Organization
func (*DiscussionCommentEvent).GetOrg() *Organization
func (*DiscussionEvent).GetOrg() *Organization
func (*Event).GetOrg() *Organization
func (*GollumEvent).GetOrg() *Organization
func (*InstallationEvent).GetOrg() *Organization
func (*InstallationRepositoriesEvent).GetOrg() *Organization
func (*InstallationTargetEvent).GetOrganization() *Organization
func (*IssueCommentEvent).GetOrganization() *Organization
func (*IssuesEvent).GetOrg() *Organization
func (*LabelEvent).GetOrg() *Organization
func (*MarketplacePurchaseEvent).GetOrg() *Organization
func (*MemberEvent).GetOrg() *Organization
func (*Membership).GetOrganization() *Organization
func (*MembershipEvent).GetOrg() *Organization
func (*MergeGroupEvent).GetOrg() *Organization
func (*MetaEvent).GetOrg() *Organization
func (*MilestoneEvent).GetOrg() *Organization
func (*OrganizationEvent).GetOrganization() *Organization
func (*OrganizationsService).Edit(ctx context.Context, name string, org *Organization) (*Organization, *Response, error)
func (*OrganizationsService).Get(ctx context.Context, org string) (*Organization, *Response, error)
func (*OrganizationsService).GetByID(ctx context.Context, id int64) (*Organization, *Response, error)
func (*OrganizationsService).List(ctx context.Context, user string, opts *ListOptions) ([]*Organization, *Response, error)
func (*OrganizationsService).ListAll(ctx context.Context, opts *OrganizationsListOptions) ([]*Organization, *Response, error)
func (*OrgBlockEvent).GetOrganization() *Organization
func (*PackageEvent).GetOrg() *Organization
func (*PageBuildEvent).GetOrg() *Organization
func (*PersonalAccessTokenRequest).GetOrg() *Organization
func (*PersonalAccessTokenRequestEvent).GetOrg() *Organization
func (*PingEvent).GetOrg() *Organization
func (*ProjectCardEvent).GetOrg() *Organization
func (*ProjectColumnEvent).GetOrg() *Organization
func (*ProjectEvent).GetOrg() *Organization
func (*ProjectV2Event).GetOrg() *Organization
func (*ProjectV2ItemEvent).GetOrg() *Organization
func (*PublicEvent).GetOrg() *Organization
func (*PullRequestEvent).GetOrganization() *Organization
func (*PullRequestReviewCommentEvent).GetOrg() *Organization
func (*PullRequestReviewEvent).GetOrganization() *Organization
func (*PullRequestReviewThreadEvent).GetOrg() *Organization
func (*PullRequestTargetEvent).GetOrganization() *Organization
func (*PushEvent).GetOrganization() *Organization
func (*ReleaseEvent).GetOrg() *Organization
func (*Repository).GetOrganization() *Organization
func (*RepositoryDispatchEvent).GetOrg() *Organization
func (*RepositoryEvent).GetOrg() *Organization
func (*RepositoryImportEvent).GetOrg() *Organization
func (*RepositoryVulnerabilityAlertEvent).GetOrg() *Organization
func (*SecretScanningAlertEvent).GetOrganization() *Organization
func (*SecurityAdvisoryEvent).GetOrganization() *Organization
func (*SecurityAndAnalysisEvent).GetOrganization() *Organization
func (*SponsorshipEvent).GetOrganization() *Organization
func (*StarEvent).GetOrg() *Organization
func (*StatusEvent).GetOrg() *Organization
func (*Team).GetOrganization() *Organization
func (*TeamAddEvent).GetOrg() *Organization
func (*TeamEvent).GetOrg() *Organization
func (*WatchEvent).GetOrg() *Organization
func (*WorkflowDispatchEvent).GetOrg() *Organization
func (*WorkflowJobEvent).GetOrg() *Organization
func (*WorkflowRunEvent).GetOrg() *Organization
func (*AdminService).CreateOrg(ctx context.Context, org *Organization, admin string) (*Organization, *Response, error)
func (*AdminService).RenameOrg(ctx context.Context, org *Organization, newName string) (*RenameOrgResponse, *Response, error)
func (*OrganizationsService).Edit(ctx context.Context, name string, org *Organization) (*Organization, *Response, error)
OrganizationEvent is triggered when an organization is deleted and renamed, and when a user is added,
removed, or invited to an organization.
Events of this type are not visible in timelines. These events are only used to trigger organization hooks.
Webhook event name is "organization".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#organization Action is the action that was performed.
Possible values are: "deleted", "renamed", "member_added", "member_removed", or "member_invited".Installation*Installation Invitation is the invitation for the user or email if the action is "member_invited". Membership is the membership between the user and the organization.
Not present when the action is "member_invited".Organization*OrganizationSender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetInvitation returns the Invitation field. GetMembership returns the Membership field. GetOrganization returns the Organization field. GetSender returns the Sender field.
OrganizationsListOptions specifies the optional parameters to the
OrganizationsService.ListAll method. Note: Pagination is powered exclusively by the Since parameter,
ListOptions.Page has no effect.
ListOptions.PerPage controls an undocumented GitHub API parameter. For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Since filters Organizations by ID.
func (*OrganizationsService).ListAll(ctx context.Context, opts *OrganizationsListOptions) ([]*Organization, *Response, error)
OrgBlockEvent is triggered when an organization blocks or unblocks a user.
The Webhook event name is "org_block".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#org_block Action is the action that was performed.
Can be "blocked" or "unblocked".BlockedUser*User The following fields are only populated by Webhook events.Organization*OrganizationSender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetBlockedUser returns the BlockedUser field. GetInstallation returns the Installation field. GetOrganization returns the Organization field. GetSender returns the Sender field.
OrgStats represents the number of total, disabled organizations and the team
and team member count.DisabledOrgs*intTotalOrgs*intTotalTeamMembers*intTotalTeams*int GetDisabledOrgs returns the DisabledOrgs field if it's non-nil, zero value otherwise. GetTotalOrgs returns the TotalOrgs field if it's non-nil, zero value otherwise. GetTotalTeamMembers returns the TotalTeamMembers field if it's non-nil, zero value otherwise. GetTotalTeams returns the TotalTeams field if it's non-nil, zero value otherwise.( OrgStats) String() string
OrgStats : expvar.Var
OrgStats : fmt.Stringer
func (*AdminStats).GetOrgs() *OrgStats
OwnerInfo represents the account info of the owner of the repo (could be User or Organization but both are User structs).Org*UserUser*User GetOrg returns the Org field. GetUser returns the User field.
func (*EditOwner).GetOwnerInfo() *OwnerInfo
PackageEvent represents activity related to GitHub Packages.
The Webhook event name is "package".
This event is triggered when a GitHub Package is published or updated.
GitHub API docs: https://developer.github.com/webhooks/event-payloads/#package Action is the action that was performed.
Can be "published" or "updated". The following fields are only populated by Webhook events.Org*OrganizationPackage*PackageRepo*RepositorySender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetOrg returns the Org field. GetPackage returns the Package field. GetRepo returns the Repo field. GetSender returns the Sender field.
PackageFile represents a GitHub package version release file.Author*UserContentType*stringCreatedAt*TimestampDownloadURL*stringID*int64MD5*stringName*stringSHA1*stringSHA256*stringSize*int64State*stringUpdatedAt*Timestamp GetAuthor returns the Author field. GetContentType returns the ContentType field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDownloadURL returns the DownloadURL field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetMD5 returns the MD5 field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetSHA1 returns the SHA1 field if it's non-nil, zero value otherwise. GetSHA256 returns the SHA256 field if it's non-nil, zero value otherwise. GetSize returns the Size field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.( PackageFile) String() string
PackageFile : expvar.Var
PackageFile : fmt.Stringer
PackageRegistry represents a GitHub package registry.AboutURL*stringName*stringType*stringURL*stringVendor*string GetAboutURL returns the AboutURL field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetVendor returns the Vendor field if it's non-nil, zero value otherwise.( PackageRegistry) String() string
PackageRegistry : expvar.Var
PackageRegistry : fmt.Stringer
func (*Package).GetRegistry() *PackageRegistry
PackageRelease represents a GitHub package version release.Author*UserCreatedAt*TimestampDraft*boolHTMLURL*stringID*int64Name*stringPrerelease*boolPublishedAt*TimestampTagName*stringTargetCommitish*stringURL*string GetAuthor returns the Author field. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDraft returns the Draft field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetPrerelease returns the Prerelease field if it's non-nil, zero value otherwise. GetPublishedAt returns the PublishedAt field if it's non-nil, zero value otherwise. GetTagName returns the TagName field if it's non-nil, zero value otherwise. GetTargetCommitish returns the TargetCommitish field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.( PackageRelease) String() string
PackageRelease : expvar.Var
PackageRelease : fmt.Stringer
func (*PackageVersion).GetRelease() *PackageRelease
Page represents a single Wiki page.Action*stringHTMLURL*stringPageName*stringSHA*stringSummary*stringTitle*string GetAction returns the Action field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetPageName returns the PageName field if it's non-nil, zero value otherwise. GetSHA returns the SHA field if it's non-nil, zero value otherwise. GetSummary returns the Summary field if it's non-nil, zero value otherwise. GetTitle returns the Title field if it's non-nil, zero value otherwise.
PageBuildEvent represents an attempted build of a GitHub Pages site, whether
successful or not.
The Webhook event name is "page_build".
This event is triggered on push to a GitHub Pages enabled branch (gh-pages
for project pages, master for user and organization pages).
Events of this type are not visible in timelines, they are only used to trigger hooks.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#page_buildBuild*PagesBuild The following fields are only populated by Webhook events.Installation*Installation The following field is only present when the webhook is triggered on
a repository belonging to an organization.Repo*RepositorySender*User GetBuild returns the Build field. GetID returns the ID field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field.
PagesDomain represents a domain associated with a GitHub Pages site.CAAError*stringDNSResolves*boolEnforcesHTTPS*boolHTTPSError*stringHasCNAMERecord*boolHasMXRecordsPresent*boolHost*stringIsARecord*boolIsApexDomain*boolIsCNAMEToFastly*boolIsCNAMEToGithubUserDomain*boolIsCNAMEToPagesDotGithubDotCom*boolIsCloudflareIP*boolIsFastlyIP*boolIsHTTPSEligible*boolIsNonGithubPagesIPPresent*boolIsOldIPAddress*boolIsPagesDomain*boolIsPointedToGithubPagesIP*boolIsProxied*boolIsServedByPages*boolIsValid*boolIsValidDomain*boolNameservers*stringReason*stringRespondsToHTTPS*boolShouldBeARecord*boolURI*string GetCAAError returns the CAAError field if it's non-nil, zero value otherwise. GetDNSResolves returns the DNSResolves field if it's non-nil, zero value otherwise. GetEnforcesHTTPS returns the EnforcesHTTPS field if it's non-nil, zero value otherwise. GetHTTPSError returns the HTTPSError field if it's non-nil, zero value otherwise. GetHasCNAMERecord returns the HasCNAMERecord field if it's non-nil, zero value otherwise. GetHasMXRecordsPresent returns the HasMXRecordsPresent field if it's non-nil, zero value otherwise. GetHost returns the Host field if it's non-nil, zero value otherwise. GetIsARecord returns the IsARecord field if it's non-nil, zero value otherwise. GetIsApexDomain returns the IsApexDomain field if it's non-nil, zero value otherwise. GetIsCNAMEToFastly returns the IsCNAMEToFastly field if it's non-nil, zero value otherwise. GetIsCNAMEToGithubUserDomain returns the IsCNAMEToGithubUserDomain field if it's non-nil, zero value otherwise. GetIsCNAMEToPagesDotGithubDotCom returns the IsCNAMEToPagesDotGithubDotCom field if it's non-nil, zero value otherwise. GetIsCloudflareIP returns the IsCloudflareIP field if it's non-nil, zero value otherwise. GetIsFastlyIP returns the IsFastlyIP field if it's non-nil, zero value otherwise. GetIsHTTPSEligible returns the IsHTTPSEligible field if it's non-nil, zero value otherwise. GetIsNonGithubPagesIPPresent returns the IsNonGithubPagesIPPresent field if it's non-nil, zero value otherwise. GetIsOldIPAddress returns the IsOldIPAddress field if it's non-nil, zero value otherwise. GetIsPagesDomain returns the IsPagesDomain field if it's non-nil, zero value otherwise. GetIsPointedToGithubPagesIP returns the IsPointedToGithubPagesIP field if it's non-nil, zero value otherwise. GetIsProxied returns the IsProxied field if it's non-nil, zero value otherwise. GetIsServedByPages returns the IsServedByPages field if it's non-nil, zero value otherwise. GetIsValid returns the IsValid field if it's non-nil, zero value otherwise. GetIsValidDomain returns the IsValidDomain field if it's non-nil, zero value otherwise. GetNameservers returns the Nameservers field if it's non-nil, zero value otherwise. GetReason returns the Reason field if it's non-nil, zero value otherwise. GetRespondsToHTTPS returns the RespondsToHTTPS field if it's non-nil, zero value otherwise. GetShouldBeARecord returns the ShouldBeARecord field if it's non-nil, zero value otherwise. GetURI returns the URI field if it's non-nil, zero value otherwise.
func (*PagesHealthCheckResponse).GetAltDomain() *PagesDomain
func (*PagesHealthCheckResponse).GetDomain() *PagesDomain
PagesError represents a build error for a GitHub Pages site.Message*string GetMessage returns the Message field if it's non-nil, zero value otherwise.
func (*PagesBuild).GetError() *PagesError
PagesHTTPSCertificate represents the HTTPS Certificate information for a GitHub Pages site.Description*stringDomains[]string GitHub's API doesn't return a standard Timestamp, rather it returns a YYYY-MM-DD string.State*string GetDescription returns the Description field if it's non-nil, zero value otherwise. GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise.
func (*Pages).GetHTTPSCertificate() *PagesHTTPSCertificate
PagesSource represents a GitHub page's source.Branch*stringPath*string GetBranch returns the Branch field if it's non-nil, zero value otherwise. GetPath returns the Path field if it's non-nil, zero value otherwise.
func (*Pages).GetSource() *PagesSource
func (*PagesUpdate).GetSource() *PagesSource
PageStats represents the total number of github pages.TotalPages*int GetTotalPages returns the TotalPages field if it's non-nil, zero value otherwise.( PageStats) String() string
PageStats : expvar.Var
PageStats : fmt.Stringer
func (*AdminStats).GetPages() *PageStats
PagesUpdate sets up parameters needed to update a GitHub Pages site. BuildType is optional and can either be "legacy" or "workflow".
"workflow" - You are using a github workflow to build your pages.
"legacy" - You are deploying from a branch. CNAME represents a custom domain for the repository.
Leaving CNAME empty will remove the custom domain. HTTPSEnforced specifies whether HTTPS should be enforced for the repository. Public configures access controls for the site.
If "true", the site will be accessible to anyone on the internet. If "false",
the site will be accessible to anyone with read access to the repository that
published the site. Source must include the branch name, and may optionally specify the subdirectory "/docs".
Possible values for Source.Branch are usually "gh-pages", "main", and "master",
or any other existing branch name.
Possible values for Source.Path are: "/", and "/docs". GetBuildType returns the BuildType field if it's non-nil, zero value otherwise. GetCNAME returns the CNAME field if it's non-nil, zero value otherwise. GetHTTPSEnforced returns the HTTPSEnforced field if it's non-nil, zero value otherwise. GetPublic returns the Public field if it's non-nil, zero value otherwise. GetSource returns the Source field.
func (*RepositoriesService).UpdatePages(ctx context.Context, owner, repo string, opts *PagesUpdate) (*Response, error)
PendingDeploymentEnvironment represents pending deployment environment properties.HTMLURL*stringID*int64Name*stringNodeID*stringURL*string GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.
func (*PendingDeployment).GetEnvironment() *PendingDeploymentEnvironment
PersonalAccessToken represents the minimal representation of an organization programmatic access grant.
GitHub API docs: https://docs.github.com/en/rest/orgs/personal-access-tokens?apiVersion=2022-11-28 Date and time when the fine-grained personal access token was approved to access the organization. "Unique identifier of the fine-grained personal access token.
The `pat_id` used to get details about an approved fine-grained personal access token. Owner is the GitHub user associated with the token. Permissions are the permissions requested, categorized by type. URL to the list of repositories the fine-grained personal access token can access.
Only follow when `repository_selection` is `subset`. RepositorySelection is the type of repository selection requested.
Possible values are: "none", "all", "subset". Whether the associated fine-grained personal access token has expired. Date and time when the associated fine-grained personal access token expires. Date and time when the associated fine-grained personal access token was last used for authentication. GetAccessGrantedAt returns the AccessGrantedAt field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetOwner returns the Owner field. GetPermissions returns the Permissions field. GetRepositoriesURL returns the RepositoriesURL field if it's non-nil, zero value otherwise. GetRepositorySelection returns the RepositorySelection field if it's non-nil, zero value otherwise. GetTokenExpired returns the TokenExpired field if it's non-nil, zero value otherwise. GetTokenExpiresAt returns the TokenExpiresAt field if it's non-nil, zero value otherwise. GetTokenLastUsedAt returns the TokenLastUsedAt field if it's non-nil, zero value otherwise.
func (*OrganizationsService).ListFineGrainedPersonalAccessTokens(ctx context.Context, org string, opts *ListFineGrainedPATOptions) ([]*PersonalAccessToken, *Response, error)
PersonalAccessTokenRequest contains the details of a PersonalAccessTokenRequestEvent. Date and time when the request for access was created. Unique identifier of the request for access via fine-grained personal
access token. Used as the pat_request_id parameter in the list and review
API calls. The following field is only present when the webhook is triggered on
a repository belonging to an organization.Owner*User New requested permissions, categorized by type of permission. Permissions requested, categorized by type of permission.
This field incorporates permissions_added and permissions_upgraded. Requested permissions that elevate access for a previously approved
request for access, categorized by type of permission. An array of repository objects the token is requesting access to.
This field is only populated when repository_selection is subset. The number of repositories the token is requesting access to.
This field is only populated when repository_selection is subset. Type of repository selection requested. Possible values are:
"none", "all" or "subset" Whether the associated fine-grained personal access token has expired. Date and time when the associated fine-grained personal access token expires. Date and time when the associated fine-grained personal access token was last used for authentication. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetOrg returns the Org field. GetOwner returns the Owner field. GetPermissionsAdded returns the PermissionsAdded field. GetPermissionsResult returns the PermissionsResult field. GetPermissionsUpgraded returns the PermissionsUpgraded field. GetRepositoryCount returns the RepositoryCount field if it's non-nil, zero value otherwise. GetRepositorySelection returns the RepositorySelection field if it's non-nil, zero value otherwise. GetTokenExpired returns the TokenExpired field if it's non-nil, zero value otherwise. GetTokenExpiresAt returns the TokenExpiresAt field if it's non-nil, zero value otherwise. GetTokenLastUsedAt returns the TokenLastUsedAt field if it's non-nil, zero value otherwise.
func (*PersonalAccessTokenRequestEvent).GetPersonalAccessTokenRequest() *PersonalAccessTokenRequest
PersonalAccessTokenRequestEvent occurs when there is activity relating to a
request for a fine-grained personal access token to access resources that
belong to a resource owner that requires approval for token access.
The webhook event name is "personal_access_token_request".
GitHub API docs: https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#personal_access_token_request Action is the action that was performed. Possible values are:
"approved", "cancelled", "created" or "denied"Installation*InstallationOrg*OrganizationPersonalAccessTokenRequest*PersonalAccessTokenRequestSender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetOrg returns the Org field. GetPersonalAccessTokenRequest returns the PersonalAccessTokenRequest field. GetSender returns the Sender field.
PingEvent is triggered when a Webhook is added to GitHub.
GitHub API docs: https://developer.github.com/webhooks/#ping-event The webhook configuration. The ID of the webhook that triggered the ping.Installation*InstallationOrg*Organization The following fields are only populated by Webhook events.Sender*User Random string of GitHub zen. GetHook returns the Hook field. GetHookID returns the HookID field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field. GetZen returns the Zen field if it's non-nil, zero value otherwise.
Plan represents the payment plan for an account. See plans at https://github.com/plans.Collaborators*intFilledSeats*intName*stringPrivateRepos*int64Seats*intSpace*int GetCollaborators returns the Collaborators field if it's non-nil, zero value otherwise. GetFilledSeats returns the FilledSeats field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetPrivateRepos returns the PrivateRepos field if it's non-nil, zero value otherwise. GetSeats returns the Seats field if it's non-nil, zero value otherwise. GetSpace returns the Space field if it's non-nil, zero value otherwise.( Plan) String() string
Plan : expvar.Var
Plan : fmt.Stringer
func (*Organization).GetPlan() *Plan
func (*User).GetPlan() *Plan
PreferenceList represents a list of auto trigger checks for repository // A slice of auto trigger checks that can be set for a check suite in a repository.
func (*CheckSuitePreferenceResults).GetPreferences() *PreferenceList
PRLinks represents the "_links" object in a GitHub pull request.Comments*PRLinkCommits*PRLinkHTML*PRLinkIssue*PRLinkReviewComment*PRLinkReviewComments*PRLinkSelf*PRLinkStatuses*PRLink GetComments returns the Comments field. GetCommits returns the Commits field. GetHTML returns the HTML field. GetIssue returns the Issue field. GetReviewComment returns the ReviewComment field. GetReviewComments returns the ReviewComments field. GetSelf returns the Self field. GetStatuses returns the Statuses field.
func (*PullRequest).GetLinks() *PRLinks
ProjectBody represents a project body change.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*ProjectChange).GetBody() *ProjectBody
ProjectCardChange represents the changes when a project card has been edited.Note*ProjectCardNote GetNote returns the Note field.
func (*ProjectCardEvent).GetChanges() *ProjectCardChange
ProjectCardListOptions specifies the optional parameters to the
ProjectsService.ListProjectCards method. ArchivedState is used to list all, archived, or not_archived project cards.
Defaults to not_archived when you omit this parameter.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. GetArchivedState returns the ArchivedState field if it's non-nil, zero value otherwise.
func (*ProjectsService).ListProjectCards(ctx context.Context, columnID int64, opts *ProjectCardListOptions) ([]*ProjectCard, *Response, error)
ProjectCardMoveOptions specifies the parameters to the
ProjectsService.MoveProjectCard method. ColumnID is the ID of a column in the same project. Note that ColumnID
is required when using Position "after:<card-id>" when that card is in
another column; otherwise it is optional. Position can be one of "top", "bottom", or "after:<card-id>", where
<card-id> is the ID of a card in the same project.
func (*ProjectsService).MoveProjectCard(ctx context.Context, cardID int64, opts *ProjectCardMoveOptions) (*Response, error)
ProjectCardNote represents a change of a note of a project card.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*ProjectCardChange).GetNote() *ProjectCardNote
ProjectCardOptions specifies the parameters to the
ProjectsService.CreateProjectCard and
ProjectsService.UpdateProjectCard methods. Use true to archive a project card.
Specify false if you need to restore a previously archived project card. The ID (not Number) of the Issue to associate with this card.
Note and ContentID are mutually exclusive. The type of content to associate with this card. Possible values are: "Issue" and "PullRequest". The note of the card. Note and ContentID are mutually exclusive. GetArchived returns the Archived field if it's non-nil, zero value otherwise.
func (*ProjectsService).CreateProjectCard(ctx context.Context, columnID int64, opts *ProjectCardOptions) (*ProjectCard, *Response, error)
func (*ProjectsService).UpdateProjectCard(ctx context.Context, cardID int64, opts *ProjectCardOptions) (*ProjectCard, *Response, error)
ProjectChange represents the changes when a project has been edited.Body*ProjectBodyName*ProjectName GetBody returns the Body field. GetName returns the Name field.
func (*ProjectEvent).GetChanges() *ProjectChange
ProjectCollaboratorOptions specifies the optional parameters to the
ProjectsService.AddProjectCollaborator method. Permission specifies the permission to grant to the collaborator.
Possible values are:
"read" - can read, but not write to or administer this project.
"write" - can read and write, but not administer this project.
"admin" - can read, write and administer this project.
Default value is "write" GetPermission returns the Permission field if it's non-nil, zero value otherwise.
func (*ProjectsService).AddProjectCollaborator(ctx context.Context, id int64, username string, opts *ProjectCollaboratorOptions) (*Response, error)
ProjectColumnChange represents the changes when a project column has been edited.Name*ProjectColumnName GetName returns the Name field.
func (*ProjectColumnEvent).GetChanges() *ProjectColumnChange
ProjectColumnMoveOptions specifies the parameters to the
ProjectsService.MoveProjectColumn method. Position can be one of "first", "last", or "after:<column-id>", where
<column-id> is the ID of a column in the same project. (Required.)
func (*ProjectsService).MoveProjectColumn(ctx context.Context, columnID int64, opts *ProjectColumnMoveOptions) (*Response, error)
ProjectColumnName represents a project column name change.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*ProjectColumnChange).GetName() *ProjectColumnName
ProjectName represents a project name change.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*ProjectChange).GetName() *ProjectName
ProjectOptions specifies the parameters to the
RepositoriesService.CreateProject and
ProjectsService.UpdateProject methods. The body of the project. (Optional.) The name of the project. (Required for creation; optional for update.) The permission level that all members of the project's organization
will have on this project.
Setting the organization permission is only available
for organization projects. (Optional.) Sets visibility of the project within the organization.
Setting visibility is only available
for organization projects.(Optional.) State of the project. Either "open" or "closed". (Optional.) GetBody returns the Body field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetOrganizationPermission returns the OrganizationPermission field if it's non-nil, zero value otherwise. GetPrivate returns the Private field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise.
func (*OrganizationsService).CreateProject(ctx context.Context, org string, opts *ProjectOptions) (*Project, *Response, error)
func (*ProjectsService).UpdateProject(ctx context.Context, id int64, opts *ProjectOptions) (*Project, *Response, error)
func (*RepositoriesService).CreateProject(ctx context.Context, owner, repo string, opts *ProjectOptions) (*Project, *Response, error)
ProjectPermissionLevel represents the permission level an organization
member has for a given project. Possible values: "admin", "write", "read", "none"User*User GetPermission returns the Permission field if it's non-nil, zero value otherwise. GetUser returns the User field.
func (*ProjectsService).ReviewProjectCollaboratorPermission(ctx context.Context, id int64, username string) (*ProjectPermissionLevel, *Response, error)
ProjectsV2 represents a projects v2 project.ClosedAt*TimestampCreatedAt*TimestampCreator*UserDeletedAt*TimestampDeletedBy*UserDescription*stringID*int64NodeID*stringNumber*intOwner*UserPublic*boolShortDescription*stringTitle*stringUpdatedAt*Timestamp GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetCreator returns the Creator field. GetDeletedAt returns the DeletedAt field if it's non-nil, zero value otherwise. GetDeletedBy returns the DeletedBy field. GetDescription returns the Description field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetNumber returns the Number field if it's non-nil, zero value otherwise. GetOwner returns the Owner field. GetPublic returns the Public field if it's non-nil, zero value otherwise. GetShortDescription returns the ShortDescription field if it's non-nil, zero value otherwise. GetTitle returns the Title field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
func (*ProjectV2Event).GetProjectsV2() *ProjectsV2
ProjectV2Item represents an item belonging to a project.ArchivedAt*TimestampContentNodeID*stringContentType*stringCreatedAt*TimestampCreator*UserID*int64NodeID*stringProjectNodeID*stringUpdatedAt*Timestamp GetArchivedAt returns the ArchivedAt field if it's non-nil, zero value otherwise. GetContentNodeID returns the ContentNodeID field if it's non-nil, zero value otherwise. GetContentType returns the ContentType field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetCreator returns the Creator field. GetID returns the ID field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetProjectNodeID returns the ProjectNodeID field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
func (*ProjectV2ItemEvent).GetProjectV2Item() *ProjectV2Item
ProtectionRequest represents a request to create/edit a branch's protection. Allows deletion of the protected branch by anyone with write access to the repository. Permits force pushes to the protected branch by anyone with write access to the repository. AllowForkSyncing, if set to true, will allow users to pull changes from upstream
when the branch is locked. BlockCreations, if set to true, will cause the restrictions setting to also block pushes
which create new branches, unless initiated by a user, team, app with the ability to push.EnforceAdminsbool LockBranch, if set to true, will prevent users from pushing to the branch. Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. RequiredConversationResolution, if set to true, requires all comments
on the pull request to be resolved before it can be merged to a protected branch.RequiredPullRequestReviews*PullRequestReviewsEnforcementRequestRequiredStatusChecks*RequiredStatusChecksRestrictions*BranchRestrictionsRequest GetAllowDeletions returns the AllowDeletions field if it's non-nil, zero value otherwise. GetAllowForcePushes returns the AllowForcePushes field if it's non-nil, zero value otherwise. GetAllowForkSyncing returns the AllowForkSyncing field if it's non-nil, zero value otherwise. GetBlockCreations returns the BlockCreations field if it's non-nil, zero value otherwise. GetLockBranch returns the LockBranch field if it's non-nil, zero value otherwise. GetRequireLinearHistory returns the RequireLinearHistory field if it's non-nil, zero value otherwise. GetRequiredConversationResolution returns the RequiredConversationResolution field if it's non-nil, zero value otherwise. GetRequiredPullRequestReviews returns the RequiredPullRequestReviews field. GetRequiredStatusChecks returns the RequiredStatusChecks field. GetRestrictions returns the Restrictions field.
func (*RepositoriesService).UpdateBranchProtection(ctx context.Context, owner, repo, branch string, preq *ProtectionRequest) (*Protection, *Response, error)
ProtectionRule represents a single protection rule applied to the environment.ID*int64NodeID*stringPreventSelfReview*boolReviewers[]*RequiredReviewerType*stringWaitTimer*int GetID returns the ID field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetPreventSelfReview returns the PreventSelfReview field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise. GetWaitTimer returns the WaitTimer field if it's non-nil, zero value otherwise.
PublicEvent is triggered when a private repository is open sourced.
According to GitHub: "Without a doubt: the best GitHub event."
The Webhook event name is "public".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#publicInstallation*Installation The following field is only present when the webhook is triggered on
a repository belonging to an organization. The following fields are only populated by Webhook events.Sender*User GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field.
PullRequestAutoMerge represents the "auto_merge" response for a PullRequest.CommitMessage*stringCommitTitle*stringEnabledBy*UserMergeMethod*string GetCommitMessage returns the CommitMessage field if it's non-nil, zero value otherwise. GetCommitTitle returns the CommitTitle field if it's non-nil, zero value otherwise. GetEnabledBy returns the EnabledBy field. GetMergeMethod returns the MergeMethod field if it's non-nil, zero value otherwise.
func (*PullRequest).GetAutoMerge() *PullRequestAutoMerge
PullRequestBranch represents a base or head branch in a GitHub pull request.Label*stringRef*stringRepo*RepositorySHA*stringUser*User GetLabel returns the Label field if it's non-nil, zero value otherwise. GetRef returns the Ref field if it's non-nil, zero value otherwise. GetRepo returns the Repo field. GetSHA returns the SHA field if it's non-nil, zero value otherwise. GetUser returns the User field.
func (*PullRequest).GetBase() *PullRequestBranch
func (*PullRequest).GetHead() *PullRequestBranch
PullRequestBranchUpdateOptions specifies the optional parameters to the
PullRequestsService.UpdateBranch method. ExpectedHeadSHA specifies the most recent commit on the pull request's branch.
Default value is the SHA of the pull request's current HEAD ref. GetExpectedHeadSHA returns the ExpectedHeadSHA field if it's non-nil, zero value otherwise.
func (*PullRequestsService).UpdateBranch(ctx context.Context, owner, repo string, number int, opts *PullRequestBranchUpdateOptions) (*PullRequestBranchUpdateResponse, *Response, error)
PullRequestEvent is triggered when a pull request is assigned, unassigned, labeled,
unlabeled, opened, edited, closed, reopened, synchronize, ready_for_review,
locked, unlocked, a pull request review is requested, or a review request is removed.
The Webhook event name is "pull_request".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/github-event-types#pullrequestevent Action is the action that was performed. Possible values are:
"assigned", "unassigned", "review_requested", "review_request_removed", "labeled", "unlabeled",
"opened", "edited", "closed", "ready_for_review", "locked", "unlocked", or "reopened".
If the action is "closed" and the "merged" key is "false", the pull request was closed with unmerged commits.
If the action is "closed" and the "merged" key is "true", the pull request was merged.
While webhooks are also triggered when a pull request is synchronized, Events API timelines
don't include pull request events with the "synchronize" action.After*stringAssignee*User The following fields are only populated when the Action is "synchronize". The following fields are only populated by Webhook events.Installation*Installation // Populated in "labeled" event deliveries.Number*int The following field is only present when the webhook is triggered on
a repository belonging to an organization. The following will be populated if the event was performed by an AppPullRequest*PullRequestRepo*Repository RequestedReviewer is populated in "review_requested", "review_request_removed" event deliveries.
A request affecting multiple reviewers at once is split into multiple
such event deliveries, each with a single, different RequestedReviewer. In the event that a team is requested instead of a user, "requested_team" gets sent in place of
"requested_user" with the same delivery behavior.Sender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetAfter returns the After field if it's non-nil, zero value otherwise. GetAssignee returns the Assignee field. GetBefore returns the Before field if it's non-nil, zero value otherwise. GetChanges returns the Changes field. GetInstallation returns the Installation field. GetLabel returns the Label field. GetNumber returns the Number field if it's non-nil, zero value otherwise. GetOrganization returns the Organization field. GetPerformedViaGithubApp returns the PerformedViaGithubApp field. GetPullRequest returns the PullRequest field. GetRepo returns the Repo field. GetRequestedReviewer returns the RequestedReviewer field. GetRequestedTeam returns the RequestedTeam field. GetSender returns the Sender field.
PullRequestLinks object is added to the Issue object when it's an issue included
in the IssueCommentEvent webhook payload, if the webhook is fired by a comment on a PR.DiffURL*stringHTMLURL*stringMergedAt*TimestampPatchURL*stringURL*string GetDiffURL returns the DiffURL field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetMergedAt returns the MergedAt field if it's non-nil, zero value otherwise. GetPatchURL returns the PatchURL field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.
func (*Issue).GetPullRequestLinks() *PullRequestLinks
PullRequestListCommentsOptions specifies the optional parameters to the
PullRequestsService.ListComments method. Direction in which to sort comments. Possible values are: asc, desc.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Since filters comments by time. Sort specifies how to sort comments. Possible values are: created, updated.
func (*PullRequestsService).ListComments(ctx context.Context, owner, repo string, number int, opts *PullRequestListCommentsOptions) ([]*PullRequestComment, *Response, error)
PullRequestListOptions specifies the optional parameters to the
PullRequestsService.List method. Base filters pull requests by base branch name. Direction in which to sort pull requests. Possible values are: asc, desc.
If Sort is "created" or not specified, Default is "desc", otherwise Default
is "asc" Head filters pull requests by head user and branch name in the format of:
"user:ref-name".ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Sort specifies how to sort pull requests. Possible values are: created,
updated, popularity, long-running. Default is "created". State filters pull requests based on their state. Possible values are:
open, closed, all. Default is "open".
func (*PullRequestsService).List(ctx context.Context, owner string, repo string, opts *PullRequestListOptions) ([]*PullRequest, *Response, error)
PullRequestMergeResult represents the result of merging a pull request.Merged*boolMessage*stringSHA*string GetMerged returns the Merged field if it's non-nil, zero value otherwise. GetMessage returns the Message field if it's non-nil, zero value otherwise. GetSHA returns the SHA field if it's non-nil, zero value otherwise.
func (*PullRequestsService).Merge(ctx context.Context, owner string, repo string, number int, commitMessage string, options *PullRequestOptions) (*PullRequestMergeResult, *Response, error)
PullRequestOptions lets you define how a pull request will be merged. // Title for the automatic commit message. (Optional.) If false, an empty string commit message will use the default commit message. If true, an empty string commit message will be used. The merge method to use. Possible values include: "merge", "squash", and "rebase" with the default being merge. (Optional.) // SHA that pull request head must match to allow merge. (Optional.)
func (*PullRequestsService).Merge(ctx context.Context, owner string, repo string, number int, commitMessage string, options *PullRequestOptions) (*PullRequestMergeResult, *Response, error)
PullRequestReviewCommentEvent is triggered when a comment is created on a
portion of the unified diff of a pull request.
The Webhook event name is "pull_request_review_comment".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#pull_request_review_comment Action is the action that was performed on the comment.
Possible values are: "created", "edited", "deleted". The following fields are only populated by Webhook events.Comment*PullRequestCommentInstallation*Installation The following field is only present when the webhook is triggered on
a repository belonging to an organization.PullRequest*PullRequestRepo*RepositorySender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetChanges returns the Changes field. GetComment returns the Comment field. GetInstallation returns the Installation field. GetOrg returns the Org field. GetPullRequest returns the PullRequest field. GetRepo returns the Repo field. GetSender returns the Sender field.
PullRequestReviewDismissalRequest represents a request to dismiss a review.Message*string GetMessage returns the Message field if it's non-nil, zero value otherwise.( PullRequestReviewDismissalRequest) String() string
PullRequestReviewDismissalRequest : expvar.Var
PullRequestReviewDismissalRequest : fmt.Stringer
func (*PullRequestsService).DismissReview(ctx context.Context, owner, repo string, number int, reviewID int64, review *PullRequestReviewDismissalRequest) (*PullRequestReview, *Response, error)
PullRequestReviewEvent is triggered when a review is submitted on a pull
request.
The Webhook event name is "pull_request_review".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#pull_request_review Action is always "submitted".Installation*Installation The following field is only present when the webhook is triggered on
a repository belonging to an organization.PullRequest*PullRequest The following fields are only populated by Webhook events.Review*PullRequestReviewSender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetOrganization returns the Organization field. GetPullRequest returns the PullRequest field. GetRepo returns the Repo field. GetReview returns the Review field. GetSender returns the Sender field.
PullRequestReviewsEnforcement represents the pull request reviews enforcement of a protected branch. Allow specific users, teams, or apps to bypass pull request requirements. Specifies if approved reviews are dismissed automatically, when a new commit is pushed. Specifies which users, teams and apps can dismiss pull request reviews. RequireCodeOwnerReviews specifies if an approved review is required in pull requests including files with a designated code owner. RequireLastPushApproval specifies whether the last pusher to a pull request branch can approve it. RequiredApprovingReviewCount specifies the number of approvals required before the pull request can be merged.
Valid values are 1-6. GetBypassPullRequestAllowances returns the BypassPullRequestAllowances field. GetDismissalRestrictions returns the DismissalRestrictions field.
func (*Protection).GetRequiredPullRequestReviews() *PullRequestReviewsEnforcement
func (*RepositoriesService).DisableDismissalRestrictions(ctx context.Context, owner, repo, branch string) (*PullRequestReviewsEnforcement, *Response, error)
func (*RepositoriesService).GetPullRequestReviewEnforcement(ctx context.Context, owner, repo, branch string) (*PullRequestReviewsEnforcement, *Response, error)
func (*RepositoriesService).UpdatePullRequestReviewEnforcement(ctx context.Context, owner, repo, branch string, patch *PullRequestReviewsEnforcementUpdate) (*PullRequestReviewsEnforcement, *Response, error)
PullRequestReviewsEnforcementLevelChanges represents the changes made to the PullRequestReviewsEnforcementLevel policy.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*ProtectionChanges).GetPullRequestReviewsEnforcementLevel() *PullRequestReviewsEnforcementLevelChanges
PullRequestReviewsEnforcementRequest represents request to set the pull request review
enforcement of a protected branch. It is separate from PullRequestReviewsEnforcement above
because the request structure is different from the response structure. Allow specific users, teams, or apps to bypass pull request requirements. Specifies if approved reviews can be dismissed automatically, when a new commit is pushed. (Required) Specifies which users, teams and apps should be allowed to dismiss pull request reviews.
User, team and app dismissal restrictions are only available for
organization-owned repositories. Must be nil for personal repositories. RequireCodeOwnerReviews specifies if an approved review is required in pull requests including files with a designated code owner. RequireLastPushApproval specifies whether the last pusher to a pull request branch can approve it. RequiredApprovingReviewCount specifies the number of approvals required before the pull request can be merged.
Valid values are 1-6. GetBypassPullRequestAllowancesRequest returns the BypassPullRequestAllowancesRequest field. GetDismissalRestrictionsRequest returns the DismissalRestrictionsRequest field. GetRequireLastPushApproval returns the RequireLastPushApproval field if it's non-nil, zero value otherwise.
func (*ProtectionRequest).GetRequiredPullRequestReviews() *PullRequestReviewsEnforcementRequest
PullRequestReviewsEnforcementUpdate represents request to patch the pull request review
enforcement of a protected branch. It is separate from PullRequestReviewsEnforcementRequest above
because the patch request does not require all fields to be initialized. Allow specific users, teams, or apps to bypass pull request requirements. Specifies if approved reviews can be dismissed automatically, when a new commit is pushed. Can be omitted. Specifies which users, teams and apps can dismiss pull request reviews. Can be omitted. RequireCodeOwnerReviews specifies if merging pull requests is blocked until code owners have reviewed. RequireLastPushApproval specifies whether the last pusher to a pull request branch can approve it. RequiredApprovingReviewCount specifies the number of approvals required before the pull request can be merged.
Valid values are 1 - 6 or 0 to not require reviewers. GetBypassPullRequestAllowancesRequest returns the BypassPullRequestAllowancesRequest field. GetDismissStaleReviews returns the DismissStaleReviews field if it's non-nil, zero value otherwise. GetDismissalRestrictionsRequest returns the DismissalRestrictionsRequest field. GetRequireCodeOwnerReviews returns the RequireCodeOwnerReviews field if it's non-nil, zero value otherwise. GetRequireLastPushApproval returns the RequireLastPushApproval field if it's non-nil, zero value otherwise.
func (*RepositoriesService).UpdatePullRequestReviewEnforcement(ctx context.Context, owner, repo, branch string, patch *PullRequestReviewsEnforcementUpdate) (*PullRequestReviewsEnforcement, *Response, error)
PullRequestReviewThreadEvent is triggered when a comment made as part of a
review of a pull request is marked resolved or unresolved.
The Webhook event name is "pull_request_review_thread".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#pull_request_review_thread Action is the action that was performed on the comment.
Possible values are: "resolved", "unresolved".Installation*Installation The following field is only present when the webhook is triggered on
a repository belonging to an organization.PullRequest*PullRequest The following fields are only populated by Webhook events.Sender*UserThread*PullRequestThread GetAction returns the Action field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetOrg returns the Org field. GetPullRequest returns the PullRequest field. GetRepo returns the Repo field. GetSender returns the Sender field. GetThread returns the Thread field.
PullRequestTargetEvent is triggered when a pull request is assigned, unassigned, labeled,
unlabeled, opened, edited, closed, reopened, synchronize, ready_for_review,
locked, unlocked, a pull request review is requested, or a review request is removed.
The Webhook event name is "pull_request_target".
GitHub API docs: https://docs.github.com/actions/events-that-trigger-workflows#pull_request_target Action is the action that was performed. Possible values are:
"assigned", "unassigned", "review_requested", "review_request_removed", "labeled", "unlabeled",
"opened", "edited", "closed", "ready_for_review", "locked", "unlocked", or "reopened".
If the action is "closed" and the "merged" key is "false", the pull request was closed with unmerged commits.
If the action is "closed" and the "merged" key is "true", the pull request was merged.
While webhooks are also triggered when a pull request is synchronized, Events API timelines
don't include pull request events with the "synchronize" action.After*stringAssignee*User The following fields are only populated when the Action is "synchronize". The following fields are only populated by Webhook events.Installation*Installation // Populated in "labeled" event deliveries.Number*int The following field is only present when the webhook is triggered on
a repository belonging to an organization. The following will be populated if the event was performed by an AppPullRequest*PullRequestRepo*Repository RequestedReviewer is populated in "review_requested", "review_request_removed" event deliveries.
A request affecting multiple reviewers at once is split into multiple
such event deliveries, each with a single, different RequestedReviewer. In the event that a team is requested instead of a user, "requested_team" gets sent in place of
"requested_user" with the same delivery behavior.Sender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetAfter returns the After field if it's non-nil, zero value otherwise. GetAssignee returns the Assignee field. GetBefore returns the Before field if it's non-nil, zero value otherwise. GetChanges returns the Changes field. GetInstallation returns the Installation field. GetLabel returns the Label field. GetNumber returns the Number field if it's non-nil, zero value otherwise. GetOrganization returns the Organization field. GetPerformedViaGithubApp returns the PerformedViaGithubApp field. GetPullRequest returns the PullRequest field. GetRepo returns the Repo field. GetRequestedReviewer returns the RequestedReviewer field. GetRequestedTeam returns the RequestedTeam field. GetSender returns the Sender field.
PullRequestThread represents a thread of comments on a pull request.Comments[]*PullRequestCommentID*int64NodeID*string GetID returns the ID field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise.( PullRequestThread) String() string
PullRequestThread : expvar.Var
PullRequestThread : fmt.Stringer
func (*PullRequestReviewThreadEvent).GetThread() *PullRequestThread
PullStats represents the number of total, merged, mergable and unmergeable
pull-requests.MergablePulls*intMergedPulls*intTotalPulls*intUnmergablePulls*int GetMergablePulls returns the MergablePulls field if it's non-nil, zero value otherwise. GetMergedPulls returns the MergedPulls field if it's non-nil, zero value otherwise. GetTotalPulls returns the TotalPulls field if it's non-nil, zero value otherwise. GetUnmergablePulls returns the UnmergablePulls field if it's non-nil, zero value otherwise.( PullStats) String() string
PullStats : expvar.Var
PullStats : fmt.Stringer
func (*AdminStats).GetPulls() *PullStats
PunchCard represents the number of commits made during a given hour of a
day of the week. // Number of commits. // Day of the week (0-6: =Sunday - Saturday). // Hour of day (0-23). GetCommits returns the Commits field if it's non-nil, zero value otherwise. GetDay returns the Day field if it's non-nil, zero value otherwise. GetHour returns the Hour field if it's non-nil, zero value otherwise.
func (*RepositoriesService).ListPunchCard(ctx context.Context, owner, repo string) ([]*PunchCard, *Response, error)
PushEvent represents a git push to a GitHub repository.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#push The following fields are only populated by Webhook events.After*stringBaseRef*stringBefore*stringCommits[]*HeadCommitCompare*stringCreated*boolDeleted*boolDistinctSize*intForced*boolHead*stringHeadCommit*HeadCommitInstallation*Installation The following field is only present when the webhook is triggered on
a repository belonging to an organization.PushID*int64Pusher*CommitAuthorRef*stringRepo*PushEventRepositorySender*UserSize*int GetAction returns the Action field if it's non-nil, zero value otherwise. GetAfter returns the After field if it's non-nil, zero value otherwise. GetBaseRef returns the BaseRef field if it's non-nil, zero value otherwise. GetBefore returns the Before field if it's non-nil, zero value otherwise. GetCommits returns the Commits slice if it's non-nil, nil otherwise. GetCompare returns the Compare field if it's non-nil, zero value otherwise. GetCreated returns the Created field if it's non-nil, zero value otherwise. GetDeleted returns the Deleted field if it's non-nil, zero value otherwise. GetDistinctSize returns the DistinctSize field if it's non-nil, zero value otherwise. GetForced returns the Forced field if it's non-nil, zero value otherwise. GetHead returns the Head field if it's non-nil, zero value otherwise. GetHeadCommit returns the HeadCommit field. GetInstallation returns the Installation field. GetOrganization returns the Organization field. GetPushID returns the PushID field if it's non-nil, zero value otherwise. GetPusher returns the Pusher field. GetRef returns the Ref field if it's non-nil, zero value otherwise. GetRepo returns the Repo field. GetSender returns the Sender field. GetSize returns the Size field if it's non-nil, zero value otherwise.( PushEvent) String() string
PushEvent : expvar.Var
PushEvent : fmt.Stringer
PushEventRepoOwner is a basic representation of user/org in a PushEvent payload.Email*stringName*string GetEmail returns the Email field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise.
PushEventRepository represents the repo object in a PushEvent payload.ArchiveURL*stringArchived*boolCloneURL*stringCreatedAt*TimestampCustomPropertiesmap[string]interface{}DefaultBranch*stringDescription*stringDisabled*boolFork*boolForksCount*intFullName*stringGitURL*stringHTMLURL*stringHasDownloads*boolHasIssues*boolHasPages*boolHasWiki*boolHomepage*stringID*int64Language*stringMasterBranch*stringName*stringNodeID*stringOpenIssuesCount*intOrganization*stringOwner*UserPrivate*boolPullsURL*stringPushedAt*TimestampSSHURL*stringSVNURL*stringSize*intStargazersCount*intStatusesURL*stringTopics[]stringURL*stringUpdatedAt*TimestampWatchersCount*int GetArchiveURL returns the ArchiveURL field if it's non-nil, zero value otherwise. GetArchived returns the Archived field if it's non-nil, zero value otherwise. GetCloneURL returns the CloneURL field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDefaultBranch returns the DefaultBranch field if it's non-nil, zero value otherwise. GetDescription returns the Description field if it's non-nil, zero value otherwise. GetDisabled returns the Disabled field if it's non-nil, zero value otherwise. GetFork returns the Fork field if it's non-nil, zero value otherwise. GetForksCount returns the ForksCount field if it's non-nil, zero value otherwise. GetFullName returns the FullName field if it's non-nil, zero value otherwise. GetGitURL returns the GitURL field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetHasDownloads returns the HasDownloads field if it's non-nil, zero value otherwise. GetHasIssues returns the HasIssues field if it's non-nil, zero value otherwise. GetHasPages returns the HasPages field if it's non-nil, zero value otherwise. GetHasWiki returns the HasWiki field if it's non-nil, zero value otherwise. GetHomepage returns the Homepage field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetLanguage returns the Language field if it's non-nil, zero value otherwise. GetMasterBranch returns the MasterBranch field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetOpenIssuesCount returns the OpenIssuesCount field if it's non-nil, zero value otherwise. GetOrganization returns the Organization field if it's non-nil, zero value otherwise. GetOwner returns the Owner field. GetPrivate returns the Private field if it's non-nil, zero value otherwise. GetPullsURL returns the PullsURL field if it's non-nil, zero value otherwise. GetPushedAt returns the PushedAt field if it's non-nil, zero value otherwise. GetSSHURL returns the SSHURL field if it's non-nil, zero value otherwise. GetSVNURL returns the SVNURL field if it's non-nil, zero value otherwise. GetSize returns the Size field if it's non-nil, zero value otherwise. GetStargazersCount returns the StargazersCount field if it's non-nil, zero value otherwise. GetStatusesURL returns the StatusesURL field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. GetWatchersCount returns the WatchersCount field if it's non-nil, zero value otherwise.
func (*PushEvent).GetRepo() *PushEventRepository
RateLimitError occurs when GitHub returns 403 Forbidden response with a rate limit
remaining value of 0. // error message // Rate specifies last known rate limit for the client // HTTP response that caused this error(*RateLimitError) Error() string Is returns whether the provided error equals this error.
*RateLimitError : error
Reactions represents a summary of GitHub reactions.Confused*intEyes*intHeart*intHooray*intLaugh*intMinusOne*intPlusOne*intRocket*intTotalCount*intURL*string GetConfused returns the Confused field if it's non-nil, zero value otherwise. GetEyes returns the Eyes field if it's non-nil, zero value otherwise. GetHeart returns the Heart field if it's non-nil, zero value otherwise. GetHooray returns the Hooray field if it's non-nil, zero value otherwise. GetLaugh returns the Laugh field if it's non-nil, zero value otherwise. GetMinusOne returns the MinusOne field if it's non-nil, zero value otherwise. GetPlusOne returns the PlusOne field if it's non-nil, zero value otherwise. GetRocket returns the Rocket field if it's non-nil, zero value otherwise. GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.
func (*CommentDiscussion).GetReactions() *Reactions
func (*DiscussionComment).GetReactions() *Reactions
func (*Issue).GetReactions() *Reactions
func (*IssueComment).GetReactions() *Reactions
func (*PullRequestComment).GetReactions() *Reactions
func (*RepositoryComment).GetReactions() *Reactions
func (*TeamDiscussion).GetReactions() *Reactions
Path*stringRef*stringSHA*string GetPath returns the Path field if it's non-nil, zero value otherwise. GetRef returns the Ref field if it's non-nil, zero value otherwise. GetSHA returns the SHA field if it's non-nil, zero value otherwise.
ReleaseEvent is triggered when a release is published, unpublished, created,
edited, deleted, or prereleased.
The Webhook event name is "release".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#release Action is the action that was performed. Possible values are: "published", "unpublished",
"created", "edited", "deleted", or "prereleased".Installation*Installation The following field is only present when the webhook is triggered on
a repository belonging to an organization.Release*RepositoryRelease The following fields are only populated by Webhook events.Sender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetOrg returns the Org field. GetRelease returns the Release field. GetRepo returns the Repo field. GetSender returns the Sender field.
Rename contains details for 'renamed' events.From*stringTo*string GetFrom returns the From field if it's non-nil, zero value otherwise. GetTo returns the To field if it's non-nil, zero value otherwise.( Rename) String() string
Rename : expvar.Var
Rename : fmt.Stringer
func (*IssueEvent).GetRename() *Rename
func (*Timeline).GetRename() *Rename
RepoAdvisoryCredit represents the credit object for a repository Security Advisory.Login*stringType*string GetLogin returns the Login field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise.
RepoAdvisoryCreditDetailed represents a credit given to a user for a repository Security Advisory.State*stringType*stringUser*User GetState returns the State field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise. GetUser returns the User field.
RepoDependencies represents the dependencies of a repo.DownloadLocation*stringFilesAnalyzed*boolLicenseConcluded*stringLicenseDeclared*string Package nameSPDXID*stringVersionInfo*string GetDownloadLocation returns the DownloadLocation field if it's non-nil, zero value otherwise. GetFilesAnalyzed returns the FilesAnalyzed field if it's non-nil, zero value otherwise. GetLicenseConcluded returns the LicenseConcluded field if it's non-nil, zero value otherwise. GetLicenseDeclared returns the LicenseDeclared field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetSPDXID returns the SPDXID field if it's non-nil, zero value otherwise. GetVersionInfo returns the VersionInfo field if it's non-nil, zero value otherwise.
RepoMergeUpstreamResult represents the result of syncing a branch of
a forked repository with the upstream repository.BaseBranch*stringMergeType*stringMessage*string GetBaseBranch returns the BaseBranch field if it's non-nil, zero value otherwise. GetMergeType returns the MergeType field if it's non-nil, zero value otherwise. GetMessage returns the Message field if it's non-nil, zero value otherwise.
func (*RepositoriesService).MergeUpstream(ctx context.Context, owner, repo string, request *RepoMergeUpstreamRequest) (*RepoMergeUpstreamResult, *Response, error)
RepoName represents a change of repository name.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*EditRepo).GetName() *RepoName
RepoRequiredWorkflow represents a required workflow object at the repo level.BadgeURL*stringCreatedAt*TimestampHTMLURL*stringID*int64Name*stringNodeID*stringPath*stringSourceRepository*RepositoryState*stringURL*stringUpdatedAt*Timestamp GetBadgeURL returns the BadgeURL field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetPath returns the Path field if it's non-nil, zero value otherwise. GetSourceRepository returns the SourceRepository field. GetState returns the State field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
RepositoryAddCollaboratorOptions specifies the optional parameters to the
RepositoriesService.AddCollaborator method. Permission specifies the permission to grant the user on this repository.
Possible values are:
pull - team members can pull, but not push to or administer this repository
push - team members can pull and push, but not administer this repository
admin - team members can pull, push and administer this repository
maintain - team members can manage the repository without access to sensitive or destructive actions.
triage - team members can proactively manage issues and pull requests without write access.
Default value is "push". This option is only valid for organization-owned repositories.
func (*RepositoriesService).AddCollaborator(ctx context.Context, owner, repo, user string, opts *RepositoryAddCollaboratorOptions) (*CollaboratorInvitation, *Response, error)
RepositoryContent represents a file or directory in a github repository. Content contains the actual file content, which may be encoded.
Callers should call GetContent which will decode the content if
necessary.DownloadURL*stringEncoding*stringGitURL*stringHTMLURL*stringName*stringPath*stringSHA*stringSize*intSubmoduleGitURL*string Target is only set if the type is "symlink" and the target is not a normal file.
If Target is set, Path will be the symlink path.Type*stringURL*string GetContent returns the content of r, decoding it if necessary. GetDownloadURL returns the DownloadURL field if it's non-nil, zero value otherwise. GetEncoding returns the Encoding field if it's non-nil, zero value otherwise. GetGitURL returns the GitURL field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetPath returns the Path field if it's non-nil, zero value otherwise. GetSHA returns the SHA field if it's non-nil, zero value otherwise. GetSize returns the Size field if it's non-nil, zero value otherwise. GetSubmoduleGitURL returns the SubmoduleGitURL field if it's non-nil, zero value otherwise. GetTarget returns the Target field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. String converts RepositoryContent to a string. It's primarily for testing.
RepositoryContent : expvar.Var
RepositoryContent : fmt.Stringer
func (*RepositoriesService).DownloadContentsWithMeta(ctx context.Context, owner, repo, filepath string, opts *RepositoryContentGetOptions) (io.ReadCloser, *RepositoryContent, *Response, error)
func (*RepositoriesService).GetContents(ctx context.Context, owner, repo, path string, opts *RepositoryContentGetOptions) (fileContent *RepositoryContent, directoryContent []*RepositoryContent, resp *Response, err error)
func (*RepositoriesService).GetContents(ctx context.Context, owner, repo, path string, opts *RepositoryContentGetOptions) (fileContent *RepositoryContent, directoryContent []*RepositoryContent, resp *Response, err error)
func (*RepositoriesService).GetReadme(ctx context.Context, owner, repo string, opts *RepositoryContentGetOptions) (*RepositoryContent, *Response, error)
func (*RepositoryContentResponse).GetContent() *RepositoryContent
RepositoryDispatchEvent is triggered when a client sends a POST request to the repository dispatch event endpoint.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#repository_dispatch Action is the event_type that submitted with the repository dispatch payload. Value can be any string.Branch*stringClientPayloadjson.RawMessageInstallation*Installation The following fields are only populated by Webhook events.Repo*RepositorySender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetBranch returns the Branch field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field.
RepositoryEvent is triggered when a repository is created, archived, unarchived,
renamed, edited, transferred, made public, or made private. Organization hooks are
also triggered when a repository is deleted.
The Webhook event name is "repository".
Events of this type are not visible in timelines, they are only used to
trigger organization webhooks.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#repository Action is the action that was performed. Possible values are: "created",
"deleted" (organization hooks only), "archived", "unarchived", "edited", "renamed",
"transferred", "publicized", or "privatized". The following fields are only populated by Webhook events.Installation*InstallationOrg*OrganizationRepo*RepositorySender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetChanges returns the Changes field. GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field.
RepositoryLicense represents the license for a repository.Content*stringDownloadURL*stringEncoding*stringGitURL*stringHTMLURL*stringLicense*LicenseName*stringPath*stringSHA*stringSize*intType*stringURL*string GetContent returns the Content field if it's non-nil, zero value otherwise. GetDownloadURL returns the DownloadURL field if it's non-nil, zero value otherwise. GetEncoding returns the Encoding field if it's non-nil, zero value otherwise. GetGitURL returns the GitURL field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetLicense returns the License field. GetName returns the Name field if it's non-nil, zero value otherwise. GetPath returns the Path field if it's non-nil, zero value otherwise. GetSHA returns the SHA field if it's non-nil, zero value otherwise. GetSize returns the Size field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.( RepositoryLicense) String() string
RepositoryLicense : expvar.Var
RepositoryLicense : fmt.Stringer
func (*RepositoriesService).License(ctx context.Context, owner, repo string) (*RepositoryLicense, *Response, error)
RepositoryListAllOptions specifies the optional parameters to the
RepositoriesService.ListAll method. ID of the last repository seen
func (*RepositoriesService).ListAll(ctx context.Context, opts *RepositoryListAllOptions) ([]*Repository, *Response, error)
RepositoryListByAuthenticatedUserOptions specifies the optional parameters to the
RepositoriesService.ListByAuthenticatedUser method. See RepositoryListByAuthenticatedUserOptions.Affiliation See RepositoryListByUserOptions.Direction or RepositoryListByAuthenticatedUserOptions.DirectionListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. See RepositoryListByUserOptions.Sort or RepositoryListByAuthenticatedUserOptions.Sort See RepositoryListByUserOptions.Type or RepositoryListByAuthenticatedUserOptions.Type See RepositoryListByAuthenticatedUserOptions.Visibility
func (*RepositoriesService).ListByAuthenticatedUser(ctx context.Context, opts *RepositoryListByAuthenticatedUserOptions) ([]*Repository, *Response, error)
RepositoryListByOrgOptions specifies the optional parameters to the
RepositoriesService.ListByOrg method. The order to sort by.
Default: asc when using full_name, otherwise desc.
Can be one of: asc, descListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. The property to sort the results by.
Default: full_name
Can be one of: created, updated, pushed, full_name Limit results to repositories of the specified type.
Default: owner
Can be one of: all, owner, member
func (*RepositoriesService).ListByOrg(ctx context.Context, org string, opts *RepositoryListByOrgOptions) ([]*Repository, *Response, error)
RepositoryListByUserOptions specifies the optional parameters to the
RepositoriesService.ListByUser method. The order to sort by.
Default: asc when using full_name, otherwise desc.
Can be one of: asc, descListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. The property to sort the results by.
Default: full_name
Can be one of: created, updated, pushed, full_name Limit results to repositories of the specified type.
Default: owner
Can be one of: all, owner, member
func (*RepositoriesService).ListByUser(ctx context.Context, user string, opts *RepositoryListByUserOptions) ([]*Repository, *Response, error)
RepositoryListForksOptions specifies the optional parameters to the
RepositoriesService.ListForks method.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. How to sort the forks list. Possible values are: newest, oldest,
watchers. Default is "newest".
func (*RepositoriesService).ListForks(ctx context.Context, owner, repo string, opts *RepositoryListForksOptions) ([]*Repository, *Response, error)
RepositoryListOptions specifies the optional parameters to the
RepositoriesService.List method. See RepositoryListByAuthenticatedUserOptions.Affiliation See RepositoryListByUserOptions.Direction or RepositoryListByAuthenticatedUserOptions.DirectionListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. See RepositoryListByUserOptions.Sort or RepositoryListByAuthenticatedUserOptions.Sort See RepositoryListByUserOptions.Type or RepositoryListByAuthenticatedUserOptions.Type See RepositoryListByAuthenticatedUserOptions.Visibility
func (*RepositoriesService).List(ctx context.Context, user string, opts *RepositoryListOptions) ([]*Repository, *Response, error)
RepositoryMergeRequest represents a request to merge a branch in a
repository.Base*stringCommitMessage*stringHead*string GetBase returns the Base field if it's non-nil, zero value otherwise. GetCommitMessage returns the CommitMessage field if it's non-nil, zero value otherwise. GetHead returns the Head field if it's non-nil, zero value otherwise.
func (*RepositoriesService).Merge(ctx context.Context, owner, repo string, request *RepositoryMergeRequest) (*RepositoryCommit, *Response, error)
RepositoryParticipation is the number of commits by everyone
who has contributed to the repository (including the owner)
as well as the number of commits by the owner themself.All[]intOwner[]int( RepositoryParticipation) String() string
RepositoryParticipation : expvar.Var
RepositoryParticipation : fmt.Stringer
func (*RepositoriesService).ListParticipation(ctx context.Context, owner, repo string) (*RepositoryParticipation, *Response, error)
RepositoryPermissionLevel represents the permission level an organization
member has for a given repository. Possible values: "admin", "write", "read", "none"RoleName*stringUser*User GetPermission returns the Permission field if it's non-nil, zero value otherwise. GetRoleName returns the RoleName field if it's non-nil, zero value otherwise. GetUser returns the User field.
func (*RepositoriesService).GetPermissionLevel(ctx context.Context, owner, repo, user string) (*RepositoryPermissionLevel, *Response, error)
RepositoryVulnerabilityAlert represents a repository security alert.AffectedPackageName*stringAffectedRange*stringCreatedAt*TimestampDismissReason*stringDismissedAt*TimestampDismisser*UserExternalIdentifier*stringExternalReference*stringFixedIn*stringGitHubSecurityAdvisoryID*stringID*int64Severity*string GetAffectedPackageName returns the AffectedPackageName field if it's non-nil, zero value otherwise. GetAffectedRange returns the AffectedRange field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDismissReason returns the DismissReason field if it's non-nil, zero value otherwise. GetDismissedAt returns the DismissedAt field if it's non-nil, zero value otherwise. GetDismisser returns the Dismisser field. GetExternalIdentifier returns the ExternalIdentifier field if it's non-nil, zero value otherwise. GetExternalReference returns the ExternalReference field if it's non-nil, zero value otherwise. GetFixedIn returns the FixedIn field if it's non-nil, zero value otherwise. GetGitHubSecurityAdvisoryID returns the GitHubSecurityAdvisoryID field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetSeverity returns the Severity field if it's non-nil, zero value otherwise.
func (*RepositoryVulnerabilityAlertEvent).GetAlert() *RepositoryVulnerabilityAlert
RepositoryVulnerabilityAlertEvent is triggered when a security alert is created, dismissed, or resolved.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#repository_vulnerability_alert Action is the action that was performed. Possible values are: "create", "dismiss", "resolve". The security alert of the vulnerable dependency. The following fields are only populated by Webhook events. The following field is only present when the webhook is triggered on
a repository belonging to an organization. The repository of the vulnerable dependency. The user that triggered the event. GetAction returns the Action field if it's non-nil, zero value otherwise. GetAlert returns the Alert field. GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepository returns the Repository field. GetSender returns the Sender field.
RepoStats represents the number of total, root, fork, organization repositories
together with the total number of pushes and wikis.ForkRepos*intOrgRepos*intRootRepos*intTotalPushes*intTotalRepos*intTotalWikis*int GetForkRepos returns the ForkRepos field if it's non-nil, zero value otherwise. GetOrgRepos returns the OrgRepos field if it's non-nil, zero value otherwise. GetRootRepos returns the RootRepos field if it's non-nil, zero value otherwise. GetTotalPushes returns the TotalPushes field if it's non-nil, zero value otherwise. GetTotalRepos returns the TotalRepos field if it's non-nil, zero value otherwise. GetTotalWikis returns the TotalWikis field if it's non-nil, zero value otherwise.( RepoStats) String() string
RepoStats : expvar.Var
RepoStats : fmt.Stringer
func (*AdminStats).GetRepos() *RepoStats
RepoStatus represents the status of a repository at a particular reference. AvatarURL is the URL of the avatar of this status. A string label to differentiate this status from the statuses of other systems.CreatedAt*TimestampCreator*User Description is a short high level summary of the status.ID*int64NodeID*string State is the current state of the repository. Possible values are:
pending, success, error, or failure. TargetURL is the URL of the page representing this status. It will be
linked from the GitHub UI to allow users to see the source of the status.URL*stringUpdatedAt*Timestamp GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise. GetContext returns the Context field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetCreator returns the Creator field. GetDescription returns the Description field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise. GetTargetURL returns the TargetURL field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.( RepoStatus) String() string
RepoStatus : expvar.Var
RepoStatus : fmt.Stringer
func (*RepositoriesService).CreateStatus(ctx context.Context, owner, repo, ref string, status *RepoStatus) (*RepoStatus, *Response, error)
func (*RepositoriesService).ListStatuses(ctx context.Context, owner, repo, ref string, opts *ListOptions) ([]*RepoStatus, *Response, error)
func (*RepositoriesService).CreateStatus(ctx context.Context, owner, repo, ref string, status *RepoStatus) (*RepoStatus, *Response, error)
RequestedAction is included in a CheckRunEvent when a user has invoked an action,
i.e. when the CheckRunEvent's Action field is "requested_action". // The integrator reference of the action requested by the user.
func (*CheckRunEvent).GetRequestedAction() *RequestedAction
RequireCodeOwnerReviewChanges represents the changes made to the RequireCodeOwnerReview policy.From*bool GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*ProtectionChanges).GetRequireCodeOwnerReview() *RequireCodeOwnerReviewChanges
RequiredConversationResolution requires all comments on the pull request to be resolved before it can be
merged to a protected branch when enabled.Enabledbool
func (*Protection).GetRequiredConversationResolution() *RequiredConversationResolution
RequiredConversationResolutionLevelChanges represents the changes made to the RequiredConversationResolutionLevel policy.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*ProtectionChanges).GetRequiredConversationResolutionLevel() *RequiredConversationResolutionLevelChanges
RequiredDeploymentsEnforcementLevelChanges represents the changes made to the RequiredDeploymentsEnforcementLevel policy.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*ProtectionChanges).GetRequiredDeploymentsEnforcementLevel() *RequiredDeploymentsEnforcementLevelChanges
RequiredReviewer represents a required reviewer.Reviewerinterface{}Type*string GetType returns the Type field if it's non-nil, zero value otherwise. UnmarshalJSON implements the json.Unmarshaler interface.
This helps us handle the fact that RequiredReviewer can have either a User or Team type reviewer field.
*RequiredReviewer : github.com/goccy/go-json.Unmarshaler
*RequiredReviewer : encoding/json.Unmarshaler
RequiredStatusCheck represents a status check of a protected branch. The ID of the GitHub App that must provide this check.
Omit this field to automatically select the GitHub App
that has recently provided this check,
or any app if it was not set by a GitHub App.
Pass -1 to explicitly allow any app to set the status. The name of the required check. GetAppID returns the AppID field if it's non-nil, zero value otherwise.
func (*RequiredStatusChecks).GetChecks() []*RequiredStatusCheck
RequiredStatusChecks represents the protection status of a individual branch. The list of status checks to require in order to merge into this
branch. An empty slice is valid. The list of status checks to require in order to merge into this
branch. An empty slice is valid. (Deprecated. Note: only one of
Contexts/Checks can be populated, but at least one must be populated).ContextsURL*string Require branches to be up to date before merging. (Required.)URL*string GetChecks returns the Checks field if it's non-nil, zero value otherwise. GetContexts returns the Contexts field if it's non-nil, zero value otherwise. GetContextsURL returns the ContextsURL field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.
func (*Protection).GetRequiredStatusChecks() *RequiredStatusChecks
func (*ProtectionRequest).GetRequiredStatusChecks() *RequiredStatusChecks
func (*RepositoriesService).GetRequiredStatusChecks(ctx context.Context, owner, repo, branch string) (*RequiredStatusChecks, *Response, error)
func (*RepositoriesService).UpdateRequiredStatusChecks(ctx context.Context, owner, repo, branch string, sreq *RequiredStatusChecksRequest) (*RequiredStatusChecks, *Response, error)
RequiredStatusChecksEnforcementLevelChanges represents the changes made to the RequiredStatusChecksEnforcementLevel policy.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*ProtectionChanges).GetRequiredStatusChecksEnforcementLevel() *RequiredStatusChecksEnforcementLevelChanges
Rule represents the complete details of GitHub Code Scanning alert type.Description*stringFullDescription*stringHelp*stringID*stringName*stringSecuritySeverityLevel*stringSeverity*stringTags[]string GetDescription returns the Description field if it's non-nil, zero value otherwise. GetFullDescription returns the FullDescription field if it's non-nil, zero value otherwise. GetHelp returns the Help field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetSecuritySeverityLevel returns the SecuritySeverityLevel field if it's non-nil, zero value otherwise. GetSeverity returns the Severity field if it's non-nil, zero value otherwise.
func (*Alert).GetRule() *Rule
RuleFileParameters represents a list of file paths.RestrictedFilePaths*[]string GetRestrictedFilePaths returns the RestrictedFilePaths field if it's non-nil, zero value otherwise.
func NewFilePathRestrictionRule(params *RuleFileParameters) (rule *RepositoryRule)
RuleRequiredStatusChecks represents the RequiredStatusChecks for the RequiredStatusChecksRuleParameters object.ContextstringIntegrationID*int64 GetIntegrationID returns the IntegrationID field if it's non-nil, zero value otherwise.
RuleRequiredWorkflow represents the Workflow for the RequireWorkflowsRuleParameters object.PathstringRef*stringRepositoryID*int64Sha*string GetRef returns the Ref field if it's non-nil, zero value otherwise. GetRepositoryID returns the RepositoryID field if it's non-nil, zero value otherwise. GetSha returns the Sha field if it's non-nil, zero value otherwise.
RulesetLink represents a single link object from GitHub ruleset request _links.HRef*string GetHRef returns the HRef field if it's non-nil, zero value otherwise.
func (*RulesetLinks).GetSelf() *RulesetLink
RulesetLinks represents the "_links" object in a Ruleset.Self*RulesetLink GetSelf returns the Self field.
func (*Ruleset).GetLinks() *RulesetLinks
RulesetRepositoryNamesConditionParameters represents the conditions object for repository_names.Exclude[]stringInclude[]stringProtected*bool GetProtected returns the Protected field if it's non-nil, zero value otherwise.
func (*RulesetConditions).GetRepositoryName() *RulesetRepositoryNamesConditionParameters
RulesetRepositoryPropertyTargetParameters represents a repository_property name and values to be used for targeting.NamestringSourcestringValues[]string
RunnerLabels represents a collection of labels attached to each runner.ID*int64Name*stringType*string GetID returns the ID field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise.
SarifAnalysis specifies the results of a code scanning job.
GitHub API docs: https://docs.github.com/rest/code-scanningCheckoutURI*stringCommitSHA*stringRef*stringSarif*stringStartedAt*TimestampToolName*string GetCheckoutURI returns the CheckoutURI field if it's non-nil, zero value otherwise. GetCommitSHA returns the CommitSHA field if it's non-nil, zero value otherwise. GetRef returns the Ref field if it's non-nil, zero value otherwise. GetSarif returns the Sarif field if it's non-nil, zero value otherwise. GetStartedAt returns the StartedAt field if it's non-nil, zero value otherwise. GetToolName returns the ToolName field if it's non-nil, zero value otherwise.
func (*CodeScanningService).UploadSarif(ctx context.Context, owner, repo string, sarif *SarifAnalysis) (*SarifID, *Response, error)
SARIFUpload represents information about a SARIF upload. The REST API URL for getting the analyses associated with the upload. `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored.
`failed` files have either not been processed at all, or could only be partially processed. GetAnalysesURL returns the AnalysesURL field if it's non-nil, zero value otherwise. GetProcessingStatus returns the ProcessingStatus field if it's non-nil, zero value otherwise.
func (*CodeScanningService).GetSARIF(ctx context.Context, owner, repo, sarifID string) (*SARIFUpload, *Response, error)
SBOMInfo represents a software bill of materials (SBOM) using SPDX.
SPDX is an open standard for SBOMs that
identifies and catalogs components, licenses, copyrights, security
references, and other metadata relating to software.CreationInfo*CreationInfoDataLicense*stringDocumentDescribes[]stringDocumentNamespace*string Repo name List of packages dependenciesSPDXID*stringSPDXVersion*string GetCreationInfo returns the CreationInfo field. GetDataLicense returns the DataLicense field if it's non-nil, zero value otherwise. GetDocumentNamespace returns the DocumentNamespace field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetSPDXID returns the SPDXID field if it's non-nil, zero value otherwise. GetSPDXVersion returns the SPDXVersion field if it's non-nil, zero value otherwise.
func (*SBOM).GetSBOM() *SBOMInfo
ScanningAnalysis represents an individual GitHub Code Scanning ScanningAnalysis on a single repository.
GitHub API docs: https://docs.github.com/rest/code-scanningAnalysisKey*stringCategory*stringCommitSHA*stringCreatedAt*TimestampDeletable*boolEnvironment*stringError*stringID*int64Ref*stringResultsCount*intRulesCount*intSarifID*stringTool*ToolURL*stringWarning*string GetAnalysisKey returns the AnalysisKey field if it's non-nil, zero value otherwise. GetCategory returns the Category field if it's non-nil, zero value otherwise. GetCommitSHA returns the CommitSHA field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDeletable returns the Deletable field if it's non-nil, zero value otherwise. GetEnvironment returns the Environment field if it's non-nil, zero value otherwise. GetError returns the Error field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetRef returns the Ref field if it's non-nil, zero value otherwise. GetResultsCount returns the ResultsCount field if it's non-nil, zero value otherwise. GetRulesCount returns the RulesCount field if it's non-nil, zero value otherwise. GetSarifID returns the SarifID field if it's non-nil, zero value otherwise. GetTool returns the Tool field. GetURL returns the URL field if it's non-nil, zero value otherwise. GetWarning returns the Warning field if it's non-nil, zero value otherwise.
func (*CodeScanningService).GetAnalysis(ctx context.Context, owner, repo string, id int64) (*ScanningAnalysis, *Response, error)
func (*CodeScanningService).ListAnalysesForRepo(ctx context.Context, owner, repo string, opts *AnalysesListOptions) ([]*ScanningAnalysis, *Response, error)
SCIMMeta represents metadata about the SCIM resource.Created*TimestampLastModified*TimestampLocation*stringResourceType*string GetCreated returns the Created field if it's non-nil, zero value otherwise. GetLastModified returns the LastModified field if it's non-nil, zero value otherwise. GetLocation returns the Location field if it's non-nil, zero value otherwise. GetResourceType returns the ResourceType field if it's non-nil, zero value otherwise.
func (*SCIMUserAttributes).GetMeta() *SCIMMeta
SCIMUserEmail represents SCIM user email. // (Optional.) // (Optional.) // (Required.) GetPrimary returns the Primary field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise.
SCIMUserName represents SCIM user information. // The family name of the user. (Required.) // (Optional.) // The first name of the user. (Required.) GetFormatted returns the Formatted field if it's non-nil, zero value otherwise.
SecretScanningAlertEvent is triggered when a secret scanning alert occurs in a repository.
The Webhook name is secret_scanning_alert.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#secret_scanning_alert Action is the action that was performed. Possible values are: "created", "resolved", or "reopened". Alert is the secret scanning alert involved in the event.Enterprise*EnterpriseInstallation*InstallationOrganization*Organization The following fields are only populated by Webhook events. Only populated by the "resolved" and "reopen" actions GetAction returns the Action field if it's non-nil, zero value otherwise. GetAlert returns the Alert field. GetEnterprise returns the Enterprise field. GetInstallation returns the Installation field. GetOrganization returns the Organization field. GetRepo returns the Repo field. GetSender returns the Sender field.
SecretScanningAlertListOptions specifies optional parameters to the SecretScanningService.ListAlertsForEnterprise method.ListCursorOptionsListCursorOptions A cursor, as given in the Link header. If specified, the query only searches for events after this cursor. A cursor, as given in the Link header. If specified, the query only searches for events before this cursor. A cursor, as given in the Link header. If specified, the query continues the search using this cursor. For paginated result sets, the number of results per page (max 100), starting from the first matching result.
This parameter must not be used in combination with last. For paginated result sets, the number of results per page (max 100), starting from the last matching result.
This parameter must not be used in combination with first. List options can vary on the Enterprise type.
On Enterprise Cloud, Secret Scan alerts support requesting by page number
along with providing a cursor for an "after" param.
See: https://docs.github.com/enterprise-cloud@latest/rest/secret-scanning#list-secret-scanning-alerts-for-an-organization
Whereas on Enterprise Server, pagination is by index.
See: https://docs.github.com/enterprise-server@3.6/rest/secret-scanning#list-secret-scanning-alerts-for-an-organization A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed.
Valid resolutions are false_positive, wont_fix, revoked, pattern_edited, pattern_deleted or used_in_tests. A comma-separated list of secret types to return. By default all secret types are returned. State of the secret scanning alerts to list. Set to open or resolved to only list secret scanning alerts in a specific state.
func (*SecretScanningService).ListAlertsForEnterprise(ctx context.Context, enterprise string, opts *SecretScanningAlertListOptions) ([]*SecretScanningAlert, *Response, error)
func (*SecretScanningService).ListAlertsForOrg(ctx context.Context, org string, opts *SecretScanningAlertListOptions) ([]*SecretScanningAlert, *Response, error)
func (*SecretScanningService).ListAlertsForRepo(ctx context.Context, owner, repo string, opts *SecretScanningAlertListOptions) ([]*SecretScanningAlert, *Response, error)
SecretScanningAlertLocationDetails represents the location details for a secret scanning alert.BlobSHA*stringBlobURL*stringCommitSHA*stringCommitURL*stringEndColumn*intEndLine*intPath*stringStartColumn*intStartline*int GetBlobSHA returns the BlobSHA field if it's non-nil, zero value otherwise. GetBlobURL returns the BlobURL field if it's non-nil, zero value otherwise. GetCommitSHA returns the CommitSHA field if it's non-nil, zero value otherwise. GetCommitURL returns the CommitURL field if it's non-nil, zero value otherwise. GetEndColumn returns the EndColumn field if it's non-nil, zero value otherwise. GetEndLine returns the EndLine field if it's non-nil, zero value otherwise. GetPath returns the Path field if it's non-nil, zero value otherwise. GetStartColumn returns the StartColumn field if it's non-nil, zero value otherwise. GetStartline returns the Startline field if it's non-nil, zero value otherwise.
func (*SecretScanningAlertLocation).GetDetails() *SecretScanningAlertLocationDetails
SecretScanningAlertUpdateOptions specifies optional parameters to the SecretScanningService.UpdateAlert method. Required when the state is "resolved" and represents the reason for resolving the alert.
Can be one of: "false_positive", "wont_fix", "revoked", or "used_in_tests". State is required and sets the state of the secret scanning alert.
Can be either "open" or "resolved".
You must provide resolution when you set the state to "resolved". GetResolution returns the Resolution field if it's non-nil, zero value otherwise.
func (*SecretScanningService).UpdateAlert(ctx context.Context, owner, repo string, number int64, opts *SecretScanningAlertUpdateOptions) (*SecretScanningAlert, *Response, error)
SecretScanningService handles communication with the secret scanning related
methods of the GitHub API. GetAlert gets a single secret scanning alert detected in a private repository.
To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with
the repo scope or security_events scope.
GitHub API docs: https://docs.github.com/rest/secret-scanning/secret-scanning#get-a-secret-scanning-alert ListAlertsForEnterprise lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest.
To use this endpoint, you must be a member of the enterprise, and you must use an access token with the repo scope or
security_events scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager.
GitHub API docs: https://docs.github.com/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-an-enterprise ListAlertsForOrg lists secret scanning alerts for eligible repositories in an organization, from newest to oldest.
To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with
the repo scope or security_events scope.
GitHub API docs: https://docs.github.com/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-an-organization ListAlertsForRepo lists secret scanning alerts for a private repository, from newest to oldest.
To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with
the repo scope or security_events scope.
GitHub API docs: https://docs.github.com/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-a-repository ListLocationsForAlert lists all locations for a given secret scanning alert for a private repository.
To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with
the repo scope or security_events scope.
GitHub API docs: https://docs.github.com/rest/secret-scanning/secret-scanning#list-locations-for-a-secret-scanning-alert UpdateAlert updates the status of a secret scanning alert in a private repository.
To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with
the repo scope or security_events scope.
GitHub API docs: https://docs.github.com/rest/secret-scanning/secret-scanning#update-a-secret-scanning-alert
SecurityAdvisorySubmission represents the Security Advisory Submission. Accepted represents whether a private vulnerability report was accepted by the repository's administrators. GetAccepted returns the Accepted field if it's non-nil, zero value otherwise.
func (*SecurityAdvisory).GetSubmission() *SecurityAdvisorySubmission
SecurityAndAnalysisChangeFrom represents which change was made when security
and analysis features are enabled or disabled for a repository.SecurityAndAnalysis*SecurityAndAnalysis GetSecurityAndAnalysis returns the SecurityAndAnalysis field.
func (*SecurityAndAnalysisChange).GetFrom() *SecurityAndAnalysisChangeFrom
SetOrgAccessRunnerGroupRequest represents a request to replace the list of organizations
that can access a self-hosted runner group configured in an enterprise. Updated list of organization IDs that should be given access to the runner group.
func (*EnterpriseService).SetOrganizationAccessRunnerGroup(ctx context.Context, enterprise string, groupID int64, ids SetOrgAccessRunnerGroupRequest) (*Response, error)
SetRepoAccessRunnerGroupRequest represents a request to replace the list of repositories
that can access a self-hosted runner group configured in an organization. Updated list of repository IDs that should be given access to the runner group.
func (*ActionsService).SetRepositoryAccessRunnerGroup(ctx context.Context, org string, groupID int64, ids SetRepoAccessRunnerGroupRequest) (*Response, error)
SignatureRequirementEnforcementLevelChanges represents the changes made to the SignatureRequirementEnforcementLevel policy.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*ProtectionChanges).GetSignatureRequirementEnforcementLevel() *SignatureRequirementEnforcementLevelChanges
SignatureVerification represents GPG signature verification.Payload*stringReason*stringSignature*stringVerified*bool GetPayload returns the Payload field if it's non-nil, zero value otherwise. GetReason returns the Reason field if it's non-nil, zero value otherwise. GetSignature returns the Signature field if it's non-nil, zero value otherwise. GetVerified returns the Verified field if it's non-nil, zero value otherwise.
func (*Commit).GetVerification() *SignatureVerification
func (*Tag).GetVerification() *SignatureVerification
Source represents a reference's source.Actor*UserID*int64Issue*IssueType*stringURL*string GetActor returns the Actor field. GetID returns the ID field if it's non-nil, zero value otherwise. GetIssue returns the Issue field. GetType returns the Type field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.
func (*Timeline).GetSource() *Source
SponsorshipChanges represents changes made to the sponsorship.PrivacyLevel*stringTier*SponsorshipTier GetPrivacyLevel returns the PrivacyLevel field if it's non-nil, zero value otherwise. GetTier returns the Tier field.
func (*SponsorshipEvent).GetChanges() *SponsorshipChanges
SponsorshipTier represents the tier information of a sponsorship.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*SponsorshipChanges).GetTier() *SponsorshipTier
StarEvent is triggered when a star is added or removed from a repository.
The Webhook event name is "star".
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#star Action is the action that was performed. Possible values are: "created" or "deleted".Installation*Installation The following fields are only populated by Webhook events.Repo*RepositorySender*User StarredAt is the time the star was created. It will be null for the "deleted" action. GetAction returns the Action field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field. GetStarredAt returns the StarredAt field if it's non-nil, zero value otherwise.
StatusEvent is triggered when the status of a Git commit changes.
The Webhook event name is "status".
Events of this type are not visible in timelines, they are only used to
trigger hooks.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#statusBranches[]*BranchCommit*RepositoryCommitContext*stringCreatedAt*TimestampDescription*string The following fields are only populated by Webhook events.Installation*InstallationName*string The following field is only present when the webhook is triggered on
a repository belonging to an organization.Repo*RepositorySHA*stringSender*User State is the new state. Possible values are: "pending", "success", "failure", "error".TargetURL*stringUpdatedAt*Timestamp GetCommit returns the Commit field. GetContext returns the Context field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDescription returns the Description field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetName returns the Name field if it's non-nil, zero value otherwise. GetOrg returns the Org field. GetRepo returns the Repo field. GetSHA returns the SHA field if it's non-nil, zero value otherwise. GetSender returns the Sender field. GetState returns the State field if it's non-nil, zero value otherwise. GetTargetURL returns the TargetURL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
TaskStep represents a single task step from a sequence of tasks of a job.CompletedAt*TimestampConclusion*stringName*stringNumber*int64StartedAt*TimestampStatus*string GetCompletedAt returns the CompletedAt field if it's non-nil, zero value otherwise. GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetNumber returns the Number field if it's non-nil, zero value otherwise. GetStartedAt returns the StartedAt field if it's non-nil, zero value otherwise. GetStatus returns the Status field if it's non-nil, zero value otherwise.
TeamAddEvent is triggered when a repository is added to a team.
The Webhook event name is "team_add".
Events of this type are not visible in timelines. These events are only used
to trigger hooks.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#team_addInstallation*Installation The following fields are only populated by Webhook events.Repo*RepositorySender*UserTeam*Team GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field. GetTeam returns the Team field.
TeamAddTeamMembershipOptions specifies the optional
parameters to the TeamsService.AddTeamMembership method. Role specifies the role the user should have in the team. Possible
values are:
member - a normal member of the team
maintainer - a team maintainer. Able to add/remove other team
members, promote other team members to team
maintainer, and edit the team’s name and description
Default value is "member".
func (*TeamsService).AddTeamMembershipByID(ctx context.Context, orgID, teamID int64, user string, opts *TeamAddTeamMembershipOptions) (*Membership, *Response, error)
func (*TeamsService).AddTeamMembershipBySlug(ctx context.Context, org, slug, user string, opts *TeamAddTeamMembershipOptions) (*Membership, *Response, error)
TeamAddTeamRepoOptions specifies the optional parameters to the
TeamsService.AddTeamRepoByID and TeamsService.AddTeamRepoBySlug methods. Permission specifies the permission to grant the user on this repository.
Possible values are:
pull - team members can pull, but not push to or administer this repository
push - team members can pull and push, but not administer this repository
admin - team members can pull, push and administer this repository
maintain - team members can manage the repository without access to sensitive or destructive actions.
triage - team members can proactively manage issues and pull requests without write access.
Default value is "push". This option is only valid for organization-owned repositories.
func (*TeamsService).AddTeamRepoByID(ctx context.Context, orgID, teamID int64, owner, repo string, opts *TeamAddTeamRepoOptions) (*Response, error)
func (*TeamsService).AddTeamRepoBySlug(ctx context.Context, org, slug, owner, repo string, opts *TeamAddTeamRepoOptions) (*Response, error)
TeamDescription represents a team description change.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*TeamChange).GetDescription() *TeamDescription
TeamEvent is triggered when an organization's team is created, modified or deleted.
The Webhook event name is "team".
Events of this type are not visible in timelines. These events are only used
to trigger hooks.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#teamAction*stringChanges*TeamChangeInstallation*Installation The following fields are only populated by Webhook events.Repo*RepositorySender*UserTeam*Team GetAction returns the Action field if it's non-nil, zero value otherwise. GetChanges returns the Changes field. GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field. GetTeam returns the Team field.
TeamLDAPMapping represents the mapping between a GitHub team and an LDAP group.Description*stringID*int64LDAPDN*stringMembersURL*stringName*stringPermission*stringPrivacy*stringRepositoriesURL*stringSlug*stringURL*string GetDescription returns the Description field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetLDAPDN returns the LDAPDN field if it's non-nil, zero value otherwise. GetMembersURL returns the MembersURL field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetPermission returns the Permission field if it's non-nil, zero value otherwise. GetPrivacy returns the Privacy field if it's non-nil, zero value otherwise. GetRepositoriesURL returns the RepositoriesURL field if it's non-nil, zero value otherwise. GetSlug returns the Slug field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.( TeamLDAPMapping) String() string
TeamLDAPMapping : expvar.Var
TeamLDAPMapping : fmt.Stringer
func (*AdminService).UpdateTeamLDAPMapping(ctx context.Context, team int64, mapping *TeamLDAPMapping) (*TeamLDAPMapping, *Response, error)
func (*AdminService).UpdateTeamLDAPMapping(ctx context.Context, team int64, mapping *TeamLDAPMapping) (*TeamLDAPMapping, *Response, error)
TeamListTeamMembersOptions specifies the optional parameters to the
TeamsService.ListTeamMembers method.ListOptionsListOptions For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Role filters members returned by their role in the team. Possible
values are "all", "member", "maintainer". Default is "all".
func (*TeamsService).ListTeamMembersByID(ctx context.Context, orgID, teamID int64, opts *TeamListTeamMembersOptions) ([]*User, *Response, error)
func (*TeamsService).ListTeamMembersBySlug(ctx context.Context, org, slug string, opts *TeamListTeamMembersOptions) ([]*User, *Response, error)
TeamName represents a team name change.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*TeamChange).GetName() *TeamName
TeamPermissionsFrom represents a team permission change.Admin*boolPull*boolPush*bool GetAdmin returns the Admin field if it's non-nil, zero value otherwise. GetPull returns the Pull field if it's non-nil, zero value otherwise. GetPush returns the Push field if it's non-nil, zero value otherwise.
func (*TeamPermissions).GetFrom() *TeamPermissionsFrom
TeamPrivacy represents a team privacy change.From*string GetFrom returns the From field if it's non-nil, zero value otherwise.
func (*TeamChange).GetPrivacy() *TeamPrivacy
TeamProjectOptions specifies the optional parameters to the
TeamsService.AddTeamProject method. Permission specifies the permission to grant to the collaborator.
Possible values are:
"read" - can read, but not write to or administer this project.
"write" - can read and write, but not administer this project.
"admin" - can read, write and administer this project.
Default value is "write" GetPermission returns the Permission field if it's non-nil, zero value otherwise.
func (*TeamsService).AddTeamProjectByID(ctx context.Context, orgID, teamID, projectID int64, opts *TeamProjectOptions) (*Response, error)
func (*TeamsService).AddTeamProjectBySlug(ctx context.Context, org, slug string, projectID int64, opts *TeamProjectOptions) (*Response, error)
TemplateRepoRequest represents a request to create a repository from a template.Description*stringIncludeAllBranches*bool Name is required when creating a repo.Owner*stringPrivate*bool GetDescription returns the Description field if it's non-nil, zero value otherwise. GetIncludeAllBranches returns the IncludeAllBranches field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetOwner returns the Owner field if it's non-nil, zero value otherwise. GetPrivate returns the Private field if it's non-nil, zero value otherwise.
func (*RepositoriesService).CreateFromTemplate(ctx context.Context, templateOwner, templateRepo string, templateRepoReq *TemplateRepoRequest) (*Repository, *Response, error)
TextMatch represents a text match for a SearchResultFragment*stringMatches[]*MatchObjectType*stringObjectURL*stringProperty*string GetFragment returns the Fragment field if it's non-nil, zero value otherwise. GetObjectType returns the ObjectType field if it's non-nil, zero value otherwise. GetObjectURL returns the ObjectURL field if it's non-nil, zero value otherwise. GetProperty returns the Property field if it's non-nil, zero value otherwise.( TextMatch) String() string
TextMatch : expvar.Var
TextMatch : fmt.Stringer
Timeline represents an event that occurred around an Issue or Pull Request.
It is similar to an IssueEvent but may contain more information.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/events/issue-event-types The User object that generated the event. The User object which was assigned to (or unassigned from) this Issue or
Pull Request. Only provided for 'assigned' and 'unassigned' events.Assigner*User The person who authored the commit. The review summary text. The string SHA of a commit that referenced this Issue or Pull Request.CommitURL*string The person who committed the commit on behalf of the author. The timestamp indicating when the event occurred. Event identifies the actual type of Event that occurred. Possible values
are:
assigned
The issue was assigned to the assignee.
closed
The issue was closed by the actor. When the commit_id is present, it
identifies the commit that closed the issue using "closes / fixes #NN"
syntax.
commented
A comment was added to the issue.
committed
A commit was added to the pull request's 'HEAD' branch. Only provided
for pull requests.
cross-referenced
The issue was referenced from another issue. The 'source' attribute
contains the 'id', 'actor', and 'url' of the reference's source.
demilestoned
The issue was removed from a milestone.
head_ref_deleted
The pull request's branch was deleted.
head_ref_restored
The pull request's branch was restored.
labeled
A label was added to the issue.
locked
The issue was locked by the actor.
mentioned
The actor was @mentioned in an issue body.
merged
The issue was merged by the actor. The 'commit_id' attribute is the
SHA1 of the HEAD commit that was merged.
milestoned
The issue was added to a milestone.
referenced
The issue was referenced from a commit message. The 'commit_id'
attribute is the commit SHA1 of where that happened.
renamed
The issue title was changed.
reopened
The issue was reopened by the actor.
reviewed
The pull request was reviewed.
subscribed
The actor subscribed to receive notifications for an issue.
unassigned
The assignee was unassigned from the issue.
unlabeled
A label was removed from the issue.
unlocked
The issue was unlocked by the actor.
unsubscribed
The actor unsubscribed to stop receiving notifications for an issue.ID*int64 The Label object including `name` and `color` attributes. Only provided for
'labeled' and 'unlabeled' events. The commit message. The Milestone object including a 'title' attribute.
Only provided for 'milestoned' and 'demilestoned' events. A list of parent commits.PerformedViaGithubApp*AppProjectCard*ProjectCard An object containing rename details including 'from' and 'to' attributes.
Only provided for 'renamed' events. RequestedTeam contains the team requested to review the pull request. The person who requested a review. The person requested to review the pull request. The SHA of the commit in the pull request. The 'id', 'actor', and 'url' for the source of a reference from another issue.
Only provided for 'cross-referenced' events. The state of a submitted review. Can be one of: 'commented',
'changes_requested' or 'approved'.
Only provided for 'reviewed' events.SubmittedAt*TimestampURL*string The person who commented on the issue. GetActor returns the Actor field. GetAssignee returns the Assignee field. GetAssigner returns the Assigner field. GetAuthor returns the Author field. GetBody returns the Body field if it's non-nil, zero value otherwise. GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. GetCommitURL returns the CommitURL field if it's non-nil, zero value otherwise. GetCommitter returns the Committer field. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetEvent returns the Event field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetLabel returns the Label field. GetMessage returns the Message field if it's non-nil, zero value otherwise. GetMilestone returns the Milestone field. GetPerformedViaGithubApp returns the PerformedViaGithubApp field. GetProjectCard returns the ProjectCard field. GetRename returns the Rename field. GetRequestedTeam returns the RequestedTeam field. GetRequester returns the Requester field. GetReviewer returns the Reviewer field. GetSHA returns the SHA field if it's non-nil, zero value otherwise. GetSource returns the Source field. GetState returns the State field if it's non-nil, zero value otherwise. GetSubmittedAt returns the SubmittedAt field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUser returns the User field.
func (*IssuesService).ListIssueTimeline(ctx context.Context, owner, repo string, number int, opts *ListOptions) ([]*Timeline, *Response, error)
Tool represents the tool used to generate a GitHub Code Scanning Alert.GUID*stringName*stringVersion*string GetGUID returns the GUID field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetVersion returns the Version field if it's non-nil, zero value otherwise.
func (*Alert).GetTool() *Tool
func (*ScanningAnalysis).GetTool() *Tool
CreatedAt*TimestampCreatedBy*stringCurated*boolDescription*stringDisplayName*stringFeatured*boolName*stringScore*float64ShortDescription*stringUpdatedAt*string GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetCreatedBy returns the CreatedBy field if it's non-nil, zero value otherwise. GetCurated returns the Curated field if it's non-nil, zero value otherwise. GetDescription returns the Description field if it's non-nil, zero value otherwise. GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise. GetFeatured returns the Featured field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetScore returns the Score field. GetShortDescription returns the ShortDescription field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
TrafficData represent information about a specific timestamp in views or clones list.Count*intTimestamp*TimestampUniques*int GetCount returns the Count field if it's non-nil, zero value otherwise. GetTimestamp returns the Timestamp field if it's non-nil, zero value otherwise. GetUniques returns the Uniques field if it's non-nil, zero value otherwise.
TrafficPath represent information about the traffic on a path of the repo.Count*intPath*stringTitle*stringUniques*int GetCount returns the Count field if it's non-nil, zero value otherwise. GetPath returns the Path field if it's non-nil, zero value otherwise. GetTitle returns the Title field if it's non-nil, zero value otherwise. GetUniques returns the Uniques field if it's non-nil, zero value otherwise.
func (*RepositoriesService).ListTrafficPaths(ctx context.Context, owner, repo string) ([]*TrafficPath, *Response, error)
TrafficReferrer represent information about traffic from a referrer .Count*intReferrer*stringUniques*int GetCount returns the Count field if it's non-nil, zero value otherwise. GetReferrer returns the Referrer field if it's non-nil, zero value otherwise. GetUniques returns the Uniques field if it's non-nil, zero value otherwise.
func (*RepositoriesService).ListTrafficReferrers(ctx context.Context, owner, repo string) ([]*TrafficReferrer, *Response, error)
TreeEntry represents the contents of a tree structure. TreeEntry can
represent either a blob, a commit (in the case of a submodule), or another
tree.Content*stringMode*stringPath*stringSHA*stringSize*intType*stringURL*string GetContent returns the Content field if it's non-nil, zero value otherwise. GetMode returns the Mode field if it's non-nil, zero value otherwise. GetPath returns the Path field if it's non-nil, zero value otherwise. GetSHA returns the SHA field if it's non-nil, zero value otherwise. GetSize returns the Size field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.(*TreeEntry) MarshalJSON() ([]byte, error)( TreeEntry) String() string
*TreeEntry : github.com/goccy/go-json.Marshaler
*TreeEntry : encoding/json.Marshaler
TreeEntry : expvar.Var
TreeEntry : fmt.Stringer
func (*GitService).CreateTree(ctx context.Context, owner string, repo string, baseTree string, entries []*TreeEntry) (*Tree, *Response, error)
TwoFactorAuthError occurs when using HTTP Basic Authentication for a user
that has two-factor authentication enabled. The request can be reattempted
by providing a one-time password in the request. Block is only populated on certain types of errors such as code 451. Most errors will also include a documentation_url field pointing
to some content that might help you resolve the error, see
https://docs.github.com/rest/#client-errors // more detail on individual errors // error message // HTTP response that caused this error(*TwoFactorAuthError) Error() string
*TwoFactorAuthError : error
UnauthenticatedRateLimitedTransport allows you to make unauthenticated calls
that need to use a higher rate limit associated with your OAuth application.
t := &github.UnauthenticatedRateLimitedTransport{
ClientID: "your app's client ID",
ClientSecret: "your app's client secret",
}
client := github.NewClient(t.Client())
This will add the client id and secret as a base64-encoded string in the format
ClientID:ClientSecret and apply it as an "Authorization": "Basic" header.
See https://docs.github.com/rest/#unauthenticated-rate-limited-requests for
more information. ClientID is the GitHub OAuth client ID of the current application, which
can be found by selecting its entry in the list at
https://github.com/settings/applications. ClientSecret is the GitHub OAuth client secret of the current
application. Transport is the underlying HTTP transport to use when making requests.
It will default to http.DefaultTransport if nil. Client returns an *http.Client that makes requests which are subject to the
rate limit of your OAuth application. RoundTrip implements the RoundTripper interface.
*UnauthenticatedRateLimitedTransport : net/http.RoundTripper
UpdateAttributeForSCIMUserOperations represents operations for UpdateAttributeForSCIMUser. // (Required.) // (Optional.) // (Optional.) GetPath returns the Path field if it's non-nil, zero value otherwise.
UpdateCheckRunOptions sets up parameters needed to update a CheckRun. // Possible further actions the integrator can perform, which a user may trigger. (Optional.) // The time the check completed. (Optional. Required if you provide conclusion.) // Can be one of "success", "failure", "neutral", "cancelled", "skipped", "timed_out", or "action_required". (Optional. Required if you provide a status of "completed".) // The URL of the integrator's site that has the full details of the check. (Optional.) // A reference for the run on the integrator's system. (Optional.) // The name of the check (e.g., "code-coverage"). (Required.) // Provide descriptive details about the run. (Optional) // The current status. Can be one of "queued", "in_progress", or "completed". Default: "queued". (Optional.) GetCompletedAt returns the CompletedAt field if it's non-nil, zero value otherwise. GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. GetDetailsURL returns the DetailsURL field if it's non-nil, zero value otherwise. GetExternalID returns the ExternalID field if it's non-nil, zero value otherwise. GetOutput returns the Output field. GetStatus returns the Status field if it's non-nil, zero value otherwise.
func (*ChecksService).UpdateCheckRun(ctx context.Context, owner, repo string, checkRunID int64, opts UpdateCheckRunOptions) (*CheckRun, *Response, error)
UserAuthorization represents the impersonation response.App*OAuthAPPCreatedAt*TimestampFingerprint*stringHashedToken*stringID*int64Note*stringNoteURL*stringScopes[]stringToken*stringTokenLastEight*stringURL*stringUpdatedAt*Timestamp GetApp returns the App field. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetFingerprint returns the Fingerprint field if it's non-nil, zero value otherwise. GetHashedToken returns the HashedToken field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetNote returns the Note field if it's non-nil, zero value otherwise. GetNoteURL returns the NoteURL field if it's non-nil, zero value otherwise. GetToken returns the Token field if it's non-nil, zero value otherwise. GetTokenLastEight returns the TokenLastEight field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
func (*AdminService).CreateUserImpersonation(ctx context.Context, username string, opts *ImpersonateUserOptions) (*UserAuthorization, *Response, error)
UserContext represents the contextual information about user.Message*stringOcticon*string GetMessage returns the Message field if it's non-nil, zero value otherwise. GetOcticon returns the Octicon field if it's non-nil, zero value otherwise.
UserEvent is triggered when a user is created or deleted.
The Webhook event name is "user".
Only global webhooks can subscribe to this event type.
GitHub API docs: https://developer.github.com/enterprise/v3/activity/events/types/#userevent-enterprise The action performed. Possible values are: "created" or "deleted".Enterprise*Enterprise The following fields are only populated by Webhook events.Sender*UserUser*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetEnterprise returns the Enterprise field. GetInstallation returns the Installation field. GetSender returns the Sender field. GetUser returns the User field.
UserLDAPMapping represents the mapping between a GitHub user and an LDAP user.AvatarURL*stringEventsURL*stringFollowersURL*stringFollowingURL*stringGistsURL*stringGravatarID*stringID*int64LDAPDN*stringLogin*stringOrganizationsURL*stringReceivedEventsURL*stringReposURL*stringSiteAdmin*boolStarredURL*stringSubscriptionsURL*stringType*stringURL*string GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise. GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. GetFollowersURL returns the FollowersURL field if it's non-nil, zero value otherwise. GetFollowingURL returns the FollowingURL field if it's non-nil, zero value otherwise. GetGistsURL returns the GistsURL field if it's non-nil, zero value otherwise. GetGravatarID returns the GravatarID field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetLDAPDN returns the LDAPDN field if it's non-nil, zero value otherwise. GetLogin returns the Login field if it's non-nil, zero value otherwise. GetOrganizationsURL returns the OrganizationsURL field if it's non-nil, zero value otherwise. GetReceivedEventsURL returns the ReceivedEventsURL field if it's non-nil, zero value otherwise. GetReposURL returns the ReposURL field if it's non-nil, zero value otherwise. GetSiteAdmin returns the SiteAdmin field if it's non-nil, zero value otherwise. GetStarredURL returns the StarredURL field if it's non-nil, zero value otherwise. GetSubscriptionsURL returns the SubscriptionsURL field if it's non-nil, zero value otherwise. GetType returns the Type field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise.( UserLDAPMapping) String() string
UserLDAPMapping : expvar.Var
UserLDAPMapping : fmt.Stringer
func (*AdminService).UpdateUserLDAPMapping(ctx context.Context, user string, mapping *UserLDAPMapping) (*UserLDAPMapping, *Response, error)
func (*AdminService).UpdateUserLDAPMapping(ctx context.Context, user string, mapping *UserLDAPMapping) (*UserLDAPMapping, *Response, error)
UserListOptions specifies optional parameters to the UsersService.ListAll
method. Note: Pagination is powered exclusively by the Since parameter,
ListOptions.Page has no effect.
ListOptions.PerPage controls an undocumented GitHub API parameter. For paginated result sets, page of results to retrieve. For paginated result sets, the number of results to include per page. Since filters Organizations by ID.
func (*UsersService).ListAll(ctx context.Context, opts *UserListOptions) ([]*User, *Response, error)
UserMigration represents a GitHub migration (archival).CreatedAt*string ExcludeAttachments indicates whether attachments should be excluded from
the migration (to reduce migration archive file size).GUID*stringID*int64 LockRepositories indicates whether repositories are locked (to prevent
manipulation) while migrating data.Repositories[]*Repository State is the current state of a migration.
Possible values are:
"pending" which means the migration hasn't started yet,
"exporting" which means the migration is in progress,
"exported" which means the migration finished successfully, or
"failed" which means the migration failed.URL*stringUpdatedAt*string GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetExcludeAttachments returns the ExcludeAttachments field if it's non-nil, zero value otherwise. GetGUID returns the GUID field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetLockRepositories returns the LockRepositories field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.( UserMigration) String() string
UserMigration : expvar.Var
UserMigration : fmt.Stringer
func (*MigrationService).ListUserMigrations(ctx context.Context, opts *ListOptions) ([]*UserMigration, *Response, error)
func (*MigrationService).StartUserMigration(ctx context.Context, repos []string, opts *UserMigrationOptions) (*UserMigration, *Response, error)
func (*MigrationService).UserMigrationStatus(ctx context.Context, id int64) (*UserMigration, *Response, error)
UserMigrationOptions specifies the optional parameters to Migration methods. ExcludeAttachments indicates whether attachments should be excluded from
the migration (to reduce migration archive file size). LockRepositories indicates whether repositories should be locked (to prevent
manipulation) while migrating data.
func (*MigrationService).StartUserMigration(ctx context.Context, repos []string, opts *UserMigrationOptions) (*UserMigration, *Response, error)
UserStats represents the number of total, admin and suspended users.AdminUsers*intSuspendedUsers*intTotalUsers*int GetAdminUsers returns the AdminUsers field if it's non-nil, zero value otherwise. GetSuspendedUsers returns the SuspendedUsers field if it's non-nil, zero value otherwise. GetTotalUsers returns the TotalUsers field if it's non-nil, zero value otherwise.( UserStats) String() string
UserStats : expvar.Var
UserStats : fmt.Stringer
func (*AdminStats).GetUsers() *UserStats
UserSuspendOptions represents the reason a user is being suspended.Reason*string GetReason returns the Reason field if it's non-nil, zero value otherwise.
func (*UsersService).Suspend(ctx context.Context, user string, opts *UserSuspendOptions) (*Response, error)
WatchEvent is related to starring a repository, not watching. See this API
blog post for an explanation: https://developer.github.com/changes/2012-09-05-watcher-api/
The event’s actor is the user who starred a repository, and the event’s
repository is the repository that was starred.
GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#watch Action is the action that was performed. Possible value is: "started".Installation*Installation The following field is only present when the webhook is triggered on
a repository belonging to an organization. The following fields are only populated by Webhook events.Sender*User GetAction returns the Action field if it's non-nil, zero value otherwise. GetInstallation returns the Installation field. GetOrg returns the Org field. GetRepo returns the Repo field. GetSender returns the Sender field.
WebHookAuthor represents the author or committer of a commit, as specified
in a WebHookCommit. The commit author may not correspond to a GitHub User.
Deprecated: Please use CommitAuthor instead.
NOTE Breaking API change: the `Username` field is now called `Login`.
WebHookCommit represents the commit variant we receive from GitHub in a
WebHookPayload.
Deprecated: Please use HeadCommit instead.
WebHookPayload represents the data that is received from GitHub when a push
event hook is triggered. The format of these payloads pre-date most of the
GitHub v3 API, so there are lots of minor incompatibilities with the types
defined in the rest of the API. Therefore, several types are duplicated
here to account for these differences.
GitHub API docs: https://help.github.com/articles/post-receive-hooks
Deprecated: Please use PushEvent instead.
WeeklyCommitActivity represents the weekly commit activity for a repository.
The days array is a group of commits per day, starting on Sunday.Days[]intTotal*intWeek*Timestamp GetTotal returns the Total field if it's non-nil, zero value otherwise. GetWeek returns the Week field if it's non-nil, zero value otherwise.( WeeklyCommitActivity) String() string
WeeklyCommitActivity : expvar.Var
WeeklyCommitActivity : fmt.Stringer
func (*RepositoriesService).ListCommitActivity(ctx context.Context, owner, repo string) ([]*WeeklyCommitActivity, *Response, error)
WeeklyStats represents the number of additions, deletions and commits
a Contributor made in a given week.Additions*intCommits*intDeletions*intWeek*Timestamp GetAdditions returns the Additions field if it's non-nil, zero value otherwise. GetCommits returns the Commits field if it's non-nil, zero value otherwise. GetDeletions returns the Deletions field if it's non-nil, zero value otherwise. GetWeek returns the Week field if it's non-nil, zero value otherwise.( WeeklyStats) String() string
WeeklyStats : expvar.Var
WeeklyStats : fmt.Stringer
func (*RepositoriesService).ListCodeFrequency(ctx context.Context, owner, repo string) ([]*WeeklyStats, *Response, error)
Workflow represents a repository action workflow.BadgeURL*stringCreatedAt*TimestampHTMLURL*stringID*int64Name*stringNodeID*stringPath*stringState*stringURL*stringUpdatedAt*Timestamp GetBadgeURL returns the BadgeURL field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetPath returns the Path field if it's non-nil, zero value otherwise. GetState returns the State field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
func (*ActionsService).GetWorkflowByFileName(ctx context.Context, owner, repo, workflowFileName string) (*Workflow, *Response, error)
func (*ActionsService).GetWorkflowByID(ctx context.Context, owner, repo string, workflowID int64) (*Workflow, *Response, error)
func (*DeploymentEvent).GetWorkflow() *Workflow
func (*WorkflowRunEvent).GetWorkflow() *Workflow
WorkflowBill specifies billable time for a specific environment in a workflow.TotalMS*int64 GetTotalMS returns the TotalMS field if it's non-nil, zero value otherwise.
WorkflowBillMap represents different runner environments available for a workflow.
Its key is the name of its environment, e.g. "UBUNTU", "MACOS", "WINDOWS", etc.
func (*WorkflowUsage).GetBillable() *WorkflowBillMap
WorkflowJob represents a repository action workflow job.CheckRunURL*stringCompletedAt*TimestampConclusion*stringCreatedAt*TimestampHTMLURL*stringHeadBranch*stringHeadSHA*stringID*int64 Labels represents runner labels from the `runs-on:` key from a GitHub Actions workflow.Name*stringNodeID*stringRunAttempt*int64RunID*int64RunURL*stringRunnerGroupID*int64RunnerGroupName*stringRunnerID*int64RunnerName*stringStartedAt*TimestampStatus*stringSteps[]*TaskStepURL*stringWorkflowName*string GetCheckRunURL returns the CheckRunURL field if it's non-nil, zero value otherwise. GetCompletedAt returns the CompletedAt field if it's non-nil, zero value otherwise. GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetHeadBranch returns the HeadBranch field if it's non-nil, zero value otherwise. GetHeadSHA returns the HeadSHA field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetRunAttempt returns the RunAttempt field if it's non-nil, zero value otherwise. GetRunID returns the RunID field if it's non-nil, zero value otherwise. GetRunURL returns the RunURL field if it's non-nil, zero value otherwise. GetRunnerGroupID returns the RunnerGroupID field if it's non-nil, zero value otherwise. GetRunnerGroupName returns the RunnerGroupName field if it's non-nil, zero value otherwise. GetRunnerID returns the RunnerID field if it's non-nil, zero value otherwise. GetRunnerName returns the RunnerName field if it's non-nil, zero value otherwise. GetStartedAt returns the StartedAt field if it's non-nil, zero value otherwise. GetStatus returns the Status field if it's non-nil, zero value otherwise. GetURL returns the URL field if it's non-nil, zero value otherwise. GetWorkflowName returns the WorkflowName field if it's non-nil, zero value otherwise.
func (*ActionsService).GetWorkflowJobByID(ctx context.Context, owner, repo string, jobID int64) (*WorkflowJob, *Response, error)
func (*WorkflowJobEvent).GetWorkflowJob() *WorkflowJob
WorkflowJobRun represents a workflow_job_run in a GitHub DeploymentReviewEvent.Conclusion*stringCreatedAt*TimestampEnvironment*stringHTMLURL*stringID*int64Name*stringStatus*stringUpdatedAt*Timestamp GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetEnvironment returns the Environment field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetStatus returns the Status field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
func (*DeploymentReviewEvent).GetWorkflowJobRun() *WorkflowJobRun
WorkflowRun represents a repository action workflow run.Actor*UserArtifactsURL*stringCancelURL*stringCheckSuiteID*int64CheckSuiteNodeID*stringCheckSuiteURL*stringConclusion*stringCreatedAt*TimestampDisplayTitle*stringEvent*stringHTMLURL*stringHeadBranch*stringHeadCommit*HeadCommitHeadRepository*RepositoryHeadSHA*stringID*int64JobsURL*stringLogsURL*stringName*stringNodeID*stringPath*stringPreviousAttemptURL*stringPullRequests[]*PullRequestReferencedWorkflows[]*ReferencedWorkflowRepository*RepositoryRerunURL*stringRunAttempt*intRunNumber*intRunStartedAt*TimestampStatus*stringTriggeringActor*UserURL*stringUpdatedAt*TimestampWorkflowID*int64WorkflowURL*string GetActor returns the Actor field. GetArtifactsURL returns the ArtifactsURL field if it's non-nil, zero value otherwise. GetCancelURL returns the CancelURL field if it's non-nil, zero value otherwise. GetCheckSuiteID returns the CheckSuiteID field if it's non-nil, zero value otherwise. GetCheckSuiteNodeID returns the CheckSuiteNodeID field if it's non-nil, zero value otherwise. GetCheckSuiteURL returns the CheckSuiteURL field if it's non-nil, zero value otherwise. GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. GetDisplayTitle returns the DisplayTitle field if it's non-nil, zero value otherwise. GetEvent returns the Event field if it's non-nil, zero value otherwise. GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. GetHeadBranch returns the HeadBranch field if it's non-nil, zero value otherwise. GetHeadCommit returns the HeadCommit field. GetHeadRepository returns the HeadRepository field. GetHeadSHA returns the HeadSHA field if it's non-nil, zero value otherwise. GetID returns the ID field if it's non-nil, zero value otherwise. GetJobsURL returns the JobsURL field if it's non-nil, zero value otherwise. GetLogsURL returns the LogsURL field if it's non-nil, zero value otherwise. GetName returns the Name field if it's non-nil, zero value otherwise. GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. GetPath returns the Path field if it's non-nil, zero value otherwise. GetPreviousAttemptURL returns the PreviousAttemptURL field if it's non-nil, zero value otherwise. GetRepository returns the Repository field. GetRerunURL returns the RerunURL field if it's non-nil, zero value otherwise. GetRunAttempt returns the RunAttempt field if it's non-nil, zero value otherwise. GetRunNumber returns the RunNumber field if it's non-nil, zero value otherwise. GetRunStartedAt returns the RunStartedAt field if it's non-nil, zero value otherwise. GetStatus returns the Status field if it's non-nil, zero value otherwise. GetTriggeringActor returns the TriggeringActor field. GetURL returns the URL field if it's non-nil, zero value otherwise. GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. GetWorkflowID returns the WorkflowID field if it's non-nil, zero value otherwise. GetWorkflowURL returns the WorkflowURL field if it's non-nil, zero value otherwise.
func (*ActionsService).GetWorkflowRunAttempt(ctx context.Context, owner, repo string, runID int64, attemptNumber int, opts *WorkflowRunAttemptOptions) (*WorkflowRun, *Response, error)
func (*ActionsService).GetWorkflowRunByID(ctx context.Context, owner, repo string, runID int64) (*WorkflowRun, *Response, error)
func (*DeploymentEvent).GetWorkflowRun() *WorkflowRun
func (*DeploymentReviewEvent).GetWorkflowRun() *WorkflowRun
func (*WorkflowRunEvent).GetWorkflowRun() *WorkflowRun
WorkflowRunBill specifies billable time for a specific environment in a workflow run.JobRuns[]*WorkflowRunJobRunJobs*intTotalMS*int64 GetJobs returns the Jobs field if it's non-nil, zero value otherwise. GetTotalMS returns the TotalMS field if it's non-nil, zero value otherwise.
WorkflowRunBillMap represents different runner environments available for a workflow run.
Its key is the name of its environment, e.g. "UBUNTU", "MACOS", "WINDOWS", etc.
func (*WorkflowRunUsage).GetBillable() *WorkflowRunBillMap
WorkflowRunJobRun represents a usage of individual jobs of a specific workflow run.DurationMS*int64JobID*int GetDurationMS returns the DurationMS field if it's non-nil, zero value otherwise. GetJobID returns the JobID field if it's non-nil, zero value otherwise.
Bool is a helper routine that allocates a new bool value
to store v and returns a pointer to it.
CheckResponse checks the API response for errors, and returns them if
present. A response is considered an error if it has a status code outside
the 200 range or equal to 202 Accepted.
API error responses are expected to have response
body, and a JSON response body that maps to ErrorResponse.
The error type will be *RateLimitError for rate limit exceeded errors,
*AcceptedError for 202 Accepted status codes,
and *TwoFactorAuthError for two-factor authentication errors.
EventForType returns an empty struct matching the specified GitHub event type.
If messageType does not match any known event types, it returns nil.
GetRateLimitCategory returns the rate limit RateLimitCategory of the endpoint, determined by HTTP method and Request.URL.Path.
Int is a helper routine that allocates a new int value
to store v and returns a pointer to it.
Int64 is a helper routine that allocates a new int64 value
to store v and returns a pointer to it.
MessageTypes returns a sorted list of all the known GitHub event type strings
supported by go-github.
NewBranchNamePatternRule creates a rule to restrict branch patterns from being merged into matching branches.
NewClient returns a new GitHub API client. If a nil httpClient is
provided, a new http.Client will be used. To use API methods which require
authentication, either use Client.WithAuthToken or provide NewClient with
an http.Client that will perform the authentication for you (such as that
provided by the golang.org/x/oauth2 library).
NewClientWithEnvProxy enhances NewClient with the HttpProxy env.
NewCommitAuthorEmailPatternRule creates a rule to restrict commits with author email patterns being merged into matching branches.
NewCommitMessagePatternRule creates a rule to restrict commit message patterns being pushed to matching branches.
NewCommitterEmailPatternRule creates a rule to restrict commits with committer email patterns being merged into matching branches.
NewCreationRule creates a rule to only allow users with bypass permission to create matching refs.
NewDeletionRule creates a rule to only allow users with bypass permissions to delete matching refs.
NewEnterpriseClient returns a new GitHub API client with provided
base URL and upload URL (often is your GitHub Enterprise hostname).
Deprecated: Use NewClient(httpClient).WithEnterpriseURLs(baseURL, uploadURL) instead.
NewFileExtensionRestrictionRule creates a rule to restrict file extensions from being pushed to a commit.
NewFilePathRestrictionRule creates a rule to restrict file paths from being pushed to.
NewMaxFilePathLengthRule creates a rule to restrict file paths longer than the limit from being pushed.
NewMaxFileSizeRule creates a rule to restrict file sizes from being pushed to a commit.
NewMergeQueueRule creates a rule to only allow merges via a merge queue.
NewNonFastForwardRule creates a rule as part to prevent users with push access from force pushing to matching branches.
NewPullRequestRule creates a rule to require all commits be made to a non-target branch and submitted via a pull request before they can be merged.
NewRequiredDeploymentsRule creates a rule to require environments to be successfully deployed before they can be merged into the matching branches.
NewRequiredLinearHistoryRule creates a rule to prevent merge commits from being pushed to matching branches.
NewRequiredSignaturesRule creates a rule a to require commits pushed to matching branches to have verified signatures.
NewRequiredStatusChecksRule creates a rule to require which status checks must pass before branches can be merged into a branch rule.
NewRequiredWorkflowsRule creates a rule to require which status checks must pass before branches can be merged into a branch rule.
NewTagNamePatternRule creates a rule to restrict tag patterns contained in non-target branches from being merged into matching branches.
NewTokenClient returns a new GitHub API client authenticated with the provided token.
Deprecated: Use NewClient(nil).WithAuthToken(token) instead.
NewUpdateRule creates a rule to only allow users with bypass permission to update matching refs.
ParseWebHook parses the event payload. For recognized event types, a
value of the corresponding struct type will be returned (as returned
by Event.ParsePayload()). An error will be returned for unrecognized event
types.
Example usage:
func (s *GitHubEventMonitor) ServeHTTP(w http.ResponseWriter, r *http.Request) {
payload, err := github.ValidatePayload(r, s.webhookSecretKey)
if err != nil { ... }
event, err := github.ParseWebHook(github.WebHookType(r), payload)
if err != nil { ... }
switch event := event.(type) {
case *github.CommitCommentEvent:
processCommitCommentEvent(event)
case *github.CreateEvent:
processCreateEvent(event)
...
}
}
String is a helper routine that allocates a new string value
to store v and returns a pointer to it.
Stringify attempts to create a reasonable string representation of types in
the GitHub library. It does things like resolve pointers to their values
and omits struct fields with nil values.
ValidatePayload validates an incoming GitHub Webhook event request
and returns the (JSON) payload.
The Content-Type header of the payload can be "application/json" or "application/x-www-form-urlencoded".
If the Content-Type is neither then an error is returned.
secretToken is the GitHub Webhook secret token.
If your webhook does not contain a secret token, you can pass nil or an empty slice.
This is intended for local development purposes only and all webhooks should ideally set up a secret token.
Example usage:
func (s *GitHubEventMonitor) ServeHTTP(w http.ResponseWriter, r *http.Request) {
payload, err := github.ValidatePayload(r, s.webhookSecretKey)
if err != nil { ... }
// Process payload...
}
ValidatePayloadFromBody validates an incoming GitHub Webhook event request body
and returns the (JSON) payload.
The Content-Type header of the payload can be "application/json" or "application/x-www-form-urlencoded".
If the Content-Type is neither then an error is returned.
secretToken is the GitHub Webhook secret token.
If your webhook does not contain a secret token, you can pass an empty secretToken.
Webhooks without a secret token are not secure and should be avoided.
Example usage:
func (s *GitHubEventMonitor) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// read signature from request
signature := ""
payload, err := github.ValidatePayloadFromBody(r.Header.Get("Content-Type"), r.Body, signature, s.webhookSecretKey)
if err != nil { ... }
// Process payload...
}
ValidateSignature validates the signature for the given payload.
signature is the GitHub hash signature delivered in the X-Hub-Signature header.
payload is the JSON payload sent by GitHub Webhooks.
secretToken is the GitHub Webhook secret token.
GitHub API docs: https://developer.github.com/webhooks/securing/#validating-payloads-from-github
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.