Ai Commit Message
ActionsTags
(2)This GitHub Action automatically generates commit messages and descriptions for your commits using AI.
When you make a commit with the title [ai], this action will analyze the commit changes, use AI to generate a commit title and description, and update the commit message accordingly.
- Automatically generates meaningful commit titles and descriptions for your commits
- Utilizes AI to analyze commit changes and generate relevant commit messages
- Maintains the original author of the commit (committer name and email)
To use this action in your GitHub repository, follow these steps:
-
Add a secret named
OPENAI_API_KEY
in your GitHub repository containing your OpenAI API key. -
Add the following workflow file to your repository in the .github/workflows directory, and name it ai_commit_message_generator.yml:
name: AI Commit Message Generator
on: [push]
jobs:
ai_commit_message:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Replace commit message with AI-generated title
uses: salehhashemi1992/[email protected]
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
Now, whenever you push a commit with the title [ai], this action will automatically generate a commit title and description using AI and update the commit message accordingly.
If you push a new commit before the title of the last commit has been updated, it will result in an issue where only the last commit title gets updated. To avoid this problem, please make sure to wait for the previous commit's title to be updated before pushing a new commit.
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.
Ai Commit Message is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.