Skip to content

Commit

Permalink
don't pass in error msg as arg
Browse files Browse the repository at this point in the history
  • Loading branch information
hubertdeng123 committed Apr 19, 2023
1 parent eaccd07 commit f09b96e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ runs:
curl -sL https://sentry.io/get-cli/ | sh
# Environment variables will automatically be sent, so we just want some minimal information
error_msg=$(cat analyze_logs.txt | grep -zoP '(?<=>>> Relevant errors\n\n Error\n\n ).*?(?=\n)' || echo 'unknown error message')
sentry-cli send-event -m "FOSSA analyze error: %s" -a $error_msg -t repo:$GITHUB_REPOSITORY -e url:$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID --logfile analyze_logs.txt
sentry-cli send-event -m "FOSSA analyze error: $error_msg" -t repo:$GITHUB_REPOSITORY -e url:$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID --logfile analyze_logs.txt
exit 0
fi
if grep -q "The scan has revealed issues. Number of issues found:" test_logs.txt; then
Expand All @@ -84,4 +84,4 @@ runs:
fi
curl -sL https://sentry.io/get-cli/ | sh
error_msg=$(cat test_logs.txt | grep -zoP '(?<=>>> Relevant errors\n\n Error\n\n ).*?(?=\n)' || echo 'unknown error message')
sentry-cli send-event -m "FOSSA test error: %s" -a $error_msg -t repo:$GITHUB_REPOSITORY -e url:$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID --logfile test_logs.txt
sentry-cli send-event -m "FOSSA test error: $error_msg" -t repo:$GITHUB_REPOSITORY -e url:$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID --logfile test_logs.txt

0 comments on commit f09b96e

Please sign in to comment.