Skip to content

Commit 8104efb

Browse files
author
Jacob Mages-Haskins
committed
AIML-150 Escape quotes in issue title for searching
1 parent 584938d commit 8104efb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/git_handler.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,8 @@ def find_open_pr_for_issue(issue_number: int, issue_title: str) -> dict:
805805
pr_list_output = run_command(claude_pr_list_command, env=gh_env, check=False)
806806

807807
if not pr_list_output or pr_list_output.strip() == "[]":
808-
copilot_issue_title_search_pattern = f"in:title \"[WIP] {issue_title}\""
808+
escaped_issue_title = issue_title.replace('"', '\\"')
809+
copilot_issue_title_search_pattern = f"in:title \"[WIP] {escaped_issue_title}\""
809810
copilot_issue_title_list_command = [
810811
"gh", "pr", "list",
811812
"--repo", config.GITHUB_REPOSITORY,
@@ -1228,3 +1229,5 @@ def create_claude_pr(title: str, body: str, base_branch: str, head_branch: str)
12281229
debug_log(f"Temporary PR body file {temp_file_path} removed.")
12291230
except OSError as e:
12301231
log(f"Could not remove temporary file {temp_file_path}: {e}", is_error=True)
1232+
1233+
# %%

0 commit comments

Comments
 (0)