di-sukharev / di-sukharev/opencommit
[Feature]: Don't require OCO_OPENAI_API_KEY to be set for oco hook unset
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.5k
- Forks
- 445
- Avg merge
- 18m
- Merged PRs (30d)
- 2
Description
Description
I only set OCO_OPENAI_API_KEY when I'm using the command "git commit" and have the hook set, I unlock the key with a passcode for security reasons. oco hook unset requires OCO_OPENAI_API_KEY to be set or you ca not unset the hook, despite that not being necessary. While I can do something like OCO_OPENAI_API_KEY="ABC" oco hook unset, since it doesn't matter for that commad if it's wrong, that seems excessive and unnessesary. It would be helpful if the command didn't require that variable to be set for commads that won't use it
Suggested Solution
Only check the variable is set if the commad will require it
Alternatives
No response
Additional Context
No response
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 at the implementation of the oco hook unset command and trace where OCO_OPENAI_API_KEY is validated. Confirm that unsetting the hook works without the variable, while commands that use the hook still require it; verify both paths with the project's existing checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100