Skip to content

Instantly share code, notes, and snippets.

@briandfoy
Created September 12, 2025 00:04
Show Gist options
  • Save briandfoy/ce386d9014e372eb2a5c0cfb711f165f to your computer and use it in GitHub Desktop.
Save briandfoy/ce386d9014e372eb2a5c0cfb711f165f to your computer and use it in GitHub Desktop.
Find the days you did not contribute to GitHub
#!/bin/sh
USER=${GITHUB_USER}
FROM=$(date -u +"%Y-01-01T00:00:00Z")
TO=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
gh api graphql -f query='
query($login:String!,$from:DateTime!,$to:DateTime!){
user(login:$login){
contributionsCollection(from:$from,to:$to){
contributionCalendar{
weeks{
contributionDays{ date contributionCount }
}
}
}
}
}' -F login="$USER" -F from="$FROM" -F to="$TO" \
| jq -r '.data.user.contributionsCollection.contributionCalendar.weeks[]
.contributionDays[] | select(.contributionCount==0) | .date'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment