Created
January 18, 2023 23:45
-
-
Save brasic/1aefd849885a274d1721d8999b06c335 to your computer and use it in GitHub Desktop.
fetching all participants in a discussion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gh api graphql \ | |
--paginate \ | |
--jq 'tostream | select(.[0][-1]=="login" and .[1]!=null) | .[1]' \ | |
-F owner=community \ | |
-F name=community \ | |
-F number=12341 \ | |
-f query=' | |
query($owner: String!, $name: String!, $number: Int!, $endCursor: String) { | |
repository(name: $name, owner: $owner) { | |
discussion(number: $number) { | |
author { | |
login | |
} | |
comments (first: 100, after: $endCursor) { | |
pageInfo { | |
endCursor | |
hasNextPage | |
} | |
nodes { | |
author { login } | |
replies (first: 100){ | |
pageInfo { | |
endCursor | |
hasNextPage | |
} | |
nodes { | |
author { login } | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
' | sort -u |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment