Skip to content

Commit

Permalink
run linters
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyl1u committed Nov 18, 2024
1 parent 6e7639a commit d63501f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/issue_handler.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
import re

from config import SIMILARITY_THRESHOLD
from src.github_api import close_issue, leave_comment
Expand All @@ -22,7 +21,7 @@ def handle_new_issue(
logger.info(
f"The new issue #{issue_number} with title '{issue_title}' is most similar to existing issue #{similar_issue['issue_number']} with title '{similar_issue['title']}', with a cosine similarity of {1 - similar_issue['distance']:.2f}."
)
elif similar_issue and similar_issue["distance"] < 1 - (SIMILARITY_THRESHOLD*0.5):
elif similar_issue and similar_issue["distance"] < 1 - (SIMILARITY_THRESHOLD * 0.5):
comment_text = f"Possibly related to issue #{similar_issue['issue_number']} with title '{similar_issue['title']}'"
leave_comment(installation_id, repo_full_name, issue_number, comment_text)
logger.info(
Expand Down

0 comments on commit d63501f

Please sign in to comment.