https://github.com/danimal141/github-pr-analyzer
https://github.com/danimal141/github-pr-analyzer
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/danimal141/github-pr-analyzer
- Owner: danimal141
- Created: 2023-12-30T09:12:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-22T04:58:20.000Z (over 1 year ago)
- Last Synced: 2024-04-14T18:20:36.341Z (about 1 year ago)
- Language: Shell
- Size: 18.6 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitHub PR Analyzer
## Overview
This repository contains scripts for analyzing pull requests (PRs) on GitHub repositories. It includes tools for aggregating and formatting data about PRs.## Prerequisites
- GitHub CLI (`gh`): [GitHub CLI](https://github.com/cli/cli)
- `jq`: [jq](https://stedolan.github.io/jq/)## Commands
### gpa (github-pr-analyzer)
- **Description:** Analyzes PRs in a GitHub repository within a specified date range.
- **Usage:** `gpa --since=YYYY-MM-DD --until=YYYY-MM-DD --repo=orgName/repoName [--output=json|tsv] [--authors=author1,author2] [-v]`
- **Options:**
- `--since`, `--until`: Date range for PR analysis.
- `--repo`: Target GitHub repository.
- `--output`: Output format (json or tsv).
- `--authors`: Filter PRs by authors.
- `-v`: Verbose mode.
- **Example:** `bin/gpa --since=2023-12-05 --until=2023-12-11 --repo=myOrg/myRepo --output=json`### json-aggregator
- **Description:** Aggregates PR data over multiple iterations into a single JSON object.
- **Usage:** `json-aggregator --iter-start=YYYY-MM-DD --iter-end=YYYY-MM-DD --iter-duration=days --count=number --repo=orgName/repoName [--authors=author1,author2] [-v]`
- **Options:**
- Iteration control parameters (`--iter-start`, `--iter-end`, `--iter-duration`).
- `--count`: Number of iterations.
- `--repo`: Target GitHub repository.
- `--authors`: Filter PRs by authors.
- `-v`: Verbose mode.
- **Example:** `bin/json-aggregator --iter-start=2023-12-05 --iter-end=2023-12-11 --iter-duration=7 --count=4 --repo=myOrg/myRepo`### ★tsv-aggregator
- **Description:** Converts JSON output from `json-aggregator` to TSV format.
- **Usage:** `tsv-aggregator --iter-start=YYYY-MM-DD --iter-end=YYYY-MM-DD --iter-duration=days --count=number --repo=orgName/repoName [--authors=author1,author2] [-v]`
- **Options:** Similar to `json-aggregator`.
- **Example:** `bin/tsv-aggregator --iter-start=2023-12-05 --iter-end=2023-12-11 --iter-duration=7 --count=4 --repo=myOrg/myRepo > out.tsv`
- You can paste the result to spreadsheets.## Misc Scripts
### json-to-tsv.py
- **Description:** Python script for converting JSON data to TSV format.
- **Usage:** `python json-to-tsv.py `
- **Details:** Processes JSON data to generate a TSV file suitable for spreadsheets.
- **Example:** `python json-to-tsv.py out.json`