Uses mergestat
to access the GitHub API and go-mysql-server
.
Currently, only stargazers
table is available.
GitHub token used is from a "bot" account.
Hosted on Fly.
Username: root
Password: github
{ | |
"__inputs": [ | |
{ | |
"name": "DS_MERGESTAT_INTERNAL", | |
"label": "MergeStat Internal", | |
"description": "", | |
"type": "datasource", | |
"pluginId": "postgres", | |
"pluginName": "PostgreSQL" | |
} |
-- enable plv8 extension | |
CREATE EXTENSION plv8; | |
-- define plv8_yaml_to_json() UDF using implementation from: https://github.com/nodeca/js-yaml | |
CREATE OR REPLACE FUNCTION plv8_yaml_to_json(yaml_input TEXT) RETURNS JSONB AS $$ | |
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ function isNothing(e){return null==e}function isObject(e){return"object"==typeof e&&null!==e}function toArray(e){return Array.isArray(e)?e:isNothing(e)?[]:[e]}function extend(e,t){var n,r,o,a;if(t)for(n=0,r=(a=Object.keys(t)).length;n<r;n+=1)e[o=a[n]]=t[o];return e}function repeat(e,t){var n,r="";for(n=0;n<t;n+=1)r+=e;return r}function isNegativeZero(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}var isNothing_1=isNothing,isObject_1=isObject,toArray_1=toArray,repeat_1=repeat,isNegativeZero_1=isNegativeZero,extend_1=extend,common={isNothing:isNothing_1,isObject:isObject_1,toArray:toArray_1,repeat:repeat_1,isNegativeZero:isNegativeZero_1,extend:extend_1};function formatError(e,t){var n="",r=e.reason||"(unknown reason)";re |
Uses mergestat
to access the GitHub API and go-mysql-server
.
Currently, only stargazers
table is available.
GitHub token used is from a "bot" account.
Hosted on Fly.
Username: root
Password: github
SELECT | |
name, primary_language, | |
github_repo_file_content('google', name, 'go.mod') as go_mod | |
FROM github_org_repos('google') | |
WHERE primary_language = 'Go' |
SELECT | |
count(*), | |
substr(author_email, instr(author_email, '@')+1) AS email_domain -- https://sqlite.org/lang_corefunc.html | |
FROM commits | |
WHERE parent_count < 2 -- ignore merge commits | |
GROUP BY email_domain | |
ORDER BY count(*) DESC |
AskGit is a tool looking for more (interesting) use cases.
This gist takes a look at the email domains of contributors to two major open source code bases (Linux and Kubernetes).
askgit-query.sql
can be piped into the askgit
command to produce the output in k8s-SHA.txt
and linux-SHA.txt
Commit Count
is the total number of commits by contributors with an email address from Domain
Unique Emails
is the number of unique contributors with an email from Domain
Domain
is the email domainUsing gitqlite
, query for percentage of commit count by author (in this case in facebook/react
). Limit to top 25, include a "chart"
_nnnn_ | |
dGGGGMMb ,""""""""""""""""""""""""""""". | |
@p~qp~~qMb | // TODO make this better 🎉 | | |
M|@||@) M| _;.............................' | |
@,----.JM| -' | |
JS^\__/ qKL | |
dZP qKRb | |
dZP qKKb | |
fZP SMMb | |
HZM MMMM |
const names = ["world", "patrick", "deno", "adhoc"] | |
names.forEach(n => console.log(`hello, ${n}!`)) |
Verifying my Blockstack ID is secured with the address 1NKAeaGUag7tpGxpy6unSrAWRZhXJe5JQx https://explorer.blockstack.org/address/1NKAeaGUag7tpGxpy6unSrAWRZhXJe5JQx |