+
Skip to content

Typo fix: Runer -> Runner #1892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 14, 2021
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
16 changes: 8 additions & 8 deletions github/actions_runner_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ func (s *ActionsService) RemoveRepositoryAccessRunnerGroup(ctx context.Context,
return s.client.Do(ctx, req, nil)
}

// ListRunerGroupRunners lists self-hosted runners that are in a specific organization group.
// ListRunnerGroupRunners lists self-hosted runners that are in a specific organization group.
//
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization
func (s *ActionsService) ListRunerGroupRunners(ctx context.Context, org string, groupID int64, opts *ListOptions) (*Runners, *Response, error) {
func (s *ActionsService) ListRunnerGroupRunners(ctx context.Context, org string, groupID int64, opts *ListOptions) (*Runners, *Response, error) {
u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/runners", org, groupID)
u, err := addOptions(u, opts)
if err != nil {
Expand All @@ -241,11 +241,11 @@ func (s *ActionsService) ListRunerGroupRunners(ctx context.Context, org string,
return runners, resp, nil
}

// SetRunerGroupRunners replaces the list of self-hosted runners that are part of an organization runner group
// SetRunnerGroupRunners replaces the list of self-hosted runners that are part of an organization runner group
// with a new list of runners.
//
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization
func (s *ActionsService) SetRunerGroupRunners(ctx context.Context, org string, groupID int64, ids SetRunnerGroupRunnersRequest) (*Response, error) {
func (s *ActionsService) SetRunnerGroupRunners(ctx context.Context, org string, groupID int64, ids SetRunnerGroupRunnersRequest) (*Response, error) {
u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/runners", org, groupID)

req, err := s.client.NewRequest("PUT", u, ids)
Expand All @@ -256,10 +256,10 @@ func (s *ActionsService) SetRunerGroupRunners(ctx context.Context, org string, g
return s.client.Do(ctx, req, nil)
}

// AddRunerGroupRunners adds a self-hosted runner to a runner group configured in an organization.
// AddRunnerGroupRunners adds a self-hosted runner to a runner group configured in an organization.
//
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization
func (s *ActionsService) AddRunerGroupRunners(ctx context.Context, org string, groupID, runnerID int64) (*Response, error) {
func (s *ActionsService) AddRunnerGroupRunners(ctx context.Context, org string, groupID, runnerID int64) (*Response, error) {
u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/runners/%v", org, groupID, runnerID)

req, err := s.client.NewRequest("PUT", u, nil)
Expand All @@ -270,11 +270,11 @@ func (s *ActionsService) AddRunerGroupRunners(ctx context.Context, org string, g
return s.client.Do(ctx, req, nil)
}

// RemoveRunerGroupRunners removes a self-hosted runner from a group configured in an organization.
// RemoveRunnerGroupRunners removes a self-hosted runner from a group configured in an organization.
// The runner is then returned to the default group.
//
// GitHub API docs: https://docs.github.com/en/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization
func (s *ActionsService) RemoveRunerGroupRunners(ctx context.Context, org string, groupID, runnerID int64) (*Response, error) {
func (s *ActionsService) RemoveRunnerGroupRunners(ctx context.Context, org string, groupID, runnerID int64) (*Response, error) {
u := fmt.Sprintf("orgs/%v/actions/runner-groups/%v/runners/%v", org, groupID, runnerID)

req, err := s.client.NewRequest("DELETE", u, nil)
Expand Down
50 changes: 25 additions & 25 deletions github/actions_runner_groups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ func TestActionsService_RemoveRepositoryAccessRunnerGroup(t *testing.T) {
})
}

func TestActionsService_ListRunerGroupRunners(t *testing.T) {
func TestActionsService_ListRunnerGroupRunners(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()

Expand All @@ -360,9 +360,9 @@ func TestActionsService_ListRunerGroupRunners(t *testing.T) {

opts := &ListOptions{Page: 2, PerPage: 2}
ctx := context.Background()
runners, _, err := client.Actions.ListRunerGroupRunners(ctx, "o", 2, opts)
runners, _, err := client.Actions.ListRunnerGroupRunners(ctx, "o", 2, opts)
if err != nil {
t.Errorf("Actions.ListRunerGroupRunners returned error: %v", err)
t.Errorf("Actions.ListRunnerGroupRunners returned error: %v", err)
}

want := &Runners{
Expand All @@ -373,25 +373,25 @@ func TestActionsService_ListRunerGroupRunners(t *testing.T) {
},
}
if !cmp.Equal(runners, want) {
t.Errorf("Actions.ListRunerGroupRunners returned %+v, want %+v", runners, want)
t.Errorf("Actions.ListRunnerGroupRunners returned %+v, want %+v", runners, want)
}

const methodName = "ListRunerGroupRunners"
const methodName = "ListRunnerGroupRunners"
testBadOptions(t, methodName, func() (err error) {
_, _, err = client.Actions.ListRunerGroupRunners(ctx, "\n", 2, opts)
_, _, err = client.Actions.ListRunnerGroupRunners(ctx, "\n", 2, opts)
return err
})

testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
got, resp, err := client.Actions.ListRunerGroupRunners(ctx, "o", 2, opts)
got, resp, err := client.Actions.ListRunnerGroupRunners(ctx, "o", 2, opts)
if got != nil {
t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
}
return resp, err
})
}

func TestActionsService_SetRunerGroupRunners(t *testing.T) {
func TestActionsService_SetRunnerGroupRunners(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()

Expand All @@ -407,23 +407,23 @@ func TestActionsService_SetRunerGroupRunners(t *testing.T) {
}

ctx := context.Background()
_, err := client.Actions.SetRunerGroupRunners(ctx, "o", 2, req)
_, err := client.Actions.SetRunnerGroupRunners(ctx, "o", 2, req)
if err != nil {
t.Errorf("Actions.SetRunerGroupRunners returned error: %v", err)
t.Errorf("Actions.SetRunnerGroupRunners returned error: %v", err)
}

const methodName = "SetRunerGroupRunners"
const methodName = "SetRunnerGroupRunners"
testBadOptions(t, methodName, func() (err error) {
_, err = client.Actions.SetRunerGroupRunners(ctx, "\n", 2, req)
_, err = client.Actions.SetRunnerGroupRunners(ctx, "\n", 2, req)
return err
})

testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
return client.Actions.SetRunerGroupRunners(ctx, "o", 2, req)
return client.Actions.SetRunnerGroupRunners(ctx, "o", 2, req)
})
}

func TestActionsService_AddRunerGroupRunners(t *testing.T) {
func TestActionsService_AddRunnerGroupRunners(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()

Expand All @@ -432,23 +432,23 @@ func TestActionsService_AddRunerGroupRunners(t *testing.T) {
})

ctx := context.Background()
_, err := client.Actions.AddRunerGroupRunners(ctx, "o", 2, 42)
_, err := client.Actions.AddRunnerGroupRunners(ctx, "o", 2, 42)
if err != nil {
t.Errorf("Actions.AddRunerGroupRunners returned error: %v", err)
t.Errorf("Actions.AddRunnerGroupRunners returned error: %v", err)
}

const methodName = "AddRunerGroupRunners"
const methodName = "AddRunnerGroupRunners"
testBadOptions(t, methodName, func() (err error) {
_, err = client.Actions.AddRunerGroupRunners(ctx, "\n", 2, 42)
_, err = client.Actions.AddRunnerGroupRunners(ctx, "\n", 2, 42)
return err
})

testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
return client.Actions.AddRunerGroupRunners(ctx, "o", 2, 42)
return client.Actions.AddRunnerGroupRunners(ctx, "o", 2, 42)
})
}

func TestActionsService_RemoveRunerGroupRunners(t *testing.T) {
func TestActionsService_RemoveRunnerGroupRunners(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()

Expand All @@ -457,18 +457,18 @@ func TestActionsService_RemoveRunerGroupRunners(t *testing.T) {
})

ctx := context.Background()
_, err := client.Actions.RemoveRunerGroupRunners(ctx, "o", 2, 42)
_, err := client.Actions.RemoveRunnerGroupRunners(ctx, "o", 2, 42)
if err != nil {
t.Errorf("Actions.RemoveRunerGroupRunners returned error: %v", err)
t.Errorf("Actions.RemoveRunnerGroupRunners returned error: %v", err)
}

const methodName = "RemoveRunerGroupRunners"
const methodName = "RemoveRunnerGroupRunners"
testBadOptions(t, methodName, func() (err error) {
_, err = client.Actions.RemoveRunerGroupRunners(ctx, "\n", 2, 42)
_, err = client.Actions.RemoveRunnerGroupRunners(ctx, "\n", 2, 42)
return err
})

testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
return client.Actions.RemoveRunerGroupRunners(ctx, "o", 2, 42)
return client.Actions.RemoveRunnerGroupRunners(ctx, "o", 2, 42)
})
}
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载