Dependencies: Public docs no longer match some API methods
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Relates to the @actions/github package.
Problem
With the recent changes introduced in https://github.com/octokit/plugin-rest-endpoint-methods.js/pull/721 (v12.0.0), the public octokit/rest.js documentation here no longer matches the method signatures for the following:
(delete|get|list)EnvironmentSecret(s)(create|delete|get|list|update)EnvironmentVariable(s)getEnvironmentPublicKey
Previously, a repository_id parameter was required, now it can be called with owner and repo params.
Note: the old endpoints still work, so nothing is broken, but it's confusing referencing the public docs and having an IDE complaining that incorrect params are being passed in. (Also affects calls to the above methods in GHA workflows using https://github.com/actions/github-script)
Example
Public Docs:
octokit.rest.actions.getEnvironmentVariable({
owner,
repo,
environment_name,
name,
});
VSCode:
octokit.rest.actions.getEnvironmentVariable({
repository_id,
environment_name,
name,
});
Fix
Bumping the @octokit/plugin-rest-endpoint-methods dependency here should resolve this, but will be a breaking change.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in packages/github/package.json at the @octokit/plugin-rest-endpoint-methods dependency and compare its current version with the environment-method signatures described in the issue. Update the dependency as appropriate, then run the package's existing checks to confirm the affected methods accept the documented parameters without breaking the package.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, typescript
- Domain
- api, developer-experience
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100