-
Notifications
You must be signed in to change notification settings - Fork 741
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
[FEAT]: github_actions_secret use full_name of repository #1471
Comments
I am working on the codespaces_secrets which will be similar #1729. Currently For consistency reasons would we want to move to
|
Same for the public_key's |
That is an excellent question. We should definitely shoot for consistency, though it'll probably be a little bit before we can release a breaking change. I have a weak preference for |
Concerning codespaces_secrets, i have kept the implementation focused and implemented it like the currently existing actions and dependabot secrets. @kfcampbell Should this feature request be implemented focused on just github_actions_secrets/github_*_secrets or should this be looked at more generally? As using the owner provided as env var or in the provider seems to be the general implementation (e.g. github_repository). |
It should be looked at more generally...I definitely have issues with the environment variable, as it makes it difficult to use the provider anonymously and to change owners during a run. The challenge will be to improve that experience in a non-breaking manner if possible. |
👋 Hey Friends, this issue has been automatically marked as |
Describe the need
Currently github_actions_secret expects only the repository name and not the full_name prefix by an organization.
For example the following doesn't work. It uses the owner of the current user (or specified on the provider).
resource "github_actions_secret" "my_secret" {
repository = "my-org/my-repo"
secret_name = "MY_SECRET"
plaintext_value = "***"
}
It generates this URL
https://api.github.com/repos/my-login/my-org/docs.automutatio.com/actions/secrets/public-key
instead of
https://api.github.com/repos/my-org/my-repo/docs.automutatio.com/actions/secrets/public-key
The only way to fix it would be to specify the owner in the provider config.
I would change github_actions_secret so that repository if presented with the 2 parts it would use the owner from there rather than assuming it was just the repository name.
Then you could do
repository = data.github_repository.repo.full_name
SDK Version
No response
API Version
No response
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: