Skip to content

Instantly share code, notes, and snippets.

@KyMidd

KyMidd/asdf.sh Secret

Created April 12, 2024 19:54
Show Gist options
  • Select an option

  • Save KyMidd/6a3d818a5d2c728d91fe14c1e9718cf1 to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/6a3d818a5d2c728d91fe14c1e9718cf1 to your computer and use it in GitHub Desktop.
# Get all the copilot user data
copilot_all_user_data=$(curl -s \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/orgs/$gh_org/copilot/billing/seats?per_page=100 2>&1)
# Get all users that are added to CoPilot
copilot_all_users=$(echo "$copilot_all_user_data" | jq -r '.seats[].assignee.login')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment