Skip to content

Commit

Permalink
Fix jq syntax (#819)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
  • Loading branch information
mcandeia authored Aug 29, 2024
1 parent c6e7d53 commit 76102e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/releaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ jobs:
MINOR=$(echo $LATEST_TAG | cut -d. -f2)
PATCH=$(echo $LATEST_TAG | cut -d. -f3)
# Define allowed users
ALLOWED_USERS=$(cat MAINTAINERS.txt | tr '\n' ' ')
# Define allowed users as a JSON array
ALLOWED_USERS=$(cat MAINTAINERS.txt | jq -R -s -c 'split("\n")[:-1]')
echo "Maintainers list: $ALLOWED_USERS"
# Fetch reactions and filter by allowed users
Expand All @@ -115,11 +115,11 @@ jobs:
}
}
}
}' | jq -r '
}' | jq -r --argjson allowed_users "$ALLOWED_USERS" '
.data.repository.pullRequest.comments.nodes[] |
select(.body | contains("## Tagging Options")) |
.reactions.nodes[] |
select(.user.login | inside(["'${ALLOWED_USERS[*]}'"])) |
select(.user.login | IN($allowed_users[])) |
.content'
)
# Determine the new tag version based on the allowed reactions
Expand Down

0 comments on commit 76102e6

Please sign in to comment.