First off, thanks for taking the time to contribute! 🎉
The following is a set of guidelines for contributing to GitMe. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
- Code of Conduct
- How Can I Contribute?
- Getting Started
- Development Workflow
- Style Guide
- Commit Messages
This project and everyone participating in it is governed by the GitMe Code of Conduct. By participating, you are expected to uphold this code.
- Use the Bug Report template.
- Include steps to reproduce the issue.
- Include your Node.js version, OS, and any relevant logs.
- Use the Feature Request template.
- Describe the problem your feature would solve.
- Explain your proposed solution.
- Fork the repo and create your branch from
main. - Make your changes.
- Test your changes locally.
- Submit a pull request with a clear description.
- Node.js v18 or higher
- A Discord Bot Token (how to get one)
- A Gemini API Key (how to get one)
- Ngrok (for local webhook testing)
# 1. Fork and clone
git clone https://github.com/<your-username>/gitme.git
cd gitme
# 2. Install dependencies
npm install
# 3. Set up environment variables
cp .env.example .env
# Edit .env with your keys
# 4. Start the development server
npm run dev-
Create a new branch for your feature or fix:
git checkout -b feat/your-feature-name # or git checkout -b fix/your-bug-fix -
Make your changes in the
src/directory:src/ ├── config/ # Environment & configuration ├── controllers/ # Request handlers (webhook logic) ├── middleware/ # Signature verification ├── services/ # Business logic (Discord, AI) └── index.js # App entry point -
Test locally by running the bot and sending test webhooks:
npm run dev # In another terminal: node tests/test-manual-events.js push -
Push your branch and open a PR.
- Runtime: Node.js with CommonJS (
require/module.exports) - Formatting: Use 4-space indentation
- Naming: Use
camelCasefor variables/functions,PascalCasefor classes - Strings: Use single quotes for strings, template literals for interpolation
- Comments: Add comments for complex logic, not obvious code
- Error Handling: Always handle promise rejections and add meaningful error messages
Follow the Conventional Commits format:
<type>: <description>
[optional body]
Types:
| Type | Description |
|---|---|
feat |
A new feature |
fix |
A bug fix |
docs |
Documentation changes |
refactor |
Code refactoring (no feature/fix) |
test |
Adding or updating tests |
chore |
Maintenance tasks |
Examples:
feat: add support for GitHub release events
fix: handle empty commit messages gracefully
docs: update setup instructions for Windows
Thank you for contributing! 💜