@@ -21,7 +21,7 @@ func TestActionsService_ListOrganizationRunnerGroups(t *testing.T) {
2121 mux .HandleFunc ("/orgs/o/actions/runner-groups" , func (w http.ResponseWriter , r * http.Request ) {
2222 testMethod (t , r , "GET" )
2323 testFormValues (t , r , values {"per_page" : "2" , "page" : "2" })
24- fmt .Fprint (w , `{"total_count":3,"runner_groups":[{"id":1,"name":"Default","visibility":"all","default":true,"runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/1/runners","inherited":false,"allows_public_repositories":true},{"id":2,"name":"octo-runner-group","visibility":"selected","default":false,"selected_repositories_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories","runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners","inherited":true,"allows_public_repositories":true},{"id":3,"name":"expensive-hardware","visibility":"private","default":false,"runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/3/runners","inherited":false,"allows_public_repositories":true}]}` )
24+ fmt .Fprint (w , `{"total_count":3,"runner_groups":[{"id":1,"name":"Default","visibility":"all","default":true,"runners_url":"https://api.github.com/orgs/octo-org/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_repositories_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories","runners_url":"https://api.github.com/orgs/octo-org/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/orgs/octo-org/actions/runner_groups/3/runners","inherited":false,"allows_public_repositories":true,"restricted_to_workflows":false,"selected_workflows":[] }]}` )
2525 })
2626
2727 opts := & ListOrgRunnerGroupOptions {ListOptions : ListOptions {Page : 2 , PerPage : 2 }}
@@ -34,9 +34,9 @@ func TestActionsService_ListOrganizationRunnerGroups(t *testing.T) {
3434 want := & RunnerGroups {
3535 TotalCount : 3 ,
3636 RunnerGroups : []* RunnerGroup {
37- {ID : Int64 (1 ), Name : String ("Default" ), Visibility : String ("all" ), Default : Bool (true ), RunnersURL : String ("https://api.github.com/orgs/octo-org/actions/runner_groups/1/runners" ), Inherited : Bool (false ), AllowsPublicRepositories : Bool (true ), RestrictedToWorkflows : Bool (false ), SelectedWorkflows : nil },
38- {ID : Int64 (2 ), Name : String ("octo-runner-group" ), Visibility : String ("selected" ), Default : Bool (false ), SelectedRepositoriesURL : String ("https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories" ), RunnersURL : String ("https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners" ), Inherited : Bool (true ), AllowsPublicRepositories : Bool (true ), RestrictedToWorkflows : Bool (false ), SelectedWorkflows : nil },
39- {ID : Int64 (3 ), Name : String ("expensive-hardware" ), Visibility : String ("private" ), Default : Bool (false ), RunnersURL : String ("https://api.github.com/orgs/octo-org/actions/runner_groups/3/runners" ), Inherited : Bool (false ), AllowsPublicRepositories : Bool (true ), RestrictedToWorkflows : Bool (false ), SelectedWorkflows : nil },
37+ {ID : Int64 (1 ), Name : String ("Default" ), Visibility : String ("all" ), Default : Bool (true ), RunnersURL : String ("https://api.github.com/orgs/octo-org/actions/runner_groups/1/runners" ), Inherited : Bool (false ), AllowsPublicRepositories : Bool (true ), RestrictedToWorkflows : Bool (true ), SelectedWorkflows : [] string { "a" , "b" } },
38+ {ID : Int64 (2 ), Name : String ("octo-runner-group" ), Visibility : String ("selected" ), Default : Bool (false ), SelectedRepositoriesURL : String ("https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories" ), RunnersURL : String ("https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners" ), Inherited : Bool (true ), AllowsPublicRepositories : Bool (true ), RestrictedToWorkflows : Bool (false ), SelectedWorkflows : [] string {} },
39+ {ID : Int64 (3 ), Name : String ("expensive-hardware" ), Visibility : String ("private" ), Default : Bool (false ), RunnersURL : String ("https://api.github.com/orgs/octo-org/actions/runner_groups/3/runners" ), Inherited : Bool (false ), AllowsPublicRepositories : Bool (true ), RestrictedToWorkflows : Bool (false ), SelectedWorkflows : [] string {} },
4040 },
4141 }
4242 if ! cmp .Equal (groups , want ) {
@@ -65,7 +65,7 @@ func TestActionsService_ListOrganizationRunnerGroupsVisibleToRepo(t *testing.T)
6565 mux .HandleFunc ("/orgs/o/actions/runner-groups" , func (w http.ResponseWriter , r * http.Request ) {
6666 testMethod (t , r , "GET" )
6767 testFormValues (t , r , values {"per_page" : "2" , "page" : "2" , "visible_to_repository" : "github" })
68- fmt .Fprint (w , `{"total_count":3,"runner_groups":[{"id":1,"name":"Default","visibility":"all","default":true,"runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/1/runners","inherited":false,"allows_public_repositories":true},{"id":2,"name":"octo-runner-group","visibility":"selected","default":false,"selected_repositories_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories","runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners","inherited":true,"allows_public_repositories":true},{"id":3,"name":"expensive-hardware","visibility":"private","default":false,"runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/3/runners","inherited":false,"allows_public_repositories":true}]}` )
68+ fmt .Fprint (w , `{"total_count":3,"runner_groups":[{"id":1,"name":"Default","visibility":"all","default":true,"runners_url":"https://api.github.com/orgs/octo-org/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_repositories_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories","runners_url":"https://api.github.com/orgs/octo-org/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/orgs/octo-org/actions/runner_groups/3/runners","inherited":false,"allows_public_repositories":true,"restricted_to_workflows":false,"selected_workflows":[] }]}` )
6969 })
7070
7171 opts := & ListOrgRunnerGroupOptions {ListOptions : ListOptions {Page : 2 , PerPage : 2 }, VisibleToRepository : "github" }
@@ -78,9 +78,9 @@ func TestActionsService_ListOrganizationRunnerGroupsVisibleToRepo(t *testing.T)
7878 want := & RunnerGroups {
7979 TotalCount : 3 ,
8080 RunnerGroups : []* RunnerGroup {
81- {ID : Int64 (1 ), Name : String ("Default" ), Visibility : String ("all" ), Default : Bool (true ), RunnersURL : String ("https://api.github.com/orgs/octo-org/actions/runner_groups/1/runners" ), Inherited : Bool (false ), AllowsPublicRepositories : Bool (true ), RestrictedToWorkflows : Bool (false ), SelectedWorkflows : nil },
82- {ID : Int64 (2 ), Name : String ("octo-runner-group" ), Visibility : String ("selected" ), Default : Bool (false ), SelectedRepositoriesURL : String ("https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories" ), RunnersURL : String ("https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners" ), Inherited : Bool (true ), AllowsPublicRepositories : Bool (true ), RestrictedToWorkflows : Bool (false ), SelectedWorkflows : nil },
83- {ID : Int64 (3 ), Name : String ("expensive-hardware" ), Visibility : String ("private" ), Default : Bool (false ), RunnersURL : String ("https://api.github.com/orgs/octo-org/actions/runner_groups/3/runners" ), Inherited : Bool (false ), AllowsPublicRepositories : Bool (true ), RestrictedToWorkflows : Bool (false ), SelectedWorkflows : nil },
81+ {ID : Int64 (1 ), Name : String ("Default" ), Visibility : String ("all" ), Default : Bool (true ), RunnersURL : String ("https://api.github.com/orgs/octo-org/actions/runner_groups/1/runners" ), Inherited : Bool (false ), AllowsPublicRepositories : Bool (true ), RestrictedToWorkflows : Bool (false ), SelectedWorkflows : [] string {} },
82+ {ID : Int64 (2 ), Name : String ("octo-runner-group" ), Visibility : String ("selected" ), Default : Bool (false ), SelectedRepositoriesURL : String ("https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories" ), RunnersURL : String ("https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners" ), Inherited : Bool (true ), AllowsPublicRepositories : Bool (true ), RestrictedToWorkflows : Bool (false ), SelectedWorkflows : [] string {} },
83+ {ID : Int64 (3 ), Name : String ("expensive-hardware" ), Visibility : String ("private" ), Default : Bool (false ), RunnersURL : String ("https://api.github.com/orgs/octo-org/actions/runner_groups/3/runners" ), Inherited : Bool (false ), AllowsPublicRepositories : Bool (true ), RestrictedToWorkflows : Bool (false ), SelectedWorkflows : [] string {} },
8484 },
8585 }
8686 if ! cmp .Equal (groups , want ) {
@@ -108,7 +108,7 @@ func TestActionsService_GetOrganizationRunnerGroup(t *testing.T) {
108108
109109 mux .HandleFunc ("/orgs/o/actions/runner-groups/2" , func (w http.ResponseWriter , r * http.Request ) {
110110 testMethod (t , r , "GET" )
111- fmt .Fprint (w , `{"id":2,"name":"octo-runner-group","visibility":"selected","default":false,"selected_repositories_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories","runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners","inherited":false,"allows_public_repositories":true}` )
111+ fmt .Fprint (w , `{"id":2,"name":"octo-runner-group","visibility":"selected","default":false,"selected_repositories_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories","runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners","inherited":false,"allows_public_repositories":true,"restricted_to_workflows":false,"selected_workflows":[] }` )
112112 })
113113
114114 ctx := context .Background ()
@@ -180,7 +180,7 @@ func TestActionsService_CreateOrganizationRunnerGroup(t *testing.T) {
180180
181181 mux .HandleFunc ("/orgs/o/actions/runner-groups" , func (w http.ResponseWriter , r * http.Request ) {
182182 testMethod (t , r , "POST" )
183- fmt .Fprint (w , `{"id":2,"name":"octo-runner-group","visibility":"selected","default":false,"selected_repositories_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories","runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners","inherited":false,"allows_public_repositories":true}` )
183+ fmt .Fprint (w , `{"id":2,"name":"octo-runner-group","visibility":"selected","default":false,"selected_repositories_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories","runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners","inherited":false,"allows_public_repositories":true,"restricted_to_workflows":false,"selected_workflows":[] }` )
184184 })
185185
186186 ctx := context .Background ()
@@ -234,7 +234,7 @@ func TestActionsService_UpdateOrganizationRunnerGroup(t *testing.T) {
234234
235235 mux .HandleFunc ("/orgs/o/actions/runner-groups/2" , func (w http.ResponseWriter , r * http.Request ) {
236236 testMethod (t , r , "PATCH" )
237- fmt .Fprint (w , `{"id":2,"name":"octo-runner-group","visibility":"selected","default":false,"selected_repositories_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories","runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners","inherited":false,"allows_public_repositories":true}` )
237+ fmt .Fprint (w , `{"id":2,"name":"octo-runner-group","visibility":"selected","default":false,"selected_repositories_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/repositories","runners_url":"https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners","inherited":false,"allows_public_repositories":true,"restricted_to_workflows":false,"selected_workflows":[] }` )
238238 })
239239
240240 ctx := context .Background ()
0 commit comments