Skip to content

Latest commit

 

History

History
511 lines (340 loc) · 16.4 KB

README_en.md

File metadata and controls

511 lines (340 loc) · 16.4 KB

GitMaya - make git flow in chat

An open-source, high-performance GitOps for boosting developer-teams productivity
Supports lark, discord, slack, and so on (FULL OPENSOURCE)


🖥 Try GitMaya Now

简体中文 · English

gitmaya.mp4

🔥 Feature List

🧑🏻‍💻 For Developers, By Developers

Embrace the power of collaboration with our developer-centric, fully open-source product designed by developers, for developers.

🌐 Cross-Platform Bliss

Enjoy seamless communication across various platforms including Feishu, Discord, Slack, Microsoft Teams, and Telegram.

Our commitment is to serve developers wherever they feel at home!

🔄 One Repo = One ChatGroup

Experience the perfection of a 2-way sync with the mantra "One Repo = One ChatGroup". let the collaboration flow effortlessly!

💬 GitHub Msg Interaction, Simplified:

Manage all your GitHub interactions right from your favorite chat platform. No more context-switching, just pure efficiency.

🚀 Instant Issue Reminders

Say goodbye to delays! Receive instant issue reminders that make feedback and interaction a breeze. Stay in sync with your team effortlessly.

🔄 Pull Request Recap Magic

Efficient stand-ups made easy! Get a quick recap of pull requests, ensuring that your team stays on the same page and moves forward with confidence.

🛠 CI/CD and GitHub Actions Integration

Elevate your development workflow with seamless integration of CI/CD and GitHub Actions directly within your ChatPlatform. Boost productivity and streamline your processes effortlessly.

🚚 Stay in the Code Review Flow

Maximize productivity with dedicated code review time slots. Stay focused, collaborate effectively, and ensure your codebase is always in its best shape!

📃 Deployment Workflow

Deploying GitMaya requires a total of 3 steps.

Step 1. Install GitHub Application

You need to create a GitHub app at first, for details refer to Deploy GitHub App From Scratch.

Step 2. Deploy GitMaya

You can choose to use Self Hosting or Local Deployment to deploy the front-end and back-end of GitMaya.

Step 3. Deploy Feishu App Bot

The steps for deploying the Feishu (Lark) bot application are already integrated into the onboarding process of GitMaya. Completing the onboarding will automatically complete the Feishu-related configuration. For more details, please refer to Deploy Feishu App Bot From Scratch.

🛳 Self Hosting

GitMaya provides Self-Hosted Version with Severless and Docker Image. This allows you to deploy your own chatbot within a few minutes without any prior knowledge.

A Deploying with Docker-Compose

We provide a Docker image for deploying the GitMaya service on your own private device. Use the following command to start the GitMaya service:

1. Download the docker-compose.yml and .env File

First, download the docker-compose.yml and .env file; they contain the configuration for the GitMaya services, including MySQL, Celery, and Redis.

$ wget https://raw.githubusercontent.com/ConnectAI-E/GitMaya/main/deploy/docker-compose.yml
$ wget https://raw.githubusercontent.com/ConnectAI-E/GitMaya/main/deploy/.env.example -O .env

2. Configure the Environment Variables

Then, you need to configure the .env and docker-compose.yml file. You should replace the variables with your own GitHub App information, which created in Step 1.

$ vim .env

Replacing GITHUB_APP_NAME, GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY, GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, GITHUB_WEBHOOK_SECRET into .env file

SECRET_KEY="<REPLACE>"
FLASK_PERMANENT_SESSION_LIFETIME=86400*30
FLASK_SQLALCHEMY_DATABASE_URI="mysql+pymysql://root:gitmaya2023@mysql:3306/gitmaya?charset=utf8mb4&binary_prefix=true"

GITHUB_APP_NAME=your-deploy-name
GITHUB_APP_ID=114514
GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
<replace you private key>
-----END RSA PRIVATE KEY-----"

GITHUB_CLIENT_ID=your_client_id
GITHUB_CLIENT_SECRET=your_client_secret

GITHUB_WEBHOOK_SECRET=secret
DOMAIN=127.0.0.1

NOTE: file supports multi-line string, so the .pem file could be pasted into .env file directly

3. Run the Images

It will init database in first time, thus it may contain a few error messages in logs.

$ docker-compose up -d

B Deploying with Zeabur or Sealos (Coming soon!)

We will soon support one-click deployment for Zeabur.

Deploy with Zeabur

⌨️ Local Development

1. Clone the Repository

Clone the repository to your local machine or server:

$ git clone https://github.com/ConnectAI-E/GitMaya.git
$ cd GitMaya

2. Installing Dependencies

Using pip

If you are using pip

$ pip install -r requirements.txt

Using pdm(Recommended)

If you are using pdm

$ pdm install

Activate the virtual environment:

$ eval $(pdm venv activate)

3. Configuration Files

Before starting, ensure you have the following configuration files in place:

  • .env: Configure Feishu, GitHub, and various middleware variables. We provide an example .env.example for referring

Configure database by replacing relevant variables

# Database Settings
FLASK_SQLALCHEMY_DATABASE_URI="mysql+pymysql://root:gitmaya2023@mysql:3306/gitmaya?charset=utf8mb4&binary_prefix=true"

Configure Celery, using Redis as Broker

# Celery Settings
CELERY_BROKER_URL=redis://redis:6379/1
CELERY_RESULT_BACKEND=redis://redis:6379/2

Configure GitHub App, for details refer to: Deploy GitHub App From Scratch

# GitHub Settings
GITHUB_APP_NAME=test
GITHUB_APP_ID=1024
GITHUB_CLIENT_ID=test
GITHUB_CLIENT_SECRET=test
GITHUB_WEBHOOK_SECRET=secret
GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
<replace you private key>
-----END RSA PRIVATE KEY-----"

Configure server address

DOMAIN=127.0.0.1

(Optional) Configure Flask

# Flask Settings
SECRET_KEY="test"
FLASK_PERMANENT_SESSION_LIFETIME=86400

4. Running the Server

Start Redis:

$ docker run -d -p 6379:6379 redis:alpine

Start Celery, using Redis as Broker:

$ cd server
$ celery -A tasks.celery worker -l INFO -c 2

Start MySQL:

$ docker run --name mysql -e MYSQL_ROOT_PASSWORD=gitmaya2023 -e MYSQL_DATABASE=gitmaya -e TZ=Asia/Shanghai -p 3306:3306 -v /path/to/your/mysql/data:/var/lib/mysql -v /path/to/your/mysql/conf.d:/etc/mysql/conf.d -d mysql:5.7 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

Create database and tables (needed only once):

$ flask --app server/server:app create

Run the GitMaya server by using gunicorn:

$ gunicorn --worker-class=gevent --workers 1 --bind 0.0.0.0:8888 -t 600 --keep-alive 60 --log-level=info server:app

📕 Reference

📦 Ecosystem

There is a series of gitmaya repositories, and this is one of them:

Repository Language Purpose
👉 GitMaya Python Server-side code
GitMaya-Cli Python Super Git management tool

🤝 Contributing Now

Gitmaya is an open-source platform, freely available and crafted by developers, just like yourself. Feel free to proudly present your envisioned features and bring them to life through code.




Top Contributors of ConnectAI-E/GitMaya - Last 28 days

👻 Alternatives

gitmaya is inspired by the following tools.

They work well but have different focuses and feature sets, try them out as well :)

📝 License

Copyright © 2024 ConnectAI-E.
This project is MIT licensed.