Metadata-Version: 2.4
Name: github-repository-report
Version: 0.0.2
Summary: Generate timestamp reports for local GitHub repositories.
Author: Kaizten Analytics
License-Expression: LicenseRef-Proprietary
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# github-repository-report

Generate timestamp reports for local GitHub repositories and include command
output from each repository.

## Requirements

- Python 3
- GitHub CLI (`gh`) installed

The script only checks that `gh` exists. It does not call GitHub for the
timestamp report.

## Usage

```bash
github-repository-report
```

Without repository arguments, the CLI scans your home directory for local Git
repositories with GitHub remotes, prints the discovered repositories, and asks
which reports to generate. You can enter a single number, a comma-separated
list, a range, or `all`.

Generate a report for a specific discovered local repository:

```bash
github-repository-report --organization=kaizten --repository=tools
```

The command scans `--root` and automatically selects the matching local
checkout. Use `--repo=kaizten/tools` only to generate a report without resolving
a local checkout; repository-local commands and commits are unavailable in that
mode.

Useful options:

```bash
github-repository-report --root=~/workspace --output-dir=~/.github-repository-report --commit-days=30
```

Each selected local repository is reported after running:

```bash
./sheriff.sh
```

If the repository contains `schemathesis.sh`, the report also runs:

```bash
./schemathesis.sh
```

If the repository contains `run-e2e.sh`, the report also runs:

```bash
./run-e2e.sh
```

The report includes the command, exit code, standard output, and standard
error for each command. If `schemathesis.sh` or `run-e2e.sh` is not found, the
report records that it was skipped. It also includes commits from the last 14
days by default, with each commit's short hash, timestamp, author name, subject,
and counts for files added, deleted, and changed. Commit hashes link to GitHub,
subjects are limited to 50 characters in the table, and the commits section
summarizes commit counts by GitHub user. Use `--commit-days` to choose a
different number of days.

If a repository is provided directly without a discovered local path, the report
records that the command was not executed and that commits are unavailable.

Reports are written to:

```text
~/.github-repository-report/<owner>/<repository>/<owner>_<repository>_<timestamp>.md
```

## Development

```bash
python3 -m unittest discover -s . -p 'test_*.py'
npm pack --dry-run
```

## Publish

```bash
npm run publish:npm -- --dry-run
npm run publish:npm
```
