piotrmurach / github

Ruby interface to GitHub API
https://piotrmurach.github.io/github
MIT License
1.15k stars 316 forks source link

Add 'has_projects' to the list of valid repo options #345

Closed smortex closed 4 years ago

smortex commented 5 years ago

Quotting https://developer.github.com/v3/repos/#edit

has_projects  boolean  Either true to enable projects for this
                       repository or false to disable them. Default:
                       true. Note: If you're creating a repository in an
                       organization that has disabled repository
                       projects, the default is false, and if you pass
                       true, the API returns an error.
coveralls commented 5 years ago

Coverage Status

Coverage increased (+2.2%) to 97.79% when pulling 71ac59dcc15cfcc3fdb16162d91f698e6a8eed4e on smortex:enable-has_projects into d3dc6a526fbfedcdb616d2963cf8e8395201a14f on piotrmurach:master.

piotrmurach commented 5 years ago

Hey Romain,

Thanks for your contribution!

I would say that validating options was a bad choice on my part. The GitHub api is a moving target where options change constantly and keeping things up to date is a chore. So what I would suggest if you could do is to completely remove all the options and checks against them. This will be future proof.

smortex commented 5 years ago

@piotrmurach I can certainly do this. Do you want it to happen only for the Github::Client::Repos class or for all classes of the gem?