Last active
November 28, 2023 14:11
-
-
Save cherryramatisdev/fd2581ec97145706ad780fb12d396ee8 to your computer and use it in GitHub Desktop.
How to list all the discussions within a repo
This file contains 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
#!/usr/bin/env bash | |
gh api graphql \ | |
-f query=" | |
query { | |
repository(owner: \"ORG\", name: \"REPO_NAME\") { | |
discussions(first: 29) { | |
edges { | |
node { | |
title | |
body | |
} | |
} | |
} | |
} | |
}" | jq '.data.repository.discussions.edges' > output.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment