-
Notifications
You must be signed in to change notification settings - Fork 763
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
Feature/get repos from a organization #750
Feature/get repos from a organization #750
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some suggestions around naming of the repo
field to stay consistent with other resources in the project. I'm having difficulties getting tests to pass locally but plan to revisit this by end of week. Here is the error I am currently stuck on when running :
$ TF_LOG=DEBUG TF_ACC=1 go test -v ./... -run ^TestAccGithubOrganizationDataSource
...
testing.go:654: Step 0 error: Check failed: Check 2/5 error: data.github_organization.test: Attribute 'name' expected to be set
Co-authored-by: Jeremy Udit <jcudit@github.com>
Co-authored-by: Jeremy Udit <jcudit@github.com>
Co-authored-by: Jeremy Udit <jcudit@github.com>
Co-authored-by: Jeremy Udit <jcudit@github.com>
Hi! Thank you for your time and your patience To pass the test you just need to name the organization you are using for testing purposes in the organization settings page or remove the test, I've just kept the old check there Regards |
I've spent a little bit of time investigating this and I can confirm @kilwa0's assertion. I was able to get the tests to pass after providing an "Organization display name" and "Description" in previously-blank fields of my testing organization. Here's a screenshot of my organization settings page now: That being said, the solution to this error isn't very discoverable. Perhaps we could flesh out this section of CONTRIBUTING.md in order to start a list of prerequisites for organization setup. Or maybe we could provide a script that automates a test organization setup (it could even use this project itself). @jcudit I think this is something of a product decision...taking this makes our tests a bit more brittle, which we could potentially mitigate with additional documentation or automation. What do you think? |
Lets add this to our docs. I'd ❤️ a script that automates a test organization setup one day, but feel we can get by with just updating CONTRIBUTING.md for now. I'll follow up with that separate to this PR as tests are now passing locally for me thanks to everyone's guidance 🙇🏾 . |
* Get repos from a given org * revert changes to default in accetance tests * Update github/data_source_github_organization.go Co-authored-by: Jeremy Udit <jcudit@github.com> * Update github/data_source_github_organization.go Co-authored-by: Jeremy Udit <jcudit@github.com> * Update github/data_source_github_organization_test.go Co-authored-by: Jeremy Udit <jcudit@github.com> * Update website/docs/d/organization.html.markdown Co-authored-by: Jeremy Udit <jcudit@github.com> Co-authored-by: Jeremy Udit <jcudit@github.com>
Hi,
Added the repository list from a organization into the data_source_github_organization.go, useful to automate changes into repositories organization
Regards