Skip to content

feat: Add support for Issue Types API #3525

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 20 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ff58ec2
feat(actions): add support for GitHub-hosted runner API endpoints
atilsensalduz Feb 20, 2025
b2f14c8
feat(actions): add support for GitHub-hosted runner API endpoints
atilsensalduz Feb 20, 2025
5da58b1
feat(actions): add support for GitHub-hosted runner API endpoints
atilsensalduz Feb 21, 2025
0b1dc04
feat(actions): add support for GitHub-hosted runner API endpoints
atilsensalduz Feb 21, 2025
f4ab50f
feat(actions): add support for GitHub-hosted runner API endpoints
atilsensalduz Feb 21, 2025
9b50e82
feat(actions): add support for GitHub-hosted runner API endpoints
atilsensalduz Feb 21, 2025
4f5c3ec
feat(actions): add support for GitHub-hosted runner API endpoints
atilsensalduz Feb 21, 2025
6ecf469
feat: Refactor hosted runner request handling: Use shared struct and …
atilsensalduz Feb 25, 2025
5167f45
feat: Refactor hosted runner request handling: Use shared struct and …
atilsensalduz Feb 25, 2025
65910b7
feat: Refactor hosted runner request handling: Use shared struct and …
atilsensalduz Feb 25, 2025
22d4aba
refactor: improve error handling by preserving the original error con…
atilsensalduz Feb 26, 2025
a2199bb
refactor: improve error handling by preserving the original error con…
atilsensalduz Feb 26, 2025
69acb87
Merge branch 'google:master' into master
atilsensalduz Mar 19, 2025
56f4c18
feat: add support for Issue Types API
atilsensalduz Mar 20, 2025
cca495e
feat: add support for Issue Types API
atilsensalduz Mar 20, 2025
15b891e
feat: add support for Issue Types API
atilsensalduz Mar 20, 2025
f605f76
feat: add support for Issue Types API
atilsensalduz Mar 20, 2025
72f1988
Merge branch 'master' into add-issue-type
atilsensalduz Mar 20, 2025
d39244c
feat: add support for Issue Types API
atilsensalduz Mar 20, 2025
8a6fa7d
feat: add support for Issue Types API
atilsensalduz Mar 20, 2025
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
Prev Previous commit
Next Next commit
feat(actions): add support for GitHub-hosted runner API endpoints
Implement new methods for managing GitHub-hosted runners,
including functionalities for creating, updating, deleting, and
retrieving details about hosted runners.

References:
- GitHub REST API: https://docs.github.com/en/rest/actions/hosted-runners

Signed-off-by: atilsensalduz <[email protected]>
  • Loading branch information
atilsensalduz committed Feb 21, 2025
commit f4ab50fca0f5c91423c8cd319fcb1e35d65c4918
14 changes: 7 additions & 7 deletions github/actions_hosted_runners_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestActionsService_ListHostedRunners(t *testing.T) {
"platform": "linux-x64",
"image": {
"id": "ubuntu-20.04",
"size": 86
"size_gb": 86
},
"machine_size_details": {
"id": "4-core",
Expand All @@ -58,7 +58,7 @@ func TestActionsService_ListHostedRunners(t *testing.T) {
"platform": "win-x64",
"image": {
"id": "windows-latest",
"size": 256
"size_gb": 256
},
"machine_size_details": {
"id": "8-core",
Expand Down Expand Up @@ -121,7 +121,7 @@ func TestActionsService_ListHostedRunners(t *testing.T) {
Platform: Ptr("win-x64"),
Image: &HostedRunnerImageDetail{
ID: Ptr("windows-latest"),
SizeGB: Ptr(int64(86)),
SizeGB: Ptr(int64(256)),
},
MachineSizeDetails: &HostedRunnerMachineSpec{
ID: "8-core",
Expand Down Expand Up @@ -169,7 +169,7 @@ func TestActionsService_CreateHostedRunner(t *testing.T) {
"platform": "linux-x64",
"image": {
"id": "ubuntu-20.04",
"size": 86
"size_gb": 86
},
"machine_size_details": {
"id": "4-core",
Expand Down Expand Up @@ -534,7 +534,7 @@ func TestActionsService_GetHostedRunner(t *testing.T) {
"platform": "linux-x64",
"image": {
"id": "ubuntu-20.04",
"size": 86
"size_gb": 86
},
"machine_size_details": {
"id": "4-core",
Expand Down Expand Up @@ -623,7 +623,7 @@ func TestActionsService_UpdateHostedRunner(t *testing.T) {
"platform": "linux-x64",
"image": {
"id": "ubuntu-20.04",
"size": 86
"size_gb": 86
},
"machine_size_details": {
"id": "4-core",
Expand Down Expand Up @@ -719,7 +719,7 @@ func TestActionsService_DeleteHostedRunner(t *testing.T) {
"platform": "linux-x64",
"image": {
"id": "ubuntu-20.04",
"size": 86
"size_gb": 86
},
"machine_size_details": {
"id": "4-core",
Expand Down
35 changes: 17 additions & 18 deletions github/enterprise_actions_hosted_runners_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestEnterpriseService_ListHostedRunners(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/hosted-runners", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/hosted-runners", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
fmt.Fprint(w, `{
"total_count": 2,
Expand All @@ -31,7 +31,7 @@ func TestEnterpriseService_ListHostedRunners(t *testing.T) {
"platform": "linux-x64",
"image": {
"id": "ubuntu-20.04",
"size": 86
"size_gb": 86
},
"machine_size_details": {
"id": "4-core",
Expand All @@ -58,7 +58,7 @@ func TestEnterpriseService_ListHostedRunners(t *testing.T) {
"platform": "win-x64",
"image": {
"id": "windows-latest",
"size": 256
"size_gb": 256
},
"machine_size_details": {
"id": "8-core",
Expand Down Expand Up @@ -121,7 +121,7 @@ func TestEnterpriseService_ListHostedRunners(t *testing.T) {
Platform: Ptr("win-x64"),
Image: &HostedRunnerImageDetail{
ID: Ptr("windows-latest"),
SizeGB: Ptr(int64(86)),
SizeGB: Ptr(int64(256)),
},
MachineSizeDetails: &HostedRunnerMachineSpec{
ID: "8-core",
Expand Down Expand Up @@ -160,7 +160,7 @@ func TestEnterpriseService_CreateHostedRunner(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/hosted-runners", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/hosted-runners", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "POST")
fmt.Fprint(w, `{
"id": 5,
Expand All @@ -169,7 +169,7 @@ func TestEnterpriseService_CreateHostedRunner(t *testing.T) {
"platform": "linux-x64",
"image": {
"id": "ubuntu-20.04",
"size": 86
"size_gb": 86
},
"machine_size_details": {
"id": "4-core",
Expand Down Expand Up @@ -261,7 +261,7 @@ func TestEnterpriseService_GetHostedRunnerGithubOwnedImages(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/hosted-runners/images/github-owned", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/hosted-runners/images/github-owned", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
fmt.Fprint(w, `{
"total_count": 1,
Expand Down Expand Up @@ -319,7 +319,7 @@ func TestEnterpriseService_GetHostedRunnerPartnerImages(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/hosted-runners/images/partner", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/hosted-runners/images/partner", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
fmt.Fprint(w, `{
"total_count": 1,
Expand Down Expand Up @@ -376,8 +376,7 @@ func TestEnterpriseService_GetHostedRunnerPartnerImages(t *testing.T) {
func TestEnterpriseService_GetHostedRunnerLimits(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/hosted-runners/limits", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/hosted-runners/limits", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
fmt.Fprint(w, `{
"public_ips": {
Expand Down Expand Up @@ -423,7 +422,7 @@ func TestEnterpriseService_GetHostedRunnerMachineSpecs(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/hosted-runners/machine-sizes", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/hosted-runners/machine-sizes", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
fmt.Fprint(w, `{
"total_count": 1,
Expand Down Expand Up @@ -478,7 +477,7 @@ func TestEnterpriseService_GetHostedRunnerPlatforms(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/hosted-runners/platforms", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/hosted-runners/platforms", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
fmt.Fprint(w, `{
"total_count": 1,
Expand Down Expand Up @@ -525,7 +524,7 @@ func TestEnterpriseService_GetHostedRunner(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/hosted-runners/23", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/hosted-runners/23", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
fmt.Fprint(w, `{
"id": 5,
Expand All @@ -534,7 +533,7 @@ func TestEnterpriseService_GetHostedRunner(t *testing.T) {
"platform": "linux-x64",
"image": {
"id": "ubuntu-20.04",
"size": 86
"size_gb": 86
},
"machine_size_details": {
"id": "4-core",
Expand Down Expand Up @@ -614,7 +613,7 @@ func TestEnterpriseService_UpdateHostedRunner(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/hosted-runners/23", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/hosted-runners/23", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "PATCH")
fmt.Fprint(w, `{
"id": 5,
Expand All @@ -623,7 +622,7 @@ func TestEnterpriseService_UpdateHostedRunner(t *testing.T) {
"platform": "linux-x64",
"image": {
"id": "ubuntu-20.04",
"size": 86
"size_gb": 86
},
"machine_size_details": {
"id": "4-core",
Expand Down Expand Up @@ -710,7 +709,7 @@ func TestEnterpriseService_DeleteHostedRunner(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/hosted-runners/23", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/hosted-runners/23", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "DELETE")
fmt.Fprint(w, `{
"id": 5,
Expand All @@ -719,7 +718,7 @@ func TestEnterpriseService_DeleteHostedRunner(t *testing.T) {
"platform": "linux-x64",
"image": {
"id": "ubuntu-20.04",
"size": 86
"size_gb": 86
},
"machine_size_details": {
"id": "4-core",
Expand Down
28 changes: 14 additions & 14 deletions github/enterprise_actions_runner_groups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestEnterpriseService_ListRunnerGroups(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/runner-groups", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/runner-groups", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
testFormValues(t, r, values{"per_page": "2", "page": "2"})
fmt.Fprint(w, `{"total_count":3,"runner_groups":[{"id":1,"name":"Default","visibility":"all","default":true,"runners_url":"https://api.github.com/enterprises/octo-enterprise/actions/runner_groups/1/runners","inherited":false,"allows_public_repositories":true,"restricted_to_workflows":true,"selected_workflows":["a","b"]},{"id":2,"name":"octo-runner-group","visibility":"selected","default":false,"selected_organizations_url":"https://api.github.com/enterprises/octo-enterprise/actions/runner_groups/2/organizations","runners_url":"https://api.github.com/enterprises/octo-enterprise/actions/runner_groups/2/runners","inherited":true,"allows_public_repositories":true,"restricted_to_workflows":false,"selected_workflows":[]},{"id":3,"name":"expensive-hardware","visibility":"private","default":false,"runners_url":"https://api.github.com/enterprises/octo-enterprise/actions/runner_groups/3/runners","inherited":false,"allows_public_repositories":true,"restricted_to_workflows":false,"selected_workflows":[]}]}`)
Expand Down Expand Up @@ -62,7 +62,7 @@ func TestEnterpriseService_ListRunnerGroupsVisibleToOrganization(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/runner-groups", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/runner-groups", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
testFormValues(t, r, values{"per_page": "2", "page": "2", "visible_to_organization": "github"})
fmt.Fprint(w, `{"total_count":3,"runner_groups":[{"id":1,"name":"Default","visibility":"all","default":true,"runners_url":"https://api.github.com/enterprises/octo-enterprise/actions/runner_groups/1/runners","inherited":false,"allows_public_repositories":true,"restricted_to_workflows":false,"selected_workflows":[]},{"id":2,"name":"octo-runner-group","visibility":"selected","default":false,"selected_organizations_url":"https://api.github.com/enterprises/octo-enterprise/actions/runner_groups/2/organizations","runners_url":"https://api.github.com/enterprises/octo-enterprise/actions/runner_groups/2/runners","inherited":true,"allows_public_repositories":true,"restricted_to_workflows":false,"selected_workflows":[]},{"id":3,"name":"expensive-hardware","visibility":"private","default":false,"runners_url":"https://api.github.com/enterprises/octo-enterprise/actions/runner_groups/3/runners","inherited":false,"allows_public_repositories":true,"restricted_to_workflows":false,"selected_workflows":[]}]}`)
Expand Down Expand Up @@ -106,7 +106,7 @@ func TestEnterpriseService_GetRunnerGroup(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/runner-groups/2", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/runner-groups/2", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
fmt.Fprint(w, `{"id":2,"name":"octo-runner-group","visibility":"selected","default":false,"selected_organizations_url":"https://api.github.com/enterprises/octo-enterprise/actions/runner_groups/2/organizations","runners_url":"https://api.github.com/enterprises/octo-enterprise/actions/runner_groups/2/runners","inherited":false,"allows_public_repositories":true,"restricted_to_workflows":false,"selected_workflows":[]}`)
})
Expand Down Expand Up @@ -153,7 +153,7 @@ func TestEnterpriseService_DeleteRunnerGroup(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/runner-groups/2", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/runner-groups/2", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "DELETE")
})

Expand All @@ -178,7 +178,7 @@ func TestEnterpriseService_CreateRunnerGroup(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/runner-groups", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/runner-groups", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "POST")
fmt.Fprint(w, `{"id":2,"name":"octo-runner-group","visibility":"selected","default":false,"selected_organizations_url":"https://api.github.com/enterprises/octo-enterprise/actions/runner_groups/2/organizations","runners_url":"https://api.github.com/enterprises/octo-enterprise/actions/runner_groups/2/runners","inherited":false,"allows_public_repositories":true,"restricted_to_workflows":false,"selected_workflows":[]}`)
})
Expand Down Expand Up @@ -232,7 +232,7 @@ func TestEnterpriseService_UpdateRunnerGroup(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/runner-groups/2", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/runner-groups/2", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "PATCH")
fmt.Fprint(w, `{"id":2,"name":"octo-runner-group","visibility":"selected","default":false,"selected_organizations_url":"https://api.github.com/enterprises/octo-enterprise/actions/runner_groups/2/organizations","runners_url":"https://api.github.com/enterprises/octo-enterprise/actions/runner_groups/2/runners","inherited":false,"allows_public_repositories":true,"restricted_to_workflows":false,"selected_workflows":[]}`)
})
Expand Down Expand Up @@ -286,7 +286,7 @@ func TestEnterpriseService_ListOrganizationAccessRunnerGroup(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/runner-groups/2/organizations", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/runner-groups/2/organizations", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
testFormValues(t, r, values{"per_page": "1", "page": "1"})
fmt.Fprint(w, `{"total_count": 1, "organizations": [{"id": 43, "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", "name": "Hello-World", "login": "octocat"}]}`)
Expand Down Expand Up @@ -328,7 +328,7 @@ func TestEnterpriseService_SetOrganizationAccessRunnerGroup(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/runner-groups/2/organizations", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/runner-groups/2/organizations", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "PUT")
})

Expand Down Expand Up @@ -360,7 +360,7 @@ func TestEnterpriseService_AddOrganizationAccessRunnerGroup(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/runner-groups/2/organizations/42", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/runner-groups/2/organizations/42", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "PUT")
})

Expand All @@ -385,7 +385,7 @@ func TestEnterpriseService_RemoveOrganizationAccessRunnerGroup(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/runner-groups/2/organizations/42", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/runner-groups/2/organizations/42", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "DELETE")
})

Expand All @@ -410,7 +410,7 @@ func TestEnterpriseService_ListEnterpriseRunnerGroupRunners(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/runner-groups/2/runners", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/runner-groups/2/runners", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
testFormValues(t, r, values{"per_page": "2", "page": "2"})
fmt.Fprint(w, `{"total_count":2,"runners":[{"id":23,"name":"MBP","os":"macos","status":"online"},{"id":24,"name":"iMac","os":"macos","status":"offline"}]}`)
Expand Down Expand Up @@ -453,7 +453,7 @@ func TestEnterpriseService_SetEnterpriseRunnerGroupRunners(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/runner-groups/2/runners", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/runner-groups/2/runners", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "PUT")
})

Expand Down Expand Up @@ -485,7 +485,7 @@ func TestEnterpriseService_AddEnterpriseRunnerGroupRunners(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/runner-groups/2/runners/42", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/runner-groups/2/runners/42", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "PUT")
})

Expand All @@ -510,7 +510,7 @@ func TestEnterpriseService_RemoveEnterpriseRunnerGroupRunners(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/runner-groups/2/runners/42", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/runner-groups/2/runners/42", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "DELETE")
})

Expand Down
6 changes: 3 additions & 3 deletions github/enterprise_actions_runners_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestEnterpriseService_GenerateEnterpriseJITConfig(t *testing.T) {

input := &GenerateJITConfigRequest{Name: "test", RunnerGroupID: 1, Labels: []string{"one", "two"}}

mux.HandleFunc("/enterprises/e/actions/runners/generate-jitconfig", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/runners/generate-jitconfig", func(w http.ResponseWriter, r *http.Request) {
v := new(GenerateJITConfigRequest)
err := json.NewDecoder(r.Body).Decode(v)
if err != nil {
Expand Down Expand Up @@ -189,7 +189,7 @@ func TestEnterpriseService_RemoveRunner(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/runners/21", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/runners/21", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "DELETE")
})

Expand All @@ -214,7 +214,7 @@ func TestEnterpriseService_ListRunnerApplicationDownloads(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

mux.HandleFunc("/enterprises/e/actions/runners/downloads", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/enterprises/o/actions/runners/downloads", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
fmt.Fprint(w, `[{"os":"osx","architecture":"x64","download_url":"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-osx-x64-2.164.0.tar.gz","filename":"actions-runner-osx-x64-2.164.0.tar.gz"},{"os":"linux","architecture":"x64","download_url":"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-x64-2.164.0.tar.gz","filename":"actions-runner-linux-x64-2.164.0.tar.gz"},{"os": "linux","architecture":"arm","download_url":"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm-2.164.0.tar.gz","filename":"actions-runner-linux-arm-2.164.0.tar.gz"},{"os":"win","architecture":"x64","download_url":"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-win-x64-2.164.0.zip","filename":"actions-runner-win-x64-2.164.0.zip"},{"os":"linux","architecture":"arm64","download_url":"https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm64-2.164.0.tar.gz","filename":"actions-runner-linux-arm64-2.164.0.tar.gz"}]`)
})
Expand Down
Loading