github-issues-fetcher
v1.0.2
Published
CLI tool to fetch and filter GitHub issues from multiple repositories
Maintainers
Readme
GitHub Issues Fetcher
A CLI tool to fetch and filter GitHub issues from multiple repositories. This tool allows you to:
- Fetch issues from multiple GitHub organizations or specific repositories
- Filter issues by labels
- Sort issues by creation date
- View repository information
- Export results to JSON files
Installation
npm install -g github-issues-fetcherConfiguration
- Copy the example environment file:
cp .env.example .env- Edit the
.envfile and add your GitHub token:
GITHUB_TOKEN=your_github_token_hereYou can generate a GitHub token by following GitHub's guide on creating a personal access token.
You can also provide the token via the --token option when running commands.
Usage
Fetch Issues
From organizations:
gh-issues issues -o ethereum privacy-scaling-explorations -l "good first issue" "help wanted" -s 2024-01-01From specific repositories:
gh-issues issues -r ethereum/go-ethereum ethereum/solidity -l "good first issue" -s 2024-01-01Or both:
gh-issues issues -o ethereum -r privacy-scaling-explorations/semaphore -l "good first issue" -s 2024-01-01Export to JSON:
gh-issues issues -o ethereum -l "good first issue" -j issues.jsonOptions:
-o, --orgs: List of GitHub organizations to fetch issues from-r, --repos: List of GitHub repositories to fetch issues from (format: owner/repo)-l, --labels: Filter issues by labels-s, --since: Fetch issues since date (YYYY-MM-DD)-t, --token: GitHub API token (defaults to GITHUB_TOKEN env variable)-j, --json: Export results to JSON file
Fetch Repositories
From organizations:
gh-issues repos -o ethereum privacy-scaling-explorations -s 2024-01-01From specific repositories:
gh-issues repos -r ethereum/go-ethereum ethereum/solidity -s 2024-01-01Or both:
gh-issues repos -o ethereum -r privacy-scaling-explorations/semaphore -s 2024-01-01Export to JSON:
gh-issues repos -o ethereum -j repos.jsonOptions:
-o, --orgs: List of GitHub organizations to fetch repositories from-r, --repos: List of specific GitHub repositories to fetch (format: owner/repo)-s, --since: Fetch repositories since date (YYYY-MM-DD)-t, --token: GitHub API token (defaults to GITHUB_TOKEN env variable)-j, --json: Export results to JSON file
JSON Output Format
The exported JSON file includes metadata about the query and the results:
{
"metadata": {
"timestamp": "2024-03-14T12:00:00.000Z",
"query": {
"orgs": ["ethereum"],
"repos": ["privacy-scaling-explorations/semaphore"],
"labels": ["good first issue"],
"since": "2024-01-01"
}
},
"issues": [
// Array of issue objects
]
}Development
- Clone the repository
- Install dependencies:
npm install- Build the project:
npm run build- Run in development mode:
npm run devLicense
MIT
