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

[bug]: url encode environment name in github_actions_environment_secret and github_actions_environment_variable data sources and resources #1897

Merged
merged 2 commits into from
Sep 27, 2023

Conversation

anoxape
Copy link
Contributor

@anoxape anoxape commented Sep 15, 2023

(see #1392, #1799)


Before the change?

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

After the change?

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

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

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_actions_environment_variable" "this" {
  environment   = urlencode("environment/test")
  repository    = "my-repo"
  variable_name = "example_variable_name"
  value         = "example_variable_value"
}

into:

resource "github_actions_environment_variable" "this" {
  environment   = "environment/test"
  repository    = "my-repo"
  variable_name = "example_variable_name"
  value         = "example_variable_value"
}

assuming they have environment names that contain special characters.


@nickfloyd nickfloyd added the Type: Bug Something isn't working as documented label Sep 22, 2023
Copy link
Contributor

@nickfloyd nickfloyd left a comment

Choose a reason for hiding this comment

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

Thanks @anoxape ❤️

@nickfloyd nickfloyd changed the title fix: url encode environment name in github_actions_environment_secret and github_actions_environment_variable data sources and resources [bug]: url encode environment name in github_actions_environment_secret and github_actions_environment_variable data sources and resources Sep 27, 2023
@nickfloyd nickfloyd merged commit ca8ae1b into integrations:main Sep 27, 2023
6 checks passed
@saez0pub
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants