{"id":29213804,"url":"https://github.com/icemap/tiara","last_synced_at":"2025-10-25T16:10:07.656Z","repository":{"id":301415863,"uuid":"1009192807","full_name":"Icemap/tiara","owner":"Icemap","description":"Tiara - TiDB Intelligent and Reliability Assistant","archived":false,"fork":false,"pushed_at":"2025-06-26T18:19:19.000Z","size":89,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-26T19:27:36.809Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/Icemap.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-06-26T18:16:55.000Z","updated_at":"2025-06-26T18:19:22.000Z","dependencies_parsed_at":"2025-06-26T19:38:20.892Z","dependency_job_id":null,"html_url":"https://github.com/Icemap/tiara","commit_stats":null,"previous_names":["icemap/tiara"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Icemap/tiara","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Ftiara","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Ftiara/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Ftiara/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Ftiara/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Icemap","download_url":"https://codeload.github.com/Icemap/tiara/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icemap%2Ftiara/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263229088,"owners_count":23434003,"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","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":[],"created_at":"2025-07-02T23:05:05.601Z","updated_at":"2025-10-25T16:10:07.651Z","avatar_url":"https://github.com/Icemap.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tiara - TiDB Intelligent And Reliability Assistant\n\n\u003e This project is inspired by [Gaby](https://pkg.go.dev/golang.org/x/oscar/internal/gaby).\n\nA Flask-based service that provides GitHub issue tracking and webhook handling capabilities with TiDB vector database integration.\n\n## How to Deploy\n\n### 1. Prerequisites\n\n- A GitHub Repository\n- A Server with:\n  - Docker\n  - Docker Compose\n\n### 2. Create a GitHub App\n\n1. Go to [Developer Settings](https://github.com/settings/apps) in GitHub.\n2. Click the **New GitHub App** button, or click [here](https://github.com/settings/apps/new) directly.\n3. Fill in the following information:\n\n    - **GitHub App name**: A descriptive application name\n    - **Homepage URL**: The homepage URL for this application\n    - **Webhook URL**: The URL where your Tiara instance will be deployed\n    - **Webhook Secret**: A random string that you'll need to configure in Tiara\n    - **Permissions**: Expand the **Repository permissions** section:\n\n        - **Repository permissions - Issues**: Set access to **Read and write**\n        - **Repository permissions - Metadata**: This will be selected automatically\n\n    - **Subscribe to events**: Check the **Issues** option\n    - **Where can this GitHub App be installed?**:\n\n        - **Only on this account**: Select this if you only want to install it on your own GitHub account\n        - **Any account**: Select this if you want to install it on other organizations\n\n4. Click the **Create GitHub App** button.\n5. After creation, you can find the **App ID** in the General tab.\n\n    ![App ID](https://lab-static.pingcap.com/images/2025/7/14/f7aebeba1cab8a42f3095e96a653769bf951b3db.png)\n\n### 3. Download the Private Key\n\n1. Scroll down to the **Private keys** section in the General tab.\n2. Click **Generate a private key** and save the key with a \".pem\" extension.\n\n### 4. Install the GitHub App\n\n1. Click the **Install App** tab on the left side.\n2. Click the **Install** button next to the organization where you want to install the app.\n3. Select **Only select repositories** and choose \u003cu\u003eONLY ONE\u003c/u\u003e repository.\n4. Click **Install**.\n5. After installation, you can get the `GITHUB_APP_INSTALLATION_ID` from the URL of the installation page.\n\n    ![App Installation ID](https://lab-static.pingcap.com/images/2025/7/14/40250231d836172d34bec7c15a9309b4ba71342e.png)\n\n### 5. Deploy the Service\n\n1. Log in to your server with Docker and Docker Compose installed.\n2. Clone this repository and navigate to the folder:\n\n    ```bash\n    git clone https://github.com/Icemap/tiara.git\n    cd tiara\n    ```\n\n3. Save your \".pem\" private key in the `certs` folder.\n4. Create a `.env` file with the following configuration:\n\n    ```conf\n    # Reply Label\n    REPLY_LABEL=\"tiara\"\n\n    # TiDB Serverless\n    SERVERLESS_CLUSTER_HOST=\u003cYOUR_TIDB_HOST\u003e\n    SERVERLESS_CLUSTER_PORT=\u003cYOUR_TIDB_PORT\u003e\n    SERVERLESS_CLUSTER_USERNAME=\u003cYOUR_TIDB_USERNAME\u003e\n    SERVERLESS_CLUSTER_PASSWORD=\u003cYOUR_TIDB_PASSWORD\u003e\n    SERVERLESS_CLUSTER_DATABASE_NAME='test'\n\n    # Embedding model and minimum related cosine distance\n    EMBEDDING_MODEL=\"bedrock/amazon.titan-embed-text-v2:0\"\n    MIN_DISTANCE=0.7\n\n    # AWS Access Keys (required if using 'bedrock' as the provider in EMBEDDING_MODEL)\n    AWS_ACCESS_KEY_ID=\u003cAWS_ACCESS_KEY_ID\u003e\n    AWS_SECRET_ACCESS_KEY=\u003cAWS_SECRET_ACCESS_KEY\u003e\n\n    # GitHub Parameters\n    GITHUB_WEBHOOK_SECRET=\u003cGITHUB_WEBHOOK_SECRET\u003e\n    GITHUB_REPO_NAME=\"\u003corg_name\u003e/\u003crepo_name\u003e\"\n\n    # GitHub App authentication\n    GITHUB_APP_ID=\u003cGITHUB_APP_ID\u003e\n    GITHUB_APP_PRIVATE_KEY=\"\u003cGITHUB_APP_PRIVATE_KEY_PATH\u003e\"\n    GITHUB_APP_INSTALLATION_ID=\u003cGITHUB_APP_INSTALLATION_ID\u003e\n    ```\n\n\u003e **Note:**\n\u003e\n\u003e If you're unsure about the GitHub parameters, please review the previous steps.\n\n### 6. Database Initialization\n\nInitialize the database and fetch existing GitHub issues:\n\n```bash\ndocker compose run tiara-backend /bin/sh -c \"poetry run python -m backend.model.init_database\"\n```\n\nThis command will:\n\n- Create the necessary database tables\n- Fetch all existing issues from your GitHub repository\n- Save them to the TiDB database\n- Can be run multiple times safely (idempotent)\n\n### 7. Start the Docker Compose Service\n\n```bash\ndocker compose up -d\n```\n\nThe service will be available at `http://localhost` or the IP address of your server.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficemap%2Ftiara","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficemap%2Ftiara","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficemap%2Ftiara/lists"}