@@ -124,17 +124,19 @@ while IFS=$'\t' read -r PUZZLE_ID UNUSED_TICKET TITLE UNUSED_REST; do
124
124
ISSUES_BY_BODY_COUNT=" $( echo " $SEARCH_BY_BODY " | jq ' . | length' ) "
125
125
debug " $PUZZLE_ID : found $ISSUES_BY_BODY_COUNT issue(s) by body"
126
126
127
+ # KNOWN ISSUE:
128
+ # As there is no way to search in title with exact match, it's possible to find more than one issue if their titles are similar.
129
+ # For example, when lookup for "Add validation", it finds an issue with a title "Add validation" and "Add validation for e-mail".
130
+ # In this case, we let a user to choose which one is needed.
131
+ # @todo #1060 Add a workaround for GitHub search by filtering out issues with titles that don't match exactly
127
132
SEARCH_BY_TITLE=" $( gh search issues --repo " $GITHUB_REPOSITORY " --json number,state,url,title,body --match title " $TITLE " ) "
128
133
ISSUES_BY_TITLE_COUNT=" $( echo " $SEARCH_BY_TITLE " | jq ' . | length' ) "
129
134
debug " $PUZZLE_ID : found $ISSUES_BY_TITLE_COUNT issue(s) by title"
130
135
131
- # KNOWN ISSUES:
132
- # 1) As there is no way to search in title with exact match, it's possible to find more than one issue if their titles are similar.
133
- # For example, when lookup for "Add validation", it finds an issue with a title "Add validation" and "Add validation for e-mail".
134
- # In this case, we let a user to choose which one is needed.
135
- # 2) For each puzzle id we have to make 2 search requests instead of one because there is no possibility to use logical OR
136
- # (body contains OR title equals) in a search query. As result, we might get "HTTP 403: API rate limit exceeded" error more often
137
- # if we have a lot of issues to process or we re-run the script frequently.
136
+ # KNOWN ISSUE:
137
+ # For each puzzle id we have to make 2 search requests instead of one because there is no possibility to use logical OR
138
+ # (body contains OR title equals) in a search query. As result, we might get "HTTP 403: API rate limit exceeded" error more often
139
+ # if we have a lot of issues to process or we re-run the script frequently.
138
140
JSON=" $( echo " $SEARCH_BY_BODY$SEARCH_BY_TITLE " | sed -e ' s|\\n| |g' -e ' s|\\r||g' -e ' s|`||g' | jq --slurp ' add | unique_by(.number)' ) "
139
141
ISSUES_COUNT=" $( echo " $JSON " | jq ' . | length' ) "
140
142
debug " $PUZZLE_ID : found $ISSUES_COUNT issue(s) overall"
0 commit comments