Skip to content
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

URL encode environment name in github_repository_environment #1392

Conversation

Sebelino
Copy link
Contributor

Resolves #1389


Behavior

Before the change?

Any attempt to create, read, update or delete a repository environment with a name that contains a / or other special characters would fail.

After the change?

Attempts to create, read, update or delete a repository environment with a name that contains a / or other special characters will succeed.

Other information


Additional info

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)
  • Added the appropriate label for the given change

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes (Please add the Type: Breaking change label)
  • No

If Yes, what's the impact:

  • Users of this resource may need to update their configuration to make sure that the environment name is not URL encoded twice. In other words, they may need to change e.g.:
resource "github_repository_environment" "this" {
  environment = urlencode("environment/test")
  repository  = "my-repo"
}

into:

resource "github_repository_environment" "this" {
  environment = "environment/test"
  repository  = "my-repo"
}

assuming they have environment names that contain special characters.

Pull request type

Please add the corresponding label for change this PR introduces:

  • Bugfix: Type: Bug
  • Feature/model/API additions: Type: Feature
  • Updates to docs or samples: Type: Documentation
  • Dependencies/code cleanup: Type: Maintenance

Copy link
Member

@kfcampbell kfcampbell left a comment

Choose a reason for hiding this comment

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

Confirming acceptance tests are passing for me locally. Thank you for contributing!

@kfcampbell kfcampbell merged commit eefa7ca into integrations:main Nov 30, 2022
kazaker pushed a commit to auto1-oss/terraform-provider-github that referenced this pull request Dec 28, 2022
…rations#1392)

* fix(github_repository_environment): URL encode environment name

* test(github_repository_environment): Adjust test for URL encoded names

Co-authored-by: Keegan Campbell <me@kfcampbell.com>
avidspartan1 pushed a commit to avidspartan1/terraform-provider-github that referenced this pull request Feb 5, 2024
…rations#1392)

* fix(github_repository_environment): URL encode environment name

* test(github_repository_environment): Adjust test for URL encoded names

Co-authored-by: Keegan Campbell <me@kfcampbell.com>
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.

[BUG]: github_repository_environment is unusable if the environment name contains /
2 participants