Skip to content
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

fix(ci): Capture grep -q exit code 1 to fix string extraction job #15571

Merged
merged 1 commit into from
Jul 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/l10n-gettext-extract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ jobs:
then
echo "No changes found."
else
gh pr view $PR_NUMBER --json reviewRequests | jq -r ".reviewRequests[].name" | grep -q "fxa-l10n"
if [ $? -ne 0 ]; then
# `grep -p "fxa-l10n` fails w/exit code 1 when 'fxa-l10n' is not found in the review list and breaks the
# command pipeline. Capture this with `GREP_STATUS` to directly check against the grep exit code
gh pr view $PR_NUMBER --json reviewRequests | jq -r ".reviewRequests[].name" | grep -q "fxa-l10n" || GREP_STATUS=$?
if [ $GREP_STATUS -ne 0 ]; then
# Check if someone from the Localization Team already reviewed the PR.
# Get the list of fxa-l10n reviewers, excluding non-l10n members
L10N_REVIEWERS=$(gh api -H "Accept: application/vnd.github+json" /orgs/mozilla/teams/fxa-l10n/members | jq -r '(.[].login | select(. != "clouserw"))' | sort)
Expand Down