Skip to content

Instantly share code, notes, and snippets.

@abuxton
Last active September 16, 2024 15:14
Show Gist options
  • Save abuxton/5815221512b7c85c111a35f82f9367ad to your computer and use it in GitHub Desktop.
Save abuxton/5815221512b7c85c111a35f82f9367ad to your computer and use it in GitHub Desktop.
GH API get issues

Get Gists

A helper script to grab issues, from repos for fun and profit!

Usage

# Brew install some things

brew install gist
brew install gh

# clone this gist

git clone [https://gist.github.com/abuxton/5815221512b7c85c111a35f82f9367ad](https://gist.github.com/abuxton/5815221512b7c85c111a35f82f9367ad) pull-gists && cd pull-gists

# run make will list the teams you can see
make
#
all: teams
team:
echo $(team_name)
for i in `gh api /orgs/hashicorp/teams/$(team_name)/members | jq '.[].login' | sed 's/"//g'` ; do echo $i && gist -l $i ;done;
# to get the list of all teams in org
teams:
gh api /orgs/hashicorp/teams | jq '.[].name'
# to get team-is gists
is-team:
for i in `gh api /orgs/hashicorp/teams/team-is/members | jq '.[].login' | sed 's/"//g'` ; do echo $i && gist -l $i ;done;
# to get the team-se gists
team-se:
for i in `gh api /orgs/hashicorp/teams/team-se/members | jq '.[].login' | sed 's/"//g'` ; do echo $i && gist -l $i ;done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment