{"id":29670810,"url":"https://github.com/palagdan/gitmateai","last_synced_at":"2025-07-22T19:38:23.371Z","repository":{"id":291457930,"uuid":"943764788","full_name":"palagdan/GitmateAI","owner":"palagdan","description":"AI-driven github bot can automate tasks such as issue tracking, pull request management, and code reviews, streamlining the development process.","archived":false,"fork":false,"pushed_at":"2025-05-12T10:25:40.000Z","size":613,"stargazers_count":3,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-12T11:36:49.266Z","etag":null,"topics":["ai","bot","nestjs","rag","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/palagdan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-06T08:25:01.000Z","updated_at":"2025-05-12T10:25:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c482048-9cc4-4c77-8399-08dba695be45","html_url":"https://github.com/palagdan/GitmateAI","commit_stats":null,"previous_names":["palagdan/gitmateai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/palagdan/GitmateAI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palagdan%2FGitmateAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palagdan%2FGitmateAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palagdan%2FGitmateAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palagdan%2FGitmateAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/palagdan","download_url":"https://codeload.github.com/palagdan/GitmateAI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palagdan%2FGitmateAI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266561643,"owners_count":23948635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","bot","nestjs","rag","typescript"],"created_at":"2025-07-22T19:38:22.840Z","updated_at":"2025-07-22T19:38:23.356Z","avatar_url":"https://github.com/palagdan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitmateAI\n\nAI-driven github bot can automate tasks such as issue tracking, pull request management, and code reviews, streamlining\nthe development process.\n\n![Architecture Diagram](images/architecture_diagram.png)\n\n## Application Overview\n\nApplication consists of 5 modules:\n\n- `gitmateai-backend` - Manages information chunks for issues, pull requests (PRs), commits, code base, and conventions.\n- `gitmateai-bot` - Github bot that assists issue tracking, pull request management, and code reviews, streamlining the\n  development process.\n- `gitmateai-loader-cli` - A CLI tool that retrieves content from specific organizations, repositories, or users and\n  populates the vector database with this information.\n- `weaviate` - An open-source vector database that stores both objects and vectors, enabling the combination of vector\n  search with structured filtering. It offers the fault tolerance and scalability of a cloud-native database.\n- `ollama` - : A lightweight, extensible framework for building and running language models on a local machine. It\n  provides a simple API for creating, running, and managing models, along with a library of pre-built models for various\n  applications.\n\n## Development Setup\n\nTo set up the development environment, use [`docker-compose.dev.yml`](./docker-compose.dev.yml), which runs the vector\ndatabase alongside Ollama with the embedded model.\n\n### Running the Gitmate-Backend\n\nTo start the GitmateAI backend in development mode, follow these steps:\n\n1. Set the environment variables in the `.env` file. You can use the [`.env.example`](./gitmateai-backend/.env.example)\n   file as a reference.\n\n\u003ca id=\"gitmateai-backend-env\"\u003e\u003c/a\u003e\n\n| Variable Name   | Description                                    | Default Value            |\n|-----------------|------------------------------------------------|--------------------------|\n| `DATABASE_HOST` | Host address for the vector database(weaviate) | `localhost`              |\n| `DATABASE_PORT` | Port number for the vector database(weaviate)  | `8080`                   |\n| `OLLAMA_URL`    | URL for the Ollama service                     | `http://localhost:11434` |\n\n2. Run the following command to start the GitmateAI backend:\n\n```bash\ncd gitmateai-backend\nnpm install  \nnpm run start:dev\n```\n\nBackend runs on `http://localhost:3001/v1` by default.\n\n### Guide to Register Your Bot on GitHub and GithubCopilot, and Configure the GitmateAI-bot\n\n#### Guide to register your bot on GitHub and configure environment variables\n\n```bash\ncd gitmateai-bot\nnpm install  \nnpm run build\nnpm run start\n```\n\n1. Next follow instructions to visit http://localhost:3000 (or your custom Glitch URL).\n2. Go ahead and click the Register a GitHub App button.\n3. Next, you'll get to decide on an app name that isn't already taken. Note: if you see a message \"Name is already in\n   use\" although no such app exists, it means that a GitHub organization with that name exists and cannot be used as an\n   app name.\n4. After registering your GitHub App, you'll be redirected to install the app on any repositories. At the same time, you\n   can check your local .env and notice it will be populated with values GitHub sends us in the course of that redirect.\n5. Stop the server in your terminal\n6. Configure environment variables in `.env`. Most of the variables will be set automatically when you register your bot\n   with Probot,\n   but some of the following variables need to be set manually:\n\n   \u003ca id=\"gitmateai-bot-env\"\u003e\u003c/a\u003e\n\n   | Variable Name            | Description                                                                                   |\n   |--------------------------|-----------------------------------------------------------------------------------------------|\n   | `WEBHOOK_PROXY_URL`      | URL for tunneling GitHub webhooks(it is needed only for development)                          |\n   | `WEBHOOK_SECRET`         | Secret key for webhook validation                                                             | \n   | `APP_ID`                 | GitHub App identifier                                                                         | \n   | `APP_NAME`               | Name of the GitHub App                                                                        | \n   | `ORGANIZATION_NAME`      | GitHub Organization name                                                                      |\n   | `PRIVATE_KEY`            | Private key for GitHub App auth                                                               | \n   | `GITHUB_CLIENT_ID`       | GitHub OAuth client ID                                                                        | \n   | `GITHUB_CLIENT_SECRET`   | GitHub OAuth client secret                                                                    | \n   | `LLM_API_KEY`            | API key for the LLM service                                                                   | \n   | `LLM_MODEL_NAME`         | Name of the LLM model                                                                         | \n   | `BACKEND_URL`            | URL for the backend API                                                                       | \n   | `PREFIX`                 | This prefix will be used for bot specific commands(e.g. /gitmateai help, prefix is gitmateai) | \n\n7. Start the server in you terminal with `npm run start`:\n\n#### Guide to enable automated task for organization repositories\n[`github-config.json`](./github-config.json) file contains the configuration for the bot. You can set automated tasks for each repository.\nTo do this, you need to replace the owner with your organization name, repo with the repository name for what you want to configure automated tasks\nand `automatedServices` property with the list of automated tasks from the tasks list. \n\n```json\n{\n  \"owner\": {\n    \"repo\": {\n      \"automatedServices\": [\n        \"task name\"\n      ]\n    }\n  }\n}\n```\n\nIssue automated tasks:\n\n| Task                  | Description                     |\n|-----------------------|---------------------------------|\n| `issue-label`         | Assign a label to the issue     |\n| `issue-code-search`   | Search similar to issue code    |\n| `issue-commit-search` | Search similar to issue commits |\n| `issue-pr-search`     | Search similar to issue PRs     |\n| `issue-issues-search` | Search similar to issue issues  |\n| `issue-summarize`     | Summarize issue                 |\n\n\nPull Request automated tasks:\n\n| Task           | Description              |\n|----------------|--------------------------|\n| `pr-label`     | Assign a label to the PR |\n| `pr-summarize` | Summarize Pull Request   |\n\n\n#### Guide to enable copilot assistance for the bot\n\n1. Visit `Settings -\u003e Developer settings -\u003e GitHub Apps -\u003e Your GitHub App -\u003e General` and find Callback URL.\n   Put https://github.com/ to it.\n2. Visit `Permissions and events -\u003e Account permissions -\u003e Copilot` and set to read-only.\n3. Visit `Copilot` and enable it by clicking on checkboxes.\n4. Set `Add Type` to agent\n5. Then you need to set URL by `http://[address of your tunnel or public address]/copilot`\n\nAfter these steps you can authorize in GitHub Copilot chat with your personal account.\n\n### GitmateAI-Loader-CLI - Populating the Database with Data Chunks.\n\n```bash\ncd gitmateai-loader-cli\n```\n\nBefore running the scripts, you need to configure the .env file with the required environment variables,\nsee [.env.example](gitmateai-loader-cli/.env.example).\nThis includes setting the backend URL where all the information will be pushed and providing your GitHub access token.\n\nTo generate a GitHub access token, follow these steps:\n\n1. In the upper-right corner of any page on GitHub, click your profile photo, then click Settings.\n\n2. In the left sidebar, click Developer settings.\n\n3. In the left sidebar, under Personal access tokens, click Fine-grained tokens.\n\n4. Click Generate new token.\n\n5. Assign this token to the 'GITHUB_TOKEN' variable.\n\nYou should also specify which repositories are marked as knowledge bases so the bot can answer questions about them.\nTo do this, edit the [`knowledge-bases.json`](./gitmateai-loader-cli/knowledge-bases.json) file and add the repositories you want to mark as knowledge bases, like this:\n\n```json\n{\n   \"knowledge_bases\": [\n      {\n         \"owner\": \"palagdan\",\n         \"repo\": \"palagdan-knowledge-base\"\n      }\n   ]\n}\n```\n\n```markdown\nUsage: gitmate-loader-cli [options] [command]\n\nCLI tool to fetch and process GitHub repositories\n\nOptions:\n-V, --version output the version number\n-h, --help display help for command\n\nCommands:\norg \u003corgName\u003e           Load repositories from an organization and and send all its details to the specified backend.\nuser \u003cusername\u003e         Load repositories for a specific GitHub user and send all its details to the specified backend.\nrepo \u003cname\u003e \u003crepoName\u003e  Retrieve a specific repository from a user or an organization and send all its details to the\nspecified backend.\nhelp [command]          display help for command\n```\n\n\u003e **🚨 Important:** To use the `gitmate-loader-cli` command, you must install it globally. Otherwise, use the commands\n\u003e provided below.\n\n```bash\ncd gitmateai-loader-cli\nnpm install\nnpm run build\nnpm run start [options] [command] \n```\n\nIf you wish to exclude specific file extensions from being retrieved and stored, add them to the `.gitmateignore` file.\n\n## Production Setup\n\n1. You should create `.env` file in the root directory and set the environment variables\n   from [gitmateai-bot](#gitmateai-bot-env) and [gitmateai-backend](#gitmateai-backend-env) sections.\n2. Then use [`docker-compose.prod.yml`](./docker-compose.prod.yml), which sets up all necessary services. Run the\n   following command:\n\n```bash\ndocker-compose -f docker-compose.prod.yml up -d\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalagdan%2Fgitmateai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpalagdan%2Fgitmateai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalagdan%2Fgitmateai/lists"}