Skip to content

Commit 5bf78f8

Browse files
Rename function parameters to match usage as url parameters (#3078)
1 parent a79e405 commit 5bf78f8

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

github/actions_runners.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ type JITRunnerConfig struct {
6363
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runners#create-configuration-for-a-just-in-time-runner-for-an-organization
6464
//
6565
//meta:operation POST /orgs/{org}/actions/runners/generate-jitconfig
66-
func (s *ActionsService) GenerateOrgJITConfig(ctx context.Context, owner string, request *GenerateJITConfigRequest) (*JITRunnerConfig, *Response, error) {
67-
u := fmt.Sprintf("orgs/%v/actions/runners/generate-jitconfig", owner)
66+
func (s *ActionsService) GenerateOrgJITConfig(ctx context.Context, org string, request *GenerateJITConfigRequest) (*JITRunnerConfig, *Response, error) {
67+
u := fmt.Sprintf("orgs/%v/actions/runners/generate-jitconfig", org)
6868
req, err := s.client.NewRequest("POST", u, request)
6969
if err != nil {
7070
return nil, nil, err
@@ -247,8 +247,8 @@ func (s *ActionsService) RemoveRunner(ctx context.Context, owner, repo string, r
247247
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runners#list-runner-applications-for-an-organization
248248
//
249249
//meta:operation GET /orgs/{org}/actions/runners/downloads
250-
func (s *ActionsService) ListOrganizationRunnerApplicationDownloads(ctx context.Context, owner string) ([]*RunnerApplicationDownload, *Response, error) {
251-
u := fmt.Sprintf("orgs/%v/actions/runners/downloads", owner)
250+
func (s *ActionsService) ListOrganizationRunnerApplicationDownloads(ctx context.Context, org string) ([]*RunnerApplicationDownload, *Response, error) {
251+
u := fmt.Sprintf("orgs/%v/actions/runners/downloads", org)
252252
req, err := s.client.NewRequest("GET", u, nil)
253253
if err != nil {
254254
return nil, nil, err
@@ -268,8 +268,8 @@ func (s *ActionsService) ListOrganizationRunnerApplicationDownloads(ctx context.
268268
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runners#create-a-registration-token-for-an-organization
269269
//
270270
//meta:operation POST /orgs/{org}/actions/runners/registration-token
271-
func (s *ActionsService) CreateOrganizationRegistrationToken(ctx context.Context, owner string) (*RegistrationToken, *Response, error) {
272-
u := fmt.Sprintf("orgs/%v/actions/runners/registration-token", owner)
271+
func (s *ActionsService) CreateOrganizationRegistrationToken(ctx context.Context, org string) (*RegistrationToken, *Response, error) {
272+
u := fmt.Sprintf("orgs/%v/actions/runners/registration-token", org)
273273

274274
req, err := s.client.NewRequest("POST", u, nil)
275275
if err != nil {
@@ -290,8 +290,8 @@ func (s *ActionsService) CreateOrganizationRegistrationToken(ctx context.Context
290290
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runners#list-self-hosted-runners-for-an-organization
291291
//
292292
//meta:operation GET /orgs/{org}/actions/runners
293-
func (s *ActionsService) ListOrganizationRunners(ctx context.Context, owner string, opts *ListOptions) (*Runners, *Response, error) {
294-
u := fmt.Sprintf("orgs/%v/actions/runners", owner)
293+
func (s *ActionsService) ListOrganizationRunners(ctx context.Context, org string, opts *ListOptions) (*Runners, *Response, error) {
294+
u := fmt.Sprintf("orgs/%v/actions/runners", org)
295295
u, err := addOptions(u, opts)
296296
if err != nil {
297297
return nil, nil, err
@@ -316,8 +316,8 @@ func (s *ActionsService) ListOrganizationRunners(ctx context.Context, owner stri
316316
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runners#get-a-self-hosted-runner-for-an-organization
317317
//
318318
//meta:operation GET /orgs/{org}/actions/runners/{runner_id}
319-
func (s *ActionsService) GetOrganizationRunner(ctx context.Context, owner string, runnerID int64) (*Runner, *Response, error) {
320-
u := fmt.Sprintf("orgs/%v/actions/runners/%v", owner, runnerID)
319+
func (s *ActionsService) GetOrganizationRunner(ctx context.Context, org string, runnerID int64) (*Runner, *Response, error) {
320+
u := fmt.Sprintf("orgs/%v/actions/runners/%v", org, runnerID)
321321
req, err := s.client.NewRequest("GET", u, nil)
322322
if err != nil {
323323
return nil, nil, err
@@ -337,8 +337,8 @@ func (s *ActionsService) GetOrganizationRunner(ctx context.Context, owner string
337337
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runners#create-a-remove-token-for-an-organization
338338
//
339339
//meta:operation POST /orgs/{org}/actions/runners/remove-token
340-
func (s *ActionsService) CreateOrganizationRemoveToken(ctx context.Context, owner string) (*RemoveToken, *Response, error) {
341-
u := fmt.Sprintf("orgs/%v/actions/runners/remove-token", owner)
340+
func (s *ActionsService) CreateOrganizationRemoveToken(ctx context.Context, org string) (*RemoveToken, *Response, error) {
341+
u := fmt.Sprintf("orgs/%v/actions/runners/remove-token", org)
342342

343343
req, err := s.client.NewRequest("POST", u, nil)
344344
if err != nil {
@@ -359,8 +359,8 @@ func (s *ActionsService) CreateOrganizationRemoveToken(ctx context.Context, owne
359359
// GitHub API docs: https://docs.github.com/rest/actions/self-hosted-runners#delete-a-self-hosted-runner-from-an-organization
360360
//
361361
//meta:operation DELETE /orgs/{org}/actions/runners/{runner_id}
362-
func (s *ActionsService) RemoveOrganizationRunner(ctx context.Context, owner string, runnerID int64) (*Response, error) {
363-
u := fmt.Sprintf("orgs/%v/actions/runners/%v", owner, runnerID)
362+
func (s *ActionsService) RemoveOrganizationRunner(ctx context.Context, org string, runnerID int64) (*Response, error) {
363+
u := fmt.Sprintf("orgs/%v/actions/runners/%v", org, runnerID)
364364

365365
req, err := s.client.NewRequest("DELETE", u, nil)
366366
if err != nil {

0 commit comments

Comments
 (0)