Skip to content

opencommit: add module for opencommit #7151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jmmaloney4
Copy link

@jmmaloney4 jmmaloney4 commented May 28, 2025

Description

Adds a new module to manage the OpenCommit AI commit message generator (https://github.com/di-sukharev/opencommit). This module allows configuration of API key, language, model, prompt module, and optional git hook integration. The module uses the Nix-provided opencommit package and sets all configuration via environment variables.

Checklist

  • Change is backwards compatible.

  • Code formatted with nix fmt or
    nix-shell -p treefmt nixfmt-rfc-style keep-sorted --run treefmt.

  • Code tested through nix-shell --pure tests -A run.all
    or nix build --reference-lock-file flake.lock ./tests#test-all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

Maintainer CC

@jmmaloney4 jmmaloney4 changed the title feat(programs/opencommit): add Home Manager module for OpenCommit opencommit: add Home Manager module for OpenCommit May 28, 2025
@jmmaloney4 jmmaloney4 changed the title opencommit: add Home Manager module for OpenCommit opencommit: add module for opencommit May 28, 2025
Adds a new module to manage the OpenCommit AI commit message generator. This module allows configuration of API key, language, model, prompt module, and optional git hook integration. The module uses the Nix-provided opencommit package and sets all configuration via environment variables.
…tion

Adds tests for the opencommit module to verify correct environment variable setup and optional git hook integration. Includes tests for both enabling and disabling the git hook.
@jmmaloney4
Copy link
Author

Waiting on #7200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant