Skip to content

Instantly share code, notes, and snippets.

@TaylerUva
Created January 9, 2022 20:25
Show Gist options
  • Save TaylerUva/6a3582c992f1fe3251af13781b30ce4f to your computer and use it in GitHub Desktop.
Save TaylerUva/6a3582c992f1fe3251af13781b30ce4f to your computer and use it in GitHub Desktop.
Export GitHub Issues and Pull Requests to JSON
# Export Issues
gh issue list -s all --json assignees,author,body,closed,closedAt,comments,createdAt,labels,milestone,number,projectCards,reactionGroups,state,title,updatedAt,id,url > issues.json
# Export Pull Requests
gh pr list -s all --json additions,assignees,author,baseRefName,body,changedFiles,closed,closedAt,comments,commits,createdAt,deletions,files,headRefName,headRepository,headRepositoryOwner,isCrossRepository,isDraft,labels,maintainerCanModify,mergeCommit,mergeStateStatus,mergeable,mergedAt,mergedBy,milestone,number,potentialMergeCommit,projectCards,reactionGroups,reviewDecision,reviewRequests,reviews,state,statusCheckRollup,title,updatedAt,id,url > prs.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment