Properly query team members

This commit is contained in:
Rodrigo Q. Saramago 2022-11-02 21:50:39 -03:00
parent 88b5ed1894
commit c0c1ab766f
No known key found for this signature in database
GPG Key ID: 9B36B2525704A359

View File

@ -23,23 +23,21 @@ jobs:
gh api graphql \
--raw-field organization="$ORGANIZATION" \
--raw-field query='
query($organization: String!, $cursor: String) {
query($organization: String!) {
organization(login: $organization) {
membersWithRole(first: 100, after: $cursor) {
pageInfo {
hasNextPage,
endCursor
}
team(slug: "Solidity") {
members(first: 100) {
nodes {
login
}
}
}
}
}' > org_members.json
echo "CONTRIBUTOR_IS_ORG_MEMBER=$(
jq \
--arg contributor $CONTRIBUTOR \
'.data.organization.membersWithRole | any(.nodes[].login; . == $contributor)' \
'.data.organization.team.members | any(.nodes[].login; . == $contributor)' \
org_members.json
)" >> $GITHUB_OUTPUT