Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build Extension

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Type check
run: npm run check-types

- name: Build
run: npm run package
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish Extension

on:
pull_request:
types: [closed]
branches:
- main

jobs:
publish:
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'
name: Publish to VSCode Marketplace
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: Build
run: npm run package

- name: Publish to VSCode Marketplace
run: npx vsce publish -p ${{ secrets.VSCE_PAT }}
34 changes: 27 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,40 @@ All notable changes to the **AI Conventional Commit** extension will be document

This project adheres to [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and follows [Semantic Versioning](https://semver.org/).

---

## [Unreleased]

## [0.0.2] - 2025-06-28

### Added
- Generate commit messages using a language model via OpenRouter.
- Multi-language support (`en`, `es`, `fr`, `de`) with automatic detection.
- Git input box integration in the VSCode Source Control panel.
- Configurable preferred language in `settings.json`.
- Loading indicator while generating commit message.
- GitHub Actions workflows for `build` and `publish` steps.
- Contribution guidelines (`CONTRIBUTING.md`), Code of Conduct, Security Policy, and Support files.

### Changed
- Generate Command button now uses the same icon as the extension for visual consistency.
- Updated extension icon (SVG → PNG) for better compatibility.
- Improved documentation with new badges, setup guidance, and organizational links.

### Chore
- Bumped version to `0.0.2`.
- Updated repository and homepage URLs in `package.json`.

### Added
- Support for configuring preferred model (planned).
- Improved prompts structure (planned).
- Enhanced provider flexibility beyond OpenRouter (planned).

---

## [0.1.0] - 2025-06-27
## [0.0.1] - 2025-06-27

### Added
- Generate commit messages using a language model via OpenRouter.
- Multi-language support (`en`, `es`, `fr`, `de`) with automatic detection.
- Git input box integration in the VSCode Source Control panel.
- Configurable preferred language in `settings.json`.
- Initial functional version of the extension.
- Basic support for Conventional Commits message generation.

### Chore
- Set initial `publisher` field in `package.json` for VSCode Marketplace publishing.
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others’ private information, such as a physical or email address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at aiconventionalcommit@gmail.com. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq.
Translations are available at https://www.contributor-covenant.org/translations.

[homepage]: https://www.contributor-covenant.org
46 changes: 25 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
Thank you for considering contributing to AI Conventional Commit!
# Contributing to AI Conventional Commit

How to Contribute
Thank you for considering contributing to **AI Conventional Commit**! 🚀
We welcome issues, ideas, pull requests, and feedback of all kinds.

Bug Reports: Please include a clear and descriptive title and thorough description.
---

Feature Requests: Explain your idea and why it would be useful. Remember, any idea it always might be useful.
## 📌 Quick Guidelines

Pull Requests:
### 🐞 Bug Reports
- Provide a **clear title** and a **detailed description**.
- Include steps to reproduce the issue, expected vs actual behavior, and environment info.

Fork the repo and create your branch from main.
### 💡 Feature Requests
- Describe the feature, its motivation, and potential use cases.
- All ideas are welcome!

Follow our code style (TypeScript + ESLint).
---

Include tests and documentation where appropriate.
## 🚀 Pull Requests

Keep commits clear and conventional.
> **Important:** Please submit pull requests to the `develop` branch, **not** `main`.

Submit your PR and describe the change.
1. **Fork** the repo and create a new branch from `develop`.
2. Follow our code style (TypeScript + ESLint).
3. Include tests and documentation where appropriate.
4. Keep commits clear and [conventional](https://www.conventionalcommits.org/en/v1.0.0/).
5. Submit your PR with a clear description of the change.

Project Structure
---

src/ – main extension code
## 📁 Project Structure

resources/ – auxiliary prompts and language files

dist/ – compiled output (do not edit manually)

Code Style

Follow ESLint rules

Use Conventional Commits for commit messages
```plaintext
src/ – Main extension code
resources/ – Prompt files, language templates, and other assets
dist/ – Compiled output (do not edit manually)
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,42 @@
# AI Commit Assistant

[![Version](https://vsmarketplacebadges.dev/version/AIConventionalCommit.ai-conventional-commit.png)](https://marketplace.visualstudio.com/items?itemName=AIConventionalCommit.ai-conventional-commit) [![Downloads](https://vsmarketplacebadges.dev/downloads-short/AIConventionalCommit.ai-conventional-commit.png)](https://marketplace.visualstudio.com/items?itemName=AIConventionalCommit.ai-conventional-commit) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.png)](./LICENSE) [![Last Commit](https://img.shields.io/github/last-commit/AI-Conventional-Commit/ai-conventional-commit.png)](https://github.com/AI-Conventional-Commit/ai-conventional-commit/commits/main) [![Issues](https://img.shields.io/github/issues/AI-Conventional-Commit/ai-conventional-commit.png)](https://github.com/AI-Conventional-Commit/ai-conventional-commit/issues)

Generate conventional and meaningful Git commit messages using the power of an LLM.
This VSCode extension analyzes your staged `git diff`, sends it to a language model, and suggests a commit message you can edit or accept.

---

## ⚙️ Requirements

- [Visual Studio Code](https://code.visualstudio.com/) v1.101.0 or newer
- [Node.js](https://nodejs.org/) (for development or local builds)
- An [OpenRouter](https://openrouter.ai) API key

---

## 🚀 Installation

**From VSCode Marketplace (recommended):**
1. Search for `AI Conventional Commit` in the Extensions panel.
2. Click **Install**.

**From source (development):**
1. Clone this repository.
2. Run `npm install` to install dependencies.
3. Press `F5` in VSCode to launch the extension in a new Extension Development Host window.

---

## 🏁 Getting Started

1. Stage your changes in Git.
2. Open the Source Control panel in VSCode.
3. Click the **AI Conventional Commit** button or run the `AI Conventional Commit: Generate conventional commit` command.
4. Review and edit the suggested commit message, then commit as usual.

---

## ✨ Features

- 📋 Uses staged changes (`git diff --cached`)
Expand All @@ -24,3 +58,22 @@ Add your OpenRouter API key and preferred language in your `settings.json`:
"aiConvCommit.apiKey": "your-api-key-here",
"aiConvCommit.language": "auto"
}
```

---

## 🧑‍💻 Contributing

We welcome contributions! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.

---

## 🛡️ Security

If you discover a security vulnerability, please see [SECURITY.md](./SECURITY.md) for how to report it.

---

## 📄 License

This project is licensed under the [MIT License](./LICENSE).
15 changes: 15 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Security Policy

## Supported Versions

We currently support only the latest version of the extension.

## Reporting a Vulnerability

If you discover a security vulnerability, please report it **privately** to avoid exposing users before a fix is available.

Email us at:

📧 **aiconventionalcommit@gmail.com**

We aim to respond within 72 hours. Once a fix is ready and released, we will credit the reporter (if desired) and disclose the issue responsibly.
16 changes: 16 additions & 0 deletions SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Support

Thank you for using **AI Conventional Commit**!

If you encounter any issues, have questions, or want to suggest improvements:

## 🛠 Where to Get Help

- 📂 [Open an issue](https://github.com/AI-Conventional-Commit/ai-conventional-commit/issues)
- 📧 Email: aiconventionalcommit@gmail.com

## 🤝 Contributing

We welcome contributions! Please see the [CONTRIBUTING.md](./CONTRIBUTING.md) file before submitting a pull request.

We currently do not offer commercial or real-time support.
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"name": "ai-conventional-commit",
"displayName": "AI Conventional Commit",
"publisher": "ai-conventional-commit",
"icon": "resources/icon.png",
"description": "AI-powered commit message generator using git diffs. Works with any LLM provider to generate conventional and descriptive commit messages. 100% customizable and privacy-respecting.",
"version": "0.0.1",
"version": "0.0.2",
"engines": {
"vscode": "^1.101.0"
},
Expand Down Expand Up @@ -47,8 +49,8 @@
"command": "aiConvCommit.generate",
"title": "AI Conventional Commit: Generate conventional commit",
"icon": {
"light": "resources/light/icon.svg",
"dark": "resources/dark/icon.svg"
"light": "resources/light/icon.png",
"dark": "resources/dark/icon.png"
}
}
],
Expand All @@ -63,10 +65,10 @@
},
"repository": {
"type": "git",
"url": "https://github.com/Count-I/ai-conventional-commit.git"
"url": "https://github.com/AI-Conventional-Commit/ai-conventional-commit.git"
},
"bugs": {
"url": "https://github.com/Count-I/ai-conventional-commit/issues"
"url": "https://github.com/AI-Conventional-Commit/ai-conventional-commit/issues"
},
"author": "Santiago Osorio",
"license": "MIT",
Expand Down
Binary file added resources/dark/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 0 additions & 10 deletions resources/dark/icon.svg

This file was deleted.

Binary file added resources/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/light/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading