make GetReposContentsByOwnerByRepoByPath path optional
The Github docs for getting repository content state
Gets the contents of a file or directory in a repository. Specify the file path or directory with the path parameter. If you omit the path parameter, you will receive the contents of the repository's root directory.
The docs are incorrect and mark the path as required. This PR makes the path optional.
@szesch Thanks for the contribution!
Something that will play a role here is that the endpointspattern.go file is actually auto generated so we can't directly modify it.
There are a few other endpoints like this where the default regular expression is not quite correct. To modify it, you can look here for an example. You'll see that it intercepts the generation and allows us to define a different expression like you did.
After creating a new expression you can then run the gen.go so regenerate all endpoints with their new definitions.
Give it a go and I'm happy to review your change and get it merged.
@trumant and @szesch Are we good to close this PR since https://github.com/migueleliasweb/go-github-mock/pull/82 was merged?
Need to re-test my use case but will do so in the next 48 hours and let you know
Let me know if this becomes a problem. Closing for now.