Skip to content

Commit 093b7a1

Browse files
ismithsynthead
andauthored
Apply suggestions from code review
Co-authored-by: synthead <[email protected]>
1 parent d2f332a commit 093b7a1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

.github/workflows/publish-test-results.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,8 @@ jobs:
3636
- name: Extract PR Number
3737
run: |
3838
prnumber=$(jq -r '.pull_request.number' < 'artifacts/Event File/event.json')
39-
sanitized_prnumber=$(echo "$prnumber" | grep -E '^[0-9]+$' || echo "")
40-
if [ -n "$sanitized_prnumber" ]; then
41-
echo "PR_NUMBER=$sanitized_prnumber" >> "$GITHUB_ENV"
42-
else
43-
echo "PR_NUMBER=" >> "$GITHUB_ENV"
44-
fi
39+
sanitized_prnumber=$(grep -E '^[0-9]+$' <<< "$prnumber")
40+
echo "PR_NUMBER=$sanitized_prnumber" >> "$GITHUB_ENV"
4541
- name: Publish Unit Test Results
4642
uses: EnricoMi/publish-unit-test-result-action@v2
4743
with:

0 commit comments

Comments
 (0)