Skip to content

Commit

Permalink
Revert "allow github_actions_runner_group to be created with Restrict…
Browse files Browse the repository at this point in the history
…edToWorkflows and SelectedWorkflows (integrations#1513)"

This reverts commit 2d1b724.
  • Loading branch information
david-heward-unmind committed Feb 21, 2023
1 parent 2d1b724 commit 7af996b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions github/resource_github_actions_runner_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,8 @@ func resourceGithubActionsRunnerGroupCreate(d *schema.ResourceData, meta interfa
client := meta.(*Owner).v3client
orgName := meta.(*Owner).name
name := d.Get("name").(string)
restrictedToWorkflows := d.Get("restricted_to_workflows").(bool)
visibility := d.Get("visibility").(string)
selectedRepositories, hasSelectedRepositories := d.GetOk("selected_repository_ids")
selectedWorkflows := d.Get("selected_workflows").([]string)

if visibility != "selected" && hasSelectedRepositories {
return fmt.Errorf("cannot use selected_repository_ids without visibility being set to selected")
Expand All @@ -112,9 +110,7 @@ func resourceGithubActionsRunnerGroupCreate(d *schema.ResourceData, meta interfa
github.CreateRunnerGroupRequest{
Name: &name,
Visibility: &visibility,
RestrictedToWorkflows: &restrictedToWorkflows,
SelectedRepositoryIDs: selectedRepositoryIDs,
SelectedWorkflows: selectedWorkflows,
},
)
if err != nil {
Expand Down
2 changes: 0 additions & 2 deletions website/docs/r/actions_runner_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ resource "github_actions_runner_group" "example" {
The following arguments are supported:

* `name` - (Required) Name of the runner group
* `restricted_to_workflows` - (Optional) If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
* `selected_repository_ids` - (Optional) IDs of the repositories which should be added to the runner group
* `selected_workflows` - (Optional) List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true.
* `visibility` - (Optional) Visibility of a runner group. Whether the runner group can include `all`, `selected`, or `private` repositories. A value of `private` is not currently supported due to limitations in the GitHub API.

## Attributes Reference
Expand Down

0 comments on commit 7af996b

Please sign in to comment.