Skip to content

Commit

Permalink
remove echos
Browse files Browse the repository at this point in the history
  • Loading branch information
midleman committed Dec 11, 2024
1 parent bef0ebd commit b4ca255
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scripts/pr-tags-parse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
GITHUB_EVENT_PATH="$1"

# Extract the PR body from the event JSON
echo "Extracting PR body..."
# echo "Extracting PR body..."
PR_BODY=$(jq -r '.pull_request.body' "$GITHUB_EVENT_PATH" | tr '\n' ' ' | sed 's/"/\\"/g')

echo "Parsing tags from PR body..."
# echo "Parsing tags from PR body..."

# Check if @:all is present in the PR body
if echo "$PR_BODY" | grep -q "@:all"; then
echo "Found @:all tag in PR body. Setting tags to run all tests."
# echo "Found @:all tag in PR body. Setting tags to run all tests."
TAGS="" # Set to an empty string to indicate all tests should run
else
# Parse tags starting with '@:' and convert to '@'
Expand All @@ -32,11 +32,12 @@ else
fi

# Output the tags
echo "Extracted Tags: $TAGS"
# echo "Extracted Tags: $TAGS"

# Save tags to GITHUB_OUTPUT for use in GitHub Actions
if [[ -n "$GITHUB_OUTPUT" ]]; then
echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
# echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
echo "$TAGS" # Only output tags to stdout
else
echo "Warning: GITHUB_OUTPUT is not set. Tags will not be available to the workflow."
fi

0 comments on commit b4ca255

Please sign in to comment.