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

github_repository_collaborator should accept both short-and-long-form repository name formats #256

Closed
sudoforge opened this issue Jul 14, 2019 · 6 comments
Labels
Status: Stale Used by stalebot to clean house Status: Up for grabs Issues that are ready to be worked on by anyone Type: Feature New feature or request

Comments

@sudoforge
Copy link

sudoforge commented Jul 14, 2019

Terraform Version

→ tf version
Terraform v0.12.4

Affected Resource(s)

  • github_repository_collaborator

Terraform Configuration Files

Example configuration:

resource github_repository example {
  name      = "issue-example-256"
  auto_init = true
}

resource github_repository_collaborator example {
  username   = "some-username"
  repository = github_repository.example.full_name
  permission = "pull"
}

Debug Output

Irrelevant.

Panic Output

N/A

Expected Behavior

The github_repository_collaborator resource should have been created.

Actual Behavior

A 404 error is received from the upstream API due to the endpoint not accepting the format of the name output by github_repository.full_name:

PUT /repos/:owner/:repo/collaborators/:username

The GitHub API is inefficient and wildly inconsistent. This issue should be fixed upstream, but because it won't be, the Terraform provider should accept the full_name format and simply strip the :owner/ portion of the string, so that it is in parity with other resources, like github_repository_deploy_keys, etc...

Steps to Reproduce

  1. Copy the example plan, above.
  2. Change some-username to anything
  3. Run terraform apply

Important Factoids

N/A

References

@sudoforge
Copy link
Author

I'd be happy to take care of this if it is approved for development.

@tracypholmes tracypholmes added the Type: Feature New feature or request label Jul 16, 2019
@tracypholmes
Copy link
Contributor

Hi @sudoforge. Thank you for opening this issue! We would be happy to accept a PR for this if you would like to open one.

@github-actions
Copy link

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions bot added the Status: Stale Used by stalebot to clean house label Dec 11, 2022
@sudoforge
Copy link
Author

well, this is a blast from the past. i can't add labels, but i'll try to make time for this over the next few weeks if it is still relevant.

@github-actions github-actions bot removed the Status: Stale Used by stalebot to clean house label Dec 12, 2022
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone Priority: Normal labels Dec 12, 2022
@kfcampbell
Copy link
Member

I've added the relevant labels. That sounds good to me, thank you!

Copy link

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions bot added the Status: Stale Used by stalebot to clean house label Apr 24, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Used by stalebot to clean house Status: Up for grabs Issues that are ready to be worked on by anyone Type: Feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants