Skip to content

Commit

Permalink
create-translation-issues: improve search for existing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pljones committed Jul 30, 2023
1 parent c8731db commit 8c68afa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/create-translation-issues.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ create_translation_issue_for_lang() {

translators=${TRANSLATORS_BY_LANG[${TYPE}_${lang}]-}
if [[ -z $translators ]]; then
echo "Assigning translator: $LOGGED_IN_AS - please re-assign as necessary" > /dev/stderr
echo "No translator for $lang, assigning $LOGGED_IN_AS - please re-assign as necessary" > /dev/stderr
translators="$LOGGED_IN_AS"
fi

Expand All @@ -230,7 +230,8 @@ create_translation_issue_for_lang() {

# Check for an existing issue
local existing_issue
existing_issue=$(gh issue list --milestone "$MILESTONE" --state all --search "$title" --json number --jq '.[0].number' || true)

existing_issue=$(gh issue list --milestone "$MILESTONE" --state all --json number,title --jq '. | map(select(.title == "'"$title"'")) | .[0].number' || true)

# If there's no existing issue, create one
if [[ -z $existing_issue ]]; then
Expand Down

0 comments on commit 8c68afa

Please sign in to comment.