Skip to content

Commit

Permalink
Properly query team members
Browse files Browse the repository at this point in the history
  • Loading branch information
r0qs committed Nov 3, 2022
1 parent 88b5ed1 commit c0c1ab7
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/welcome-external-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
nodes {
login
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
Expand Down

0 comments on commit c0c1ab7

Please sign in to comment.