Last active
March 30, 2018 22:12
-
-
Save IlyaFinkelshteyn/09476306eb506ac0bbf7036864e0d1e6 to your computer and use it in GitHub Desktop.
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
$token = "<replace>" | |
$headers = @{ | |
"Authorization" = "Bearer $token" | |
"Content-type" = "application/json" | |
} | |
$orgs = Invoke-RestMethod -Uri "https://api.github.com/user/orgs" -Headers $headers -Method GET | |
$orgs | % {(Invoke-RestMethod -Uri "https://api.github.com/orgs/$($_.login)/teams" -Headers $headers -Method GET).name} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment