Tech
gh api --paginate --slurp --jq 'length' Counts Pages, Not Issues
gh api --paginate --slurp --jq 'length' is the command everyone reaches for to count issues in a repository. It does not count issues. It counts pages .
I found this while writing pagination recipes for a toolkit, and then found the same wrong example in a lesson I had published β with 1,797 search impressions a month on it. So this is partly a correction and partly the mental model that stops it happening again.
What --slurp actually does
From gh api --help (gh 2.100.0)...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to