Skip to content

Instantly share code, notes, and snippets.

@andxyz
Forked from mislav/licenses-api.sh
Last active November 11, 2015 16:33
Show Gist options
  • Save andxyz/88a020f2ca414efc1d95 to your computer and use it in GitHub Desktop.
Save andxyz/88a020f2ca414efc1d95 to your computer and use it in GitHub Desktop.
An example of using the GitHub Licenses API, currently in preview.
#!/usr/bin/env bash
curl -s -H 'Accept: application/vnd.github.drax-preview+json' \
https://api.github.com/orgs/scoremedia/repos?per_page=100 | \
grep -A1 '"license"' | grep '"key"' | cut -d'"' -f4 | \
sort | uniq -c
# 5 apache-2.0
# 1 bsd-3-clause
# 2 cc0-1.0
# 1 gpl-2.0
# 56 mit
# 12 other
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment