-
Notifications
You must be signed in to change notification settings - Fork 10
Support Key Pair resources #51
Support Key Pair resources #51
Conversation
Thank you for your PR! It seems great, but I need to test the endpoint myself before merging this PR. So give me a few days to review this PR since I need to migrate my testing repo to travis-ci.com to try the endpoint! 😄 As for integration tests, you don't have to care about them so far, since as you described above the configuration is hardcoded. Sorry for the inconvenience, I should probably dockernize the tests... |
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.
I wrote integration tests and made sure it works perfectly. Thanks again for your PR!
Only one quick fix, so please check the comment! 👍
key_pair.go
Outdated
// FindGeneratedByRepoId fetches the default key pair based on the given repository id | ||
// | ||
// Travis CI API docs: https://developer.travis-ci.com/resource/key_pair_generated#find | ||
func (ks *KeyPairService) FindGeneratedByRepoId(ctx context.Context, repoId uint) (*KeyPair, *http.Response, error) { |
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.
Would you create a new service like GeneratedKeyPairService
and move FindGenerated~
and CreateGenerated~
there? I would like to keep the library's api coherent, which method names do not contain information about resource they interact with.
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.
Make sense 😃 I fixed it at cba3866
It might be better to separate GeneratedKeyPairService with an another file (like generated_key_pair.go
), if it should be so, please let me know.
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.
Thanks for the fix! Looks great! 👍
…ent methods related to the resources from KeyPairService
I'll release v0.2.1 after adding some integration tests. Thanks again for your PR! 👍 |
Thanks! 😃 |
This PR adds a support of Key Pair and Key Pair (generated) resources.
Although I wrote unit tests by following other resources, I didn't write integration tests because I don't have the right to modify the environment of integration test (probably https://travis-ci.org/shuheiktgwtest/go-travis-test ?) . What should I do?