Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The `commit` key of `create_file`'s result currently uses `github.Commit.Commit`, but that does not match the data model of the endpoint: while ill documented on docs.github.com, looking at the published schema (via https://github.com/github/rest-api-description or more readably https://github.com/octokit/types.ts which is automatically generated from the former) `file-commit.commit` looks significantly more like a `git-commit` than a `commit`: * `commit`'s author and committer are git*hub* objects (`nullable-simple-user`), while `file-commit.commit`'s are git objects (triplets of name, email, and date) * `commit` embeds the tree, and message in a sub-object, while `file-commit.commit` has them at the toplevel * `file-commit.commit` has no `stats` or `files` properties, or `comments_url` In all of these, `file-commit.commit` matches `git-commit` exactly. The only real divergence between `git-commit` and `file-commit.commit` is that the schema indicates all of `file-commit.commit`'s properties are optional, but I think it's a case of the endpoint being under-specified and the properties *not* being marked required, rather than them being explicitly optional. See github/rest-api-description#650 for an issue on that subject with more information.
- Loading branch information