Skip to content

Conversation

@morfien101
Copy link
Contributor

This PR attempts to resolve an issue where the provider is not able to create bypass rules that don't use the explicit values set in this provider. The provider itself is out of date. There is no need for the provider to do the check as the API and helps will do the checks for us.

Resolves #2254


Before the change?

Users would not be able to make a bypass rule that uses something like a DeployKey

  bypass_actors {
    actor_type  = "DeployKey"
    bypass_mode = "always"
  }

After the change?

Users can make any bypass rule that is accepted by the API

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

No breaking changes. I expect it to be fully backwards compatible with the current config in the wild.

See it working here
github_terraform_DeployKey

…lid of not. These change over time and we would need to carry a list in code to verify this.

Do not require an actor_id on rule bypasses. Things like DeployKey do not have an id.
@morfien101
Copy link
Contributor Author

@kfcampbell Any chance you can have a look at this please. We would like to start making use of it but having to keep a separate copy of the provider is a pain.
Tagging you since you reviewed the previous attempt for this feature.

@nickfloyd nickfloyd moved this from 🆕 Triage to 👀 In review in 🧰 Octokit Active Jun 3, 2025
"actor_type": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{"RepositoryRole", "Team", "Integration", "OrganizationAdmin"}, false),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ValidateFunc: validation.StringInSlice([]string{"RepositoryRole", "Team", "Integration", "OrganizationAdmin"}, false),
ValidateFunc: validation.StringInSlice([]string{"RepositoryRole", "Team", "Integration", "OrganizationAdmin", "DeployKey"}, false),

@joshdk
Copy link

joshdk commented Jul 7, 2025

It would be very nice to get this PR updated and merged :)

@dsdeboer
Copy link

It would be very nice to get this PR updated and merged :)

@morfien101 should I help you out?

@languitar
Copy link
Contributor

I've taken the liberty to update this in #2726

@magusd
Copy link

magusd commented Aug 27, 2025

ship it!

@nickfloyd
Copy link
Contributor

nickfloyd commented Oct 21, 2025

@morfien101 Thank you for the work here. I'll be closing this one in favor of the work done here. Let me know if you think your patch still should be applied, but the PRs are really similar.

@nickfloyd nickfloyd closed this Oct 21, 2025
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in 🧰 Octokit Active Oct 21, 2025
@morfien101
Copy link
Contributor Author

I'm ok with either. Just happy it's coming :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: Add DeployKey to bypass_actors in github_organization_ruleset and github_repository_ruleset

7 participants