-
Notifications
You must be signed in to change notification settings - Fork 762
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 Request] github milestone resource and data source #470
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.
Couple of suggestions but nothing to block on.
return err | ||
} | ||
|
||
d.SetId(strconv.FormatInt(milestone.GetID(), 10)) |
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.
What are your thoughts on new resources using the global node IDs when SetId()
is being called?
Previous experimentation in https://github.com/terraform-providers/terraform-provider-github/pull/460 takes this approach:
|
||
func resourceGithubRepositoryMilestoneCreate(d *schema.ResourceData, meta interface{}) error { | ||
conn := meta.(*Organization).v3client | ||
ctx := context.Background() |
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.
Recently came across this:
Does the provider become more responsive to a cancel operation if we wire this context all the way through to requests like this?
@jcudit is there anything left to do on this PR. I'm happy to help out if it's missing anything 👍 |
518829b
to
41446df
Compare
- update to go-github v32 - use `Owner` instead of `Organization`
6c0afde
to
94c06b9
Compare
@ewilde thanks for the ping on this one 😄 This has been rebased and the tests have been brought in line with the latest suite. Look out for an upcoming CHANGELOG PR and raise any issues once this releases. Happy to work with any data you can bring back on the next bugfix release if this doesn't play well with your use case. |
@jcudit fantastic, thank you for taking the time to get this feature into the provider 👍 It looks like it will be a good match for my basic use case |
…ions#470) * add milestone resource and data source * fix misspell * rebase and fix build errors - update to go-github v32 - use `Owner` instead of `Organization` * update test suite Co-authored-by: Jeremy Udit <[email protected]>
Closes #295
Changes include:
github_repository_milestone
owner/repository/number
Output of acceptance tests: