npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gpt-auto-committer

v1.0.27

Published

CLI tool for automating commits & GitHub pull requests using LLMs

Downloads

121

Readme

GPTAutoCommitter

Overview

The GPTAutoCommitter is a script designed to automate commit creation and pull request updates based on Jira issues. It utilizes the OpenAI GPT model to generate commit messages and pull request descriptions, as-well as automating other ops.

Prerequisites

Before using this script, ensure you have the following:

  • Node.js installed (with npm)
  • An OpenAI access key
  • GitHub account and personal access token (if creating PRs)
  • Access to a Jira API (if want to use JIRA as additional context)

Setup

  1. Clone this repository.
  2. Install dependencies by running npm install gpt-auto-committer -g.

Configuration

Environment Variables

Set the following environment variables:

  • OPENAI_API_KEY: Your OpenAI API key.
  • OPENAI_MODEL: Use a different GPT Model when generating commits & pull-requests (default: gpt-3.5-turbo-1106)
  • GITHUB_ACCESS_TOKEN: Your GitHub personal access token. (required when creating PR)
  • JIRA_EMAIL: Your Jira account email. (required when supplying issue id)
  • JIRA_API_KEY: Your Jira API key. (required when supplying issue id)
  • JIRA_DOMAIN: Your Jira domain. (required when supplying issue id)

Profile Configuration

Alternatively, you can use profiles which are defined in an INI-style configuration file located at ~/.gac/profile. The file can include different profiles, each with its own set of configuration.

~/.gac/profile

[default]
jiraEmail = [email protected]
jiraApiKey = default-api-key
jiraDomain = default-domain
githubAccessToken = default-github-token
openaiApiKey = default-openai-api-key
openaiModel = gpt-3.5-turbo-1106

[projectX]
jiraEmail = [email protected]
jiraApiKey = projectX-api-key
jiraDomain = projectX-domain
githubAccessToken = projectX-github-token
openaiApiKey = projectX-openai-api-key
openaiModel = gpt-3.5-turbo-1106

Usage

Running the Script

  1. Install GPT-Auto-Commiter:
    npm install gpt-auto-committer -g
  2. Run it
    npx gac <Jira_issue_ID> [--update-pr] [--force] [--version=<version>] [--branch=<branch_name>]
  • <Jira_issue_ID>: Optional Jira issue ID.
  • --update-pr: Flag to create or update a pull request.
  • --force: Flag to force push changes.
  • --version=: Optional flag to specify the version bump (e.g., --version=patch/minor/major).
  • --branch=<branch_name>: Optional flag to specify a new branch name.
  • If on head branch and a jira issue was supplied and no new branch was supplied, a branch will be created in the same name as the jira issue id.
  1. Profit!

Functionality

  • Pull Request Updates: Updates or creates a pull request with generated descriptions based on Git Diff and optional Jira content.
  • OpenAI Integration: Utilizes the GPT-3.5 model for commit messages and pull request descriptions.

Customization

  • Make sure to review and customize Handlebars templates in the ./prompts directory for commit messages and pull request descriptions.