-
Notifications
You must be signed in to change notification settings - Fork 168
Pick words only when searching for Jira issues #4885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -198,7 +198,7 @@ def find_jira_issues( | |
| return sort_by_key(results) | ||
|
|
||
| # Fall back to title search and verify via remote links | ||
| title = github_item.title.replace('\\', '\\\\').replace("'", "\\'").replace('"', '') | ||
| title = " ".join(re.findall(r'\w+', github_item.title)) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From the example given
results into
That doesn't seem right. On the other hand using the quotation marks seems to work fine without much escaping |
||
| query = f'project = "{JIRA_PROJECT}" AND summary ~ "{title}"' | ||
| candidates = jira.search_issues(query, maxResults=False, json_result=False) | ||
| assert isinstance(candidates, list) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle cases where the title contains no word characters (e.g., only symbols). An empty
titlestring would result in an invalid JQL query (summary ~ "") and cause the script to crash.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Question] should allow atleast '-' it will improve search accuracy ?