Skip to content

Commit

Permalink
issue integrations#1332: support workflow restrictions in github_acti…
Browse files Browse the repository at this point in the history
…ons_runner_group
  • Loading branch information
bob-bins authored and bob-bins committed Nov 20, 2022
1 parent bb0f993 commit ee2a502
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions github/resource_github_actions_runner_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ func resourceGithubActionsRunnerGroupCreate(d *schema.ResourceData, meta interfa
d.Set("selected_repositories_url", runnerGroup.GetSelectedRepositoriesURL())
d.Set("visibility", runnerGroup.GetVisibility())
d.Set("selected_repository_ids", selectedRepositoryIDs) // Note: runnerGroup has no method to get selected repository IDs
d.Set("restricted_to_workflows", runnerGroup.GetRestrictedToWorkflows())
d.Set("selected_workflows", runnerGroup.SelectedWorkflows)

return resourceGithubActionsRunnerGroupRead(d, meta)
}
Expand Down Expand Up @@ -165,6 +167,8 @@ func resourceGithubActionsRunnerGroupRead(d *schema.ResourceData, meta interface
d.Set("runners_url", runnerGroup.GetRunnersURL())
d.Set("selected_repositories_url", runnerGroup.GetSelectedRepositoriesURL())
d.Set("visibility", runnerGroup.GetVisibility())
d.Set("restricted_to_workflows", runnerGroup.GetRestrictedToWorkflows())
d.Set("selected_workflows", runnerGroup.SelectedWorkflows)

selectedRepositoryIDs := []int64{}
options := github.ListOptions{
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ require (
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/go-github/v48 v48.1.0
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/gax-go/v2 v2.4.0 // indirect
github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect
Expand Down

0 comments on commit ee2a502

Please sign in to comment.