A collection of bash scripts to help manage GitHub organizations, including cloning repositories and extracting issues.
- Clones all repositories from a specified GitHub organization
- Handles pagination with a configurable repository limit (default: 1000)
- Skips already cloned repositories
- Provides detailed progress information
- Error handling and validation
- Extracts all issues (open and closed) from organization repositories
- Creates markdown files for each issue with detailed metadata
- Includes issue title, body, author, state, labels, assignees, and timestamps
- Organizes issues by repository in a structured directory
- Handles pagination with configurable limits
- GitHub CLI (
gh
) installed and configured - Bash shell environment
- Git installed
jq
command-line tool (for issue extractor)
- Clone this repository:
git clone https://github.com/yourusername/gh-helpers.git
cd gh-helpers
./clone-org.sh <github_organization> <clone_directory>
github_organization
: The name of the GitHub organization to clone repositories fromclone_directory
: The directory where repositories will be cloned
./clone-org.sh my-cool-org ./cloned-repos
./issue-extractor.sh <github_organization> [output_directory]
github_organization
: The name of the GitHub organization to extract issues fromoutput_directory
: (Optional) Directory where markdown files will be saved (default:gh_issues_md
)
./issue-extractor.sh my-cool-org ./issues-docs
REPO_LIMIT
: Maximum number of repositories to fetch (default: 1000)
LIMIT
: Maximum number of issues to fetch per repository (default: 1000)REPO_LIMIT
: Maximum number of repositories to process (default: 1000)OUTPUT_DIR
: Base directory for markdown files (default:gh_issues_md
)
Both scripts include comprehensive error checks:
- Validates required arguments
- Checks for required dependencies (GitHub CLI, jq)
- Verifies directory creation
- Handles API failures gracefully
- Validates organization access and existence
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the GNU GPLv3.