-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
GitService.CreateCommit
is documented as:
CreateCommit creates a new commit in a repository.
The commit.Committer is optional and will be filled with the commit.Author data if omitted. If the commit.Author is omitted, it will be filled in with the authenticated user’s information and the current date.
GitHub API docs: http://developer.github.com/v3/git/commits/#create-a-commit
If it's legal, what happens if a user calls CreateCommit("owner", "repo", nil)
? Should we document it, because I don't think it's intuitive or clear.
If it's not legal, that should be documented.
Same question for PullRequestsService.Edit
, documented as:
Edit a pull request.
GitHub API docs: https://developer.github.com/v3/pulls/#update-a-pull-request
In case nil values are not legal, why are pointers being accepted? Is it for performance reasons, or something else? If a breaking API change is viable, would it be a good idea to accept a value instead?
These questions came up while reviewing #528 which resolves #421 (but they're outside of scope of that PR, may be in scope of the issue).