Add gh-knowledge-base.sh script for GitHub issue/PR archival#1
Open
kertal wants to merge 1 commit into
Open
Conversation
Bash script using gh CLI to download Issues and PRs filtered by label, with all comments, formatted as Markdown files organized by year/month. Designed for searchability in Cursor, Copilot, and other LLM tools. https://claude.ai/code/session_017Miq8dGAzuYS2Lng1stFUs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces
gh-knowledge-base.sh, a comprehensive Bash script that downloads GitHub Issues and Pull Requests filtered by label, along with all their comments, and saves them as organized Markdown files. The output is structured by year/month and optimized for searching in LLM-powered tools like Cursor and GitHub Copilot.Key Changes
New script:
gh-knowledge-base.sh— A 597-line Bash utility that:YYYY/MM-month/directory structureConfiguration files:
.gitignore— Excludes.envand theknowledge-base/output directory.env.example— Template forGITHUB_TOKENenvironment variable with setup instructionsNotable Implementation Details
gh api --paginateto handle repositories with many commentsUsage Example
This creates a searchable knowledge base ideal for context injection into LLM-powered development tools.
https://claude.ai/code/session_017Miq8dGAzuYS2Lng1stFUs