GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ofershap/ai-commit-msg: GitHub Action that generates AI-powered commit messages and PR summaries using OpenAI or Anthropic.

BranchesTags
Open more actions menu

Latest commit

 

History

20 Commits
20 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
assets
assets
 
 
dist
dist
 
 
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
.prettierignore
.prettierignore
 
 
.prettierrc.json
.prettierrc.json
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
action.yml
action.yml
 
 
eslint.config.js
eslint.config.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
tsup.config.ts
tsup.config.ts
 
 
vitest.config.ts
vitest.config.ts
 
 

Repository files navigation

AI Commit Msg — Auto-Generate Conventional Commit Messages from PR Diffs

GitHub Marketplace CI License: MIT

A GitHub Action that reads your PR diff and writes a Conventional Commits summary — so you don't have to. Supports OpenAI and Anthropic.

- uses: ofershap/ai-commit-msg@v1
  with:
    api-key: ${{ secrets.OPENAI_API_KEY }}
# → Posts a summary comment on every PR, updates on new pushes

Supports OpenAI and Anthropic. Custom prompts, language selection, and model override.

AI commit message demo — auto-generated Conventional Commits summary on a GitHub PR

Why

  • Zero install — runs as a GitHub Action, no CLI or npm package needed
  • Two providers — OpenAI (GPT-4o-mini) and Anthropic (Claude Sonnet) out of the box
  • Conventional Commits — generates type(scope): description format by default
  • PR comments — posts a summary comment on PRs, updates on new pushes
  • Customizable — custom prompts, language, model selection

Quick Start

name: AI Commit Message

on:
  pull_request:
    types: [opened, synchronize]

jobs:
  ai-summary:
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write
    steps:
      - uses: actions/checkout@v4
      - uses: ofershap/ai-commit-msg@v1
        with:
          api-key: ${{ secrets.OPENAI_API_KEY }}

That's it. Every PR gets an AI-generated summary comment.

Configuration

Inputs

Input Required Default Description
api-key Yes — API key for OpenAI or Anthropic
provider No openai openai or anthropic
model No auto Model name (default: gpt-4o-mini / claude-sonnet-4-20250514)
mode No pr-comment pr-comment or commit-summary
max-diff-length No 10000 Max diff chars sent to AI (truncated if longer)
language No english Language for the generated message
custom-prompt No — Extra instructions appended to the prompt
github-token No GITHUB_TOKEN Token for posting PR comments

Outputs

Output Description
message The generated commit message

Examples

With Anthropic

- uses: ofershap/ai-commit-msg@v1
  with:
    provider: anthropic
    api-key: ${{ secrets.ANTHROPIC_API_KEY }}

Output Only (no PR comment)

- uses: ofershap/ai-commit-msg@v1
  id: ai
  with:
    api-key: ${{ secrets.OPENAI_API_KEY }}
    mode: commit-summary
- run: echo "${{ steps.ai.outputs.message }}"

Custom Prompt

- uses: ofershap/ai-commit-msg@v1
  with:
    api-key: ${{ secrets.OPENAI_API_KEY }}
    custom-prompt: "Use emoji prefixes. Keep it under 50 chars."

Non-English

- uses: ofershap/ai-commit-msg@v1
  with:
    api-key: ${{ secrets.OPENAI_API_KEY }}
    language: hebrew

How It Works

  1. Reads the PR diff (or push commit diffs)
  2. Sends the diff to OpenAI/Anthropic with a Conventional Commits prompt
  3. Posts the generated message as a PR comment (or outputs it)
  4. On subsequent pushes, updates the existing comment instead of creating a new one

Author

Made by ofershap

LinkedIn GitHub


README built with README Builder

License

MIT © Ofer Shapira

About

GitHub Action that generates AI-powered commit messages and PR summaries using OpenAI or Anthropic.

Topics

aianthropicclaudecommit-messageconventional-commitsgithub-actiongpt-4openaitypescript

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Sponsor this project

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.