Problem: open-source maintainers spend a lot of time managing duplicate/related (doppelgänger) issues & pull requests
Solution: doppelgänger compares newly submitted issues/PRs against existing ones to automatically flag duplicate/related (doppelgänger) issues/PRs
Topics: vector db, github, open-source, embedding search, rag, similarity scores
https://github.com/dannyl1u/doppelganger/assets/45186464/cdc1c68b-4241-43d9-806c-b4b5cc1a702d
This application is a GitHub App that automatically compares newly opened issues with existing ones, closing and commenting on highly similar issues to reduce duplication. In addition, it comments feedback on PRs based on title and description for points to consider.
Clone this repository:
git clone https://github.com/dannyl1u/doppelganger.git
cd doppelganger
Install dependencies:
pip install -r requirements.txt
To create a new .env
file, run the following command in your terminal:
cp .env.example .env
Open the newly created .env
file and update the following variables with your own values:
* APP_ID
: Replace your_app_id_here
with your actual app ID.
* WEBHOOK_SECRET
: Replace your_webhook_secret_here
with your actual webhook secret.
* OLLAMA_MODEL
: Replace your_chosen_llm_model_here
with your chosen LLM model (e.g. "llama3.2"). Note: it must be an Ollama supported model (see: https://ollama.com/library for supported models)
* NGROK_DOMAIN
: Replace your_ngrok_domain_here
with your ngrok domain if you have one
Place the downloaded private key in the project root and name it rsa.pem
.
Run the application locally
Start the Flask application:
python3 app.py
The application will start running on http://localhost:4000
We will use ngrok for its simplicity
Option 1: generated public URL In a new terminal window, start ngrok to create a secure tunnel to your local server:
ngrok http 4000
ngrok will generate a public URL (e.g., https://abc123.ngrok.io)
Append /webhook
to the url, e.g. https://abc123.ngrok.io -> https://abc123.ngrok.io/webhook
In another terminal window, start Ollama
ollama run <an OLLAMA model here>
Option 2: Using Shell Script with your own ngrok domain
Ensure environment variables are all set.
./run-dev.sh
Once installed, the app will automatically:
You can adjust the similarity threshold by modifying the SIMILARITY_THRESHOLD
variable in the script. The default is set to 0.5.
rsa.pem
file is present and correctly formatted.Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.