Skip to content

Commit

Permalink
fix URL for JQL (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
beliaev-maksim authored Dec 12, 2023
1 parent a5c984e commit 5df9862
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion github_jira_sync_app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ async def bot(request: Request, payload: dict = Body(...)):
jira = JIRA(jira_instance_url, basic_auth=(jira_username, jira_token))
jira_task_desc_match = f"This issue was created from GitHub Issue {issue.html_url}"
existing_issues = jira.search_issues(
f'project={settings["jira_project_key"]} AND description ~""{jira_task_desc_match}""',
rf'project={settings["jira_project_key"]} AND description ~"\"{jira_task_desc_match}\""',
json_result=False,
)
assert isinstance(existing_issues, list), "Jira did not return a list of existing issues"
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/url_responses/issue_labeled_correct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ responses:
content_type: text/plain
method: GET
status: 200
url: https://my-jira.atlassian.net/rest/api/2/search?jql=project%3DMTC+AND+description+~%22%22This+issue+was+created+from+GitHub+Issue+https%3A%2F%2Fgithub.com%2Fbeliaev-maksim%2Ftest-ci%2Fissues%2F30%22%22&startAt=0&validateQuery=True&fields=%2Aall&maxResults=50
url: https://my-jira.atlassian.net/rest/api/2/search?jql=project%3DMTC+AND+description+~%22%5C%22This+issue+was+created+from+GitHub+Issue+https%3A%2F%2Fgithub.com%2Fbeliaev-maksim%2Ftest-ci%2Fissues%2F30%5C%22%22&startAt=0&validateQuery=True&fields=%2Aall&maxResults=50

0 comments on commit 5df9862

Please sign in to comment.