Skip to content

Commit 84a2301

Browse files
committed
docs+gov: README (badges, sponsors, roadmap) + FUNDING + SECURITY + CONTRIBUTING + templates + release workflow
1 parent 3ee5283 commit 84a2301

File tree

10 files changed

+465
-26
lines changed

10 files changed

+465
-26
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
github: []
2+
custom:
3+
- https://www.paypal.com/donate/\?hosted_button_id\=YVENCBNCZWVPW
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Bug report
2+
description: Reportar un problema
3+
labels: [bug]
4+
body:
5+
- type: textarea
6+
attributes: { label: Descripción, placeholder: Qué ocurrió y qué esperabas }
7+
validations: { required: true }
8+
- type: textarea
9+
attributes: { label: Repro, placeholder: Pasos, input, versión }
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: Feature request
2+
description: Solicitar mejora
3+
labels: [enhancement]
4+
body:
5+
- type: textarea
6+
attributes: { label: Propuesta, placeholder: ¿Qué y por qué? }
7+
validations: { required: true }

.github/workflows/dependabot-label.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Release (publish)
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 9 * * 1' # Lunes 09:00 UTC
7+
8+
permissions:
9+
contents: write
10+
pull-requests: read
11+
12+
jobs:
13+
publish:
14+
if: ${{ github.repository == 'CoderDeltaLAN/diff-risk-dashboard' }}
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: release-drafter/release-drafter@v6
18+
with:
19+
publish: true
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @CoderDeltaLAN

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Contributing
2+
3+
1) PRs pequeños con Conventional Commits.
4+
2) CI local: `ruff`, `black --check`, `pytest`, `mypy`.
5+
3) Activa auto-merge cuando los checks estén en verde.

README.md

Lines changed: 144 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,152 @@
1-
# diff-risk-dashboard
1+
# 🛡️ Diff Risk Dashboard — APV JSON → Summary (CLI & Markdown)
22

3-
Visual dashboard for Pull Request risk exposure, designed to consume **ai-patch-verifier** JSON outputs.
3+
Un **CLI** mínimo y profesional para resumir salidas de **ai-patch-verifier (APV)**:
4+
cuenta findings por severidad, calcula el **worst**, expone un **nivel de riesgo** y puede renderizar **Markdown** listo para pegar en PRs.
5+
6+
<div align="center">
7+
8+
[![CI / build](https://github.com/CoderDeltaLAN/diff-risk-dashboard/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/CoderDeltaLAN/diff-risk-dashboard/actions/workflows/build.yml)
9+
[![CodeQL Analysis](https://github.com/CoderDeltaLAN/diff-risk-dashboard/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/CoderDeltaLAN/diff-risk-dashboard/actions/workflows/codeql.yml)
10+
[![Release](https://img.shields.io/github/v/release/CoderDeltaLAN/diff-risk-dashboard?display_name=tag)](https://github.com/CoderDeltaLAN/diff-risk-dashboard/releases)
11+
![Python 3.11|3.12](https://img.shields.io/badge/Python-3.11%20|%203.12-3776AB?logo=python)
12+
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
13+
[![Donate](https://img.shields.io/badge/Donate-PayPal-0070ba?logo=paypal&logoColor=white)](https://www.paypal.com/donate/?hosted_button_id=YVENCBNCZWVPW)
14+
15+
</div>
16+
17+
---
18+
19+
## ✨ ¿Qué hace?
20+
21+
- Lee APV JSON (`predicted_risk` o `severity`), cuenta por severidad y **detecta el peor**.
22+
- Devuelve **tabla**, **JSON** o **Markdown** (`--format {table,json,md}`).
23+
- **Exit code** configurable por riesgo (gateo para CI).
24+
25+
---
26+
27+
## 🚀 Instalación / Uso
28+
29+
### A) Dev local
430

5-
## Quick Start
631
```bash
7-
poetry install
8-
poetry run drd summarize examples/sample_apv.json
32+
python -m pip install --upgrade pip
33+
pip install -e .
34+
```
35+
36+
### B) Usuario final (pipx)
37+
38+
```bash
39+
pipx install git+https://github.com/CoderDeltaLAN/diff-risk-dashboard@main
40+
```
41+
42+
> Binarios expuestos: **`diff-risk`** (CLI) y **`diff-risk-web`** (visor web opcional).
43+
44+
---
45+
46+
## 🧰 CLI
47+
48+
```bash
49+
# Ayuda
50+
diff-risk -h
51+
52+
# JSON
53+
diff-risk examples/sample_apv.json --format json --no-exit-by-risk
54+
55+
# Markdown a archivo
56+
diff-risk examples/sample_apv.json --format md -o report.md --no-exit-by-risk
57+
58+
# Tabla (por defecto) + exit code por riesgo
59+
diff-risk examples/sample_apv.json
60+
```
61+
62+
Salida Markdown típica:
63+
64+
```md
65+
# Diff Risk Dashboard 🔴 — Worst: **HIGH**
66+
67+
| Severity | Count |
68+
|---|---:|
69+
| CRITICAL | 0 |
70+
| HIGH | 1 |
71+
| MEDIUM | 1 |
72+
| LOW | 1 |
73+
| INFO | 0 |
74+
| **TOTAL** | **3** |
75+
76+
> Generated by diff-risk-dashboard CLI
977
```
1078

11-
## Run checks (mirrors CI)
79+
---
80+
81+
## 🌐 Visor web opcional
82+
1283
```bash
13-
poetry run ruff check .
14-
poetry run black --check .
15-
PYTHONPATH=src poetry run pytest -q
16-
poetry run mypy src
84+
python -m pip install "fastapi>=0.110" "uvicorn[standard]>=0.27"
85+
diff-risk-web # abre http://127.0.0.1:8000
1786
```
1887

19-
## License
20-
MIT
88+
---
89+
90+
## 🗂️ Estructura
91+
92+
```text
93+
.
94+
├── examples/ # JSON de ejemplo
95+
├── src/diff_risk_dashboard/ # core, cli, report, web
96+
├── tests/ # pytest
97+
└── .github/workflows/ # build.yml, codeql.yml, release-publish.yml, etc.
98+
```
99+
100+
---
101+
102+
## 🔄 CI/CD
103+
104+
- **Build** (3.11/3.12): ruff, black --check, pytest, mypy.
105+
- **CodeQL** en PRs y `main`.
106+
- **Release Drafter** + workflow `release (publish)` para publicar tags con notas.
107+
108+
---
109+
110+
## 🗺️ Roadmap (corto)
111+
112+
- **v0.2.x**: Cron de publicación automática (Release Drafter).
113+
- **Gobernanza**: `SECURITY.md`, `CONTRIBUTING.md`, `CODEOWNERS`, templates de issues.
114+
- **Calidad**: cobertura en CI + `pre-commit` + agrupación de Dependabot.
115+
116+
> Opcional: publicar en **PyPI/GHCR** y añadir badge.
117+
118+
---
119+
120+
## 🤝 Contribuir
121+
122+
- PRs pequeños (Conventional Commits).
123+
- CI local verde antes de abrir PR.
124+
- Auto-merge cuando los checks pasan.
125+
126+
---
127+
128+
## 🔐 Seguridad
129+
130+
- Reportes via **GitHub Security Advisories** (no PoCs públicos).
131+
- Respuesta inicial en 72h.
132+
133+
---
134+
135+
## 💚 Donations & Sponsorship
136+
137+
Si este proyecto te ahorra tiempo, considera apoyar su mantenimiento. ¡Gracias!
138+
[![Donate](https://img.shields.io/badge/Donate-PayPal-0070ba?logo=paypal&logoColor=white)](https://www.paypal.com/donate/?hosted_button_id=YVENCBNCZWVPW)
139+
140+
---
141+
142+
## 📈 SEO
143+
144+
diff risk dashboard, apv json, ai-patch-verifier summary, security risk gate,
145+
python cli for risk, markdown status report, codeql github actions, always green ci,
146+
ruff black pytest mypy, branch protection required checks, squash merge linear history
147+
148+
---
149+
150+
## 📄 Licencia
151+
152+
**MIT**. Ver [LICENSE](LICENSE).

SECURITY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Security Policy
2+
3+
- Report vulnerabilities via **GitHub Security Advisories** or email.
4+
- Do not open public issues with exploitable PoCs.
5+
- Initial response within 72h.

0 commit comments

Comments
 (0)