Skip to content

Files

commit-history

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Feb 6, 2025
Feb 6, 2025
Feb 27, 2025
Feb 17, 2025
Feb 6, 2025
Feb 27, 2025
Feb 6, 2025
Feb 6, 2025
Feb 16, 2025

@commit-generator/commit-history

This package provides a utility for managing commit message history in the Commit Generator project. It allows storing and retrieving generated commit messages.

Installation

To use the commit history utility in your project, install the package:

pnpm install @commit-generator/commit-history

Usage

After installation, you can use the commit history utility in your project.

  1. Adding a Commit to History.
    To store a generated commit message, use the add method:
import { CommitHistory } from '@commit-generator/commit-history';

const history = new CommitHistory("./commit-history.log");

await history.add("feat: add new feature");
  1. Retrieving Commit History.
    To retrieve the last N commit messages, use the get method:
const lastCommits = await history.get(5);
console.log(lastCommits);

License

This package is licensed under the MIT License.