di-sukharev / di-sukharev/opencommit

[Feature]: Don't require OCO_OPENAI_API_KEY to be set for oco hook unset

Open
#233 3 comments 1 reaction 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.