Skip to content

Instantly share code, notes, and snippets.

@patcon
Last active November 5, 2024 23:52
Show Gist options
  • Save patcon/150e743a9591059251346ec74ce09b09 to your computer and use it in GitHub Desktop.
Save patcon/150e743a9591059251346ec74ce09b09 to your computer and use it in GitHub Desktop.

GitHub org pages don't redirect, but github repos do. So can try commonly forked github repos likely to appear in any brigade org.

Ran this to:

  1. get the list of
  2. find the "projects_list_url" values that aren't null, empty
  3. filter for only github.com urls (e.g., https://github.com/code-for-tp)
  4. take only the end of path (e.g., code-for-tp
  5. curl GitHub API for a codeofconduct repo forked from code-for-america (e.g., code-for-tp/codeofconduct)
  6. [leaky level] if redirect, get redirect url

I then curls each API redirect it found, and determined to repo owner. (e.g., https://github.com/techup-group)

$ curl https://raw.githubusercontent.com/codeforamerica/brigade-information/refs/heads/master/organizations.json
  | jq --raw-output '.[].projects_list_url
    | select( . != null)
    | select( . != "")'
  | grep github.com
  | xargs basename
  | xargs -I'{}' curl --silent --header "authorization: Bearer $GH_EMAIL_TOKEN" 'https://api.github.com/repos/{}/codeofconduct'
  | jq '.
    | select(.message != null)
    | .url'

Did this for a few other common repo names, ".github", "codeforamerica.org", "brigade", "brigade-information"

This is what I found:

  • Code for Miami => CodeforSouth => Open Miami
  • Code for Tampa Bay => TechUP Group
  • Code for Hawaii => Code with Aloha
  • codeforchicago => code-312
  • Code for Atlanta => CivicTechAtlanta
  • Code for Asheville => CodeWithAsheville
  • codeforgreenville => hackgvl
  • code for SF => SF Civic Tech
  • OpenSTL (always was this)
  • Open Oakland (always was this)
  • codefornebraska => opennebraska

Just curling for the org in API gave this list, maybe also helpful: (any "null" value was an org that was deleted or renamed)

$ curl https://raw.githubusercontent.com/codeforamerica/brigade-information/refs/heads/master/organizations.json
  | jq --raw-output '.[].projects_list_url
    | select( . != null)
    | select( . != "")'
  | grep github.com
  | xargs basename
  | xargs -I'{}' curl --silent --header "authorization: Bearer $GH_EMAIL_TOKEN" "https://api.github.com/orgs/{}"
  | jq --raw-output "\"{} => \" + .name"'

Yielding: (this doesn't show redirects, but just the name that goes with a brigade, because sometimes brigades mention a rename and don't actually change the github org URL)

18f => 18F
akroncivichackathon => Akron Civic Hackathon
a2civictech => a2civictech
betanyc => BetaNYC
caciviclab => CA Civic Lab
projects.json =>
chicago => City of Chicago
codeforabq => Code for NM
CodeForAfrica => Code for Africa (CfA)
codeforamerica => Code for America
codeforanchorage => Code for Anchorage
codeforasheville =>
codeforatlanta =>
CodeforAustralia => Code for Australia
codeforbcs => Code for BCS
CodeforBirmingham => Code for Birmingham
BMGhack => BMGHack
codeforboston => Code for Boston
CodeForBoulder => Code for Boulder
codeforbrazil =>
codeforbtv => Code for BTV, A Code for America Brigade
CodeForBuffalo => Code for Buffalo
codeforcary => Code for Cary
code-for-chapel-hill => Code for Chapel Hill
code-for-charlottesville => Code for Charlottesville
code-for-chicago =>
CodeForBoise =>
SCODEMeetup => Open Columbus
CodeForCT => Code For Connecticut
codefordallas => Open Dallas
open-indy => Open Indy Brigade
codeforkyana => Open Kentuckiana
codeforvegas => OLD Code for Vegas Foundation
issues =>
code-for-montana => Code for Montana
code4puertorico => Code 4 Puerto Rico
code-for-syracuse => Code for Syracuse
opensaltlake =>
hack-for-la =>
codeforkansascity => Code for Kansas City
opencltbrigade => Open Charlotte Brigade
CodeForChofu => Code for Chofu
codeforcroatia => Code for Croatia
CodeForCuritiba => Code For Curitiba
codefordayton => Code For Dayton
codefordc =>
codefordenver => Code for Denver
codefordetroit => Code for Detroit
codefordurham => Code with Durham
codeforeauclaire => Code For Eau Claire
codeforeurope => Code for Europe
codeforftl => Code For Fort Lauderdale
Code-for-Fukuoka => Code for Fukuoka
c4gnv =>
codeforgermany => Code for Germany
CodeForAfrica => Code for Africa (CfA)
CODE-for-GIFU => CODE for GIFU
codeforgso => Code for Greensboro
Code4HR => Code for Hampton Roads (Norfolk/Virginia Beach)
codeforhawaii =>
codeformuskogee => Code For Muskogee
codeforpdx => CODE PDX
CodeRGV => Code RGV
code4huntsville =>
codeforibaraki => Code for Ibaraki
code4ikoma => CODE for IKOMA
codeforireland => Code for Ireland
codeforjapan => Code for Japan
codeforjerseycity => Code for Jersey City
codeforkanazawa-org => Code for Kanazawa
codeforkaohsiung => Code for Kaohsiung
code4ka => Code for Kashiwa
openkawasaki =>
CodeForAfrica => Code for Africa (CfA)
codeforkobe => Code for Kobe
openeugene => OpenEugene
openmaine => OpenMaine
Code-for-Miami =>
code-for-nashville => Code for Nashville
codefornh => Code for New Hampshire
codefornola => Code for New Orleans
CodeforNRV => Code for New River Valley
code4newark => Code for Newark
CodeForAfrica => Code for Africa (CfA)
sarl-hackerspace =>
codeforokinawa => Code for Okinawa
cforlando => Code for Orlando
codeforpakistan => Code for Pakistan
codeforpg => Code for Brazil :: Brigade Ponta Grossa
code4romania => Code for Romania
code4romania => Code for Romania
code4romania => Code for Romania
Open-NC => Open NC Collaborative
Open-NC => Open NC Collaborative
CodeForRockford =>
codeforrva => Code for RVA
code4sac => Code for Sacramento
CodeforSAITAMA =>
sfbrigade => SFBrigade
codeforsanjose => Open Source San José
codeforsapporo =>
code4shiogama =>
OpenUpSA => OpenUp
CodeForSummitCounty => Code for Summit County
codefortallahassee => Code For Tallahassee
code-for-tb =>
slashroots => SlashRoots Foundation
codefortomorrow => Code for Tomorrow
CodeForTucson => Code for Tucson
codefortulsa => Civic Tech Oklahoma
CodeforTuscaloosa => Code for Tuscaloosa
codeforcanada => Code for Canada
codeisland => Code Island
CodeandoMexico => Codeando México
codeforseoul => Code for Seoul
labplc => Laboratorio para la Ciudad
datasf =>
detroitwaterproject =>
sc3 =>
OpenToledo => Open Toledo
g0v => g0v
HackMichiana => Hack Michiana
hackingmadison => HackingMadison
hacktahoe =>
hackingmty =>
loomio => Loomio
mysociety => mySociety
OKLabBonn => OK Lab Bonn
CodeforChemnitz => Code for Chemnitz
CodeForGiessen =>
opendata-heilbronn => Open Data Heilbronn
codeforcologne => Code for Cologne
CodeforLeipzig => Code for Leipzig
codeformunich => Code for München
codeformuenster => Code for Münster
open-austin => Open Austin
CodeForBrazil =>
openchattanooga => Open Chattanooga
opencleveland => Open Cleveland
open-data-standards =>
OpenDataSTL =>
openelections => OpenElections
open-indy => Open Indy Brigade
openlexington => OpenLexington
codefornebraska =>
codeforpittsburgh => Code for Pittsburgh
opensatx => openSATX
opensandiego => Open San Diego
opensavannah => OpenSavannah
OpenSyracuse =>
opentwincities => Open Twin Cities
openwichita => Open Wichita
openzagreb => Open Zagreb
presidential-innovation-fellows => Presidential Innovation Fellows
project-open-data => Project Open Data
smartchicago => Smart Chicago Collaborative
uscensusbureau => US Census Bureau
MicrosoftTCE => Microsoft Cities
oaktechequity => Oakland TechEquity
Blue-Sky-Skunkworks => Blue Sky Stewardship's Skunkworks Division
milwaukeedata => Milwaukee Data Initiative
CodeForBaltimore => Code for Baltimore
CodeForBerkeley => Code for Berkeley
codeforfoco => Code for Fort Collins
codeforgreenville =>
codeforokc => Code for OKC
codeforprinceton => Code for Princeton
OpenDataDE => Open Data Delaware
OpenDenton => Open Denton
sketch-city => sketch-city
codeforUV => Code for UV
Open-Columbia-County => Open Columbia County
Open-SGF => Open SGF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment