rest.js
rest.js copied to clipboard
Inconsistent parameter naming: tag, tag_name
Checklist
- [x] I checked all open bugs and none of them matched my problem.
Versions
+-- @octokit/[email protected]
| +-- @octokit/[email protected]
| | +-- @octokit/[email protected]
| | +-- @octokit/[email protected]
| | +-- @octokit/[email protected]
| | | +-- @octokit/[email protected]
| | | +-- @octokit/[email protected]
| | +-- @octokit/[email protected]
| +-- @octokit/[email protected]
| +-- @octokit/[email protected]
| `-- @octokit/[email protected]
What happened?
octokit.repos.createRelease
uses tag_name
but octokit.repos.getReleaseByTag
uses tag
.
What did you expect to happen?
They should be consistently named.
I'm afraid I cannot help with that. The methods are a 1:1 mapping of GitHub's REST API, with all its little flaws. See
- https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#create-a-release
- https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#get-a-release-by-tag-name
It might be worth renaming the URL parameters. We did that in the past in order to make the REST API more coherent. That would need to be fixed in https://github.com/github/rest-api-description/, both the docs and the Octokit SDKs are generated from it. Would you like to file an issue there? No worries if not, I'll look into it eventually
https://github.com/github/rest-api-description/issues/182