-
Notifications
You must be signed in to change notification settings - Fork 834
Open
Labels
Type: FeatureNew feature or requestNew feature or request
Description
Describe the need
According to GitHub docummentation for creating rulesets for repositories in your organization and REST API for managing rulesets for organizations and repositories the following are eligible for bypass access:
- Repository admins or organization owners
- The maintain or write role, or custom repository roles based on the write role
- Teams
- Deploy keys
- GitHub Apps
- Dependabot
And Terraform GitHub provider lacks support for Deploy keys.
resource "github_organization_ruleset" "test" {
name = "test-%s"
target = "branch"
enforcement = "active"
conditions {
ref_name {
include = ["~ALL"]
exclude = []
}
}
bypass_actors {
actor_id = 0
actor_type = "DeployKey"
bypass_mode = "always"
}
rules {
creation = true
update = true
deletion = true
required_linear_history = true
required_signatures = false
pull_request {
required_approving_review_count = 2
required_review_thread_resolution = true
require_code_owner_review = true
dismiss_stale_reviews_on_push = true
require_last_push_approval = true
}
required_status_checks {
required_check {
context = "ci"
}
strict_required_status_checks_policy = true
}
branch_name_pattern {
name = "test"
negate = false
operator = "starts_with"
pattern = "test"
}
non_fast_forward = true
}
}
returns an error
│ Error: expected bypass_actors.0.actor_type to be one of [RepositoryRole Team Integration OrganizationAdmin], got DeployKey
SDK Version
No response
API Version
2022-11-28
Relevant log output
│ Error: expected bypass_actors.0.actor_type to be one of [RepositoryRole Team Integration OrganizationAdmin], got DeployKey
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
milpog, stevehipwell, markwellis, acharrett, tomas-pajurek and 11 more
Metadata
Metadata
Assignees
Labels
Type: FeatureNew feature or requestNew feature or request