Skip to content

fix: allow missing types of rule bypasses #2726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

languitar
Copy link

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.

I've taken the liberty to update #2588 with the pending suggestions.

Resolves #2254
Resolves #2588


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?

Please see our docs on breaking changes to help!

  • Yes
  • No

Leave it to the API to determine if the values for actor_types are valid
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.

Signed-off-by: Johannes Wienke <[email protected]>
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
2 participants