Metadata-Version: 2.4
Name: github-repository-report
Version: 0.0.3
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 --docker-compose-profile=development
```

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`. The required `--docker-compose-profile` value is passed
to the Sheriff repository check.

Generate a report for a specific discovered local repository:

```bash
github-repository-report --organization=kaizten --repository=tools --docker-compose-profile=development
```

The command scans `--root` and automatically selects the matching local
checkout.

Useful options:

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

Each selected local repository is reported after running:

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

The report includes another Sheriff section after running the repository check
with the requested Docker Compose profile:

```bash
./sheriff.sh repository --docker-compose-profile development
```

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.

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
```
