Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion github/actions_workflow_runs.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func (s *ActionsService) getWorkflowRunAttemptLogsWithRateLimit(ctx context.Cont
}

// RerunWorkflowByID re-runs a workflow by ID.
// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID a the DeploymentProtectionRuleEvent.
// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID of a DeploymentProtectionRuleEvent.
//
// GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#re-run-a-workflow
//
Expand Down
2 changes: 1 addition & 1 deletion github/activity_star.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type ActivityListStarredOptions struct {
Sort string `url:"sort,omitempty"`

// Direction in which to sort repositories. Possible values are: asc, desc.
// Default is "asc" when sort is "full_name", otherwise default is "desc".
// Default is "asc" when sort is "full_name"; otherwise, default is "desc".
Direction string `url:"direction,omitempty"`

ListOptions
Expand Down
6 changes: 3 additions & 3 deletions github/billing.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ type PremiumRequestUsageReportOptions struct {
// If no year or month is specified, the default year and month are used.
Day *int `url:"day,omitempty"`

// The user name to query usage for. The name is not case sensitive.
// The user name to query usage for. The name is not case-sensitive.
User *string `url:"user,omitempty"`

// The model name to query usage for. The name is not case sensitive.
// The model name to query usage for. The name is not case-sensitive.
Model *string `url:"model,omitempty"`

// The product name to query usage for. The name is not case sensitive.
// The product name to query usage for. The name is not case-sensitive.
Product *string `url:"product,omitempty"`
}

Expand Down
2 changes: 1 addition & 1 deletion github/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ For more sample code snippets, head over to the https://github.com/google/go-git

# Authentication

Use [Client.WithAuthToken] to configure your client to authenticate using an Oauth token
Use [Client.WithAuthToken] to configure your client to authenticate using an OAuth token
(for example, a personal access token). This is what is needed for a majority of use cases
aside from GitHub Apps.

Expand Down
2 changes: 1 addition & 1 deletion github/enterprise_actions_runners.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (s *EnterpriseService) CreateRegistrationToken(ctx context.Context, enterpr
return registrationToken, resp, nil
}

// ListRunners lists all the self-hosted runners for a enterprise.
// ListRunners lists all the self-hosted runners for an enterprise.
//
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/actions/self-hosted-runners#list-self-hosted-runners-for-an-enterprise
//
Expand Down
2 changes: 1 addition & 1 deletion github/enterprise_network_configurations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ func TestEnterpriseService_GetEnterpriseNetworkSettingsResource(t *testing.T) {
Region: Ptr("germanywestcentral"),
}
if !cmp.Equal(resource, want) {
t.Errorf("Enterprise.GetEnterpriseNetworkSettingsResource mistach (-want +got):\n%v", cmp.Diff(want, resource))
t.Errorf("Enterprise.GetEnterpriseNetworkSettingsResource mismatch (-want +got):\n%v", cmp.Diff(want, resource))
}

const methodName = "GetEnterpriseNetworkSettingsResource"
Expand Down
6 changes: 3 additions & 3 deletions github/event_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ type DeploymentProtectionRuleEvent struct {
Environment *string `json:"environment,omitempty"`
Event *string `json:"event,omitempty"`

// The URL Github provides for a third-party to use in order to pass/fail a deployment gate
// The URL GitHub provides for a third-party to use in order to pass/fail a deployment gate
DeploymentCallbackURL *string `json:"deployment_callback_url,omitempty"`
Deployment *Deployment `json:"deployment,omitempty"`
Repo *Repository `json:"repository,omitempty"`
Expand Down Expand Up @@ -859,7 +859,7 @@ type MergeGroup struct {
HeadRef *string `json:"head_ref,omitempty"`
// The SHA of the merge group's parent commit.
BaseSHA *string `json:"base_sha,omitempty"`
// The full ref of the branch the merge group will be merged into.
// The full ref of the branch into which the merge group will be merged.
BaseRef *string `json:"base_ref,omitempty"`
// An expanded representation of the head_sha commit.
HeadCommit *Commit `json:"head_commit,omitempty"`
Expand Down Expand Up @@ -1845,7 +1845,7 @@ type WatchEvent struct {
}

// WorkflowDispatchEvent is triggered when someone triggers a workflow run on GitHub or
// sends a POST request to the create a workflow dispatch event endpoint.
// sends a POST request to the endpoint to create a workflow dispatch event.
//
// GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch
type WorkflowDispatchEvent struct {
Expand Down
4 changes: 2 additions & 2 deletions github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ const (

// bareDo sends an API request using `caller` http.Client passed in the parameters
// 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
// 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.
//
Expand Down Expand Up @@ -967,7 +967,7 @@ func (c *Client) bareDo(ctx context.Context, caller *http.Client, req *http.Requ
}

// 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
// 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.
Expand Down
2 changes: 1 addition & 1 deletion github/orgs_members.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ type ListMembersOptions struct {

// ListMembers lists the members for an organization. If the authenticated
// user is an owner of the organization, this will return both concealed and
// public members, otherwise it will only return public members.
// public members; otherwise, it will only return public members.
//
// GitHub API docs: https://docs.github.com/rest/orgs/members#list-organization-members
// GitHub API docs: https://docs.github.com/rest/orgs/members#list-public-organization-members
Expand Down
2 changes: 1 addition & 1 deletion github/packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func (mt PackageEventContainerMetadataTag) String() string {

// PackageNugetMetadata represents nuget metadata for a GitHub package.
type PackageNugetMetadata struct {
ID json.RawMessage `json:"id,omitempty"` // Can either be a int64 or string
ID json.RawMessage `json:"id,omitempty"` // Can either be an int64 or string
Name *string `json:"name,omitempty"`
Value json.RawMessage `json:"value,omitempty"` // Can either be a bool, string, integer or object
}
Expand Down
8 changes: 4 additions & 4 deletions github/private_registries_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestPrivateRegistriesService_ListOrganizationPrivateRegistries(t *testing.T
ctx := t.Context()
privateRegistries, _, err := client.PrivateRegistries.ListOrganizationPrivateRegistries(ctx, "o", opts)
if err != nil {
t.Fatalf("PrivateRegistries.ListOrganizationPrivateRegitries returned error: %v", err)
t.Fatalf("PrivateRegistries.ListOrganizationPrivateRegistries returned error: %v", err)
}

want := &PrivateRegistries{
Expand All @@ -61,7 +61,7 @@ func TestPrivateRegistriesService_ListOrganizationPrivateRegistries(t *testing.T
},
}
if diff := cmp.Diff(want, privateRegistries); diff != "" {
t.Errorf("PrivateRegistries.ListOrganizationPrivateRegitries mismatch (-want +got):\\n%v", diff)
t.Errorf("PrivateRegistries.ListOrganizationPrivateRegistries mismatch (-want +got):\\n%v", diff)
}

const methodName = "ListOrganizationPrivateRegistries"
Expand Down Expand Up @@ -121,7 +121,7 @@ func TestPrivateRegistriesService_CreateOrganizationPrivateRegistry(t *testing.T
ctx := t.Context()
privateRegistry, _, err := client.PrivateRegistries.CreateOrganizationPrivateRegistry(ctx, "o", *input)
if err != nil {
t.Fatalf("PrivateRegistries.CreateOrganizationPrivateRegitries returned error: %v", err)
t.Fatalf("PrivateRegistries.CreateOrganizationPrivateRegistries returned error: %v", err)
}

want := &PrivateRegistry{
Expand All @@ -133,7 +133,7 @@ func TestPrivateRegistriesService_CreateOrganizationPrivateRegistry(t *testing.T
Visibility: Ptr(PrivateRegistryVisibilitySelected),
}
if diff := cmp.Diff(want, privateRegistry); diff != "" {
t.Errorf("PrivateRegistries.CreateOrganizationPrivateRegitries mismatch (-want +got):\\n%v", diff)
t.Errorf("PrivateRegistries.CreateOrganizationPrivateRegistries mismatch (-want +got):\\n%v", diff)
}

const methodName = "CreateOrganizationPrivateRegistry"
Expand Down
2 changes: 1 addition & 1 deletion github/pulls.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ type PullRequestListOptions struct {
Sort string `url:"sort,omitempty"`

// Direction in which to sort pull requests. Possible values are: asc, desc.
// If Sort is "created" or not specified, Default is "desc", otherwise Default
// If Sort is "created" or not specified, Default is "desc"; otherwise, Default
// is "asc"
Direction string `url:"direction,omitempty"`

Expand Down
4 changes: 2 additions & 2 deletions github/repos.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ type RepositoryListByUserOptions struct {
Sort string `url:"sort,omitempty"`

// The order to sort by.
// Default: asc when using full_name, otherwise desc.
// Default: asc when using full_name; otherwise, desc.
// Can be one of: asc, desc
Direction string `url:"direction,omitempty"`

Expand Down Expand Up @@ -1206,7 +1206,7 @@ type ProtectionRequest struct {
AllowForkSyncing *bool `json:"allow_fork_syncing,omitempty"`
}

// RequiredStatusChecks represents the protection status of a individual branch.
// RequiredStatusChecks represents the protection status of an individual branch.
type RequiredStatusChecks struct {
// Require branches to be up to date before merging. (Required.)
Strict bool `json:"strict"`
Expand Down
2 changes: 1 addition & 1 deletion github/repos_autolinks.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type AutolinkOptions struct {
IsAlphanumeric *bool `json:"is_alphanumeric,omitempty"`
}

// Autolink represents autolinks to external resources like JIRA issues and Zendesk tickets.
// Autolink represents autolinks to external resources like Jira issues and Zendesk tickets.
type Autolink struct {
ID *int64 `json:"id,omitempty"`
KeyPrefix *string `json:"key_prefix,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion github/repos_collaborators.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ type RepositoryAddCollaboratorOptions struct {
// 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
// push - team members can push and pull, 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.
Expand Down
2 changes: 1 addition & 1 deletion github/repos_hooks_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type HookConfig struct {
// Possible values are `json` and `form`, the field is not specified the default is `form`
ContentType *string `json:"content_type,omitempty"`
// The possible values are 0 and 1.
// Setting it to 1 will allow skip certificate verification for the host,
// Setting it to 1 will allow skipping certificate verification for the host,
// potentially exposing to MitM attacks: https://en.wikipedia.org/wiki/Man-in-the-middle_attack
InsecureSSL *string `json:"insecure_ssl,omitempty"`
URL *string `json:"url,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion github/repos_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (s *RepositoriesService) ListCodeFrequency(ctx context.Context, owner, repo

// 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.
// as well as the number of commits by the owner themselves.
type RepositoryParticipation struct {
All []int `json:"all,omitempty"`
Owner []int `json:"owner,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion github/secret_scanning_pattern_configs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ func TestSecretScanningProviderPatternSetting_Marshal(t *testing.T) {
testJSONMarshal(t, v, want)
}

func TestSecretScanninCustomPatternSetting_Marshal(t *testing.T) {
func TestSecretScanningCustomPatternSetting_Marshal(t *testing.T) {
t.Parallel()
testJSONMarshal(t, &SecretScanningCustomPatternSetting{}, `{}`)

Expand Down
2 changes: 1 addition & 1 deletion github/teams.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ type TeamAddTeamRepoOptions struct {
// Permission specifies the permission to grant the team 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
// push - team members can push and pull, 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.
Expand Down
2 changes: 1 addition & 1 deletion github/users_administration.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (s *UsersService) DemoteSiteAdmin(ctx context.Context, user string) (*Respo
return s.client.Do(ctx, req, nil)
}

// UserSuspendOptions represents the reason a user is being suspended.
// UserSuspendOptions represents the reason to suspend a user.
type UserSuspendOptions struct {
Reason *string `json:"reason,omitempty"`
}
Expand Down
2 changes: 1 addition & 1 deletion scrape/scrape_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"testing"
)

// setup a test HTTP server along with a scrape.Client that is configured to
// set up a test HTTP server along with a scrape.Client that is configured to
// talk to that test server. Tests should register handlers on the mux which
// provide mock responses for the GitHub pages being tested.
func setup(t *testing.T) (client *Client, mux *http.ServeMux) {
Expand Down
4 changes: 2 additions & 2 deletions test/integration/authorizations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestAuthorizationsAppOperations(t *testing.T) {
t.Fatal("The returned auth/token does not match.")
}

// Let's verify that we get a 404 for a non-existent token
// Let's verify that we get a 404 for a nonexistent token
_, resp, err = appAuthenticatedClient.Authorizations.Check(t.Context(), clientID, InvalidTokenValue)
if err == nil {
t.Fatal("An error should have been returned because of the invalid token.")
Expand All @@ -56,7 +56,7 @@ func TestAuthorizationsAppOperations(t *testing.T) {
failOnError(t, err)
failIfNotStatusCode(t, resp, 200)

// Let's verify that we get a 404 for a non-existent token
// Let's verify that we get a 404 for a nonexistent token
_, resp, err = appAuthenticatedClient.Authorizations.Reset(t.Context(), clientID, InvalidTokenValue)
if err == nil {
t.Fatal("An error should have been returned because of the invalid token.")
Expand Down
2 changes: 1 addition & 1 deletion test/integration/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func createRandomTestRepository(t *testing.T, owner string, autoinit bool) *gith
_, resp, err := client.Repositories.Get(t.Context(), owner, repoName)
if err != nil {
if resp.StatusCode == http.StatusNotFound {
// found a non-existent repo, perfect
// found a nonexistent repo, perfect
break
}

Expand Down
Loading