Automatyczne generowanie ticketów GitHub na podstawie plików markdown z błędami poleceń.
# Instalacja z PyPI
pip install mdiss
# Aktualizacja do najnowszej wersji
pip install --upgrade mdiss
# Sprawdź wersję
mdiss --version
# Sklonuj repozytorium
git clone https://github.com/wronai/mdiss.git
cd mdiss
# Instalacja zależności deweloperskich
make dev
# Uruchom testy
make test
# Uruchom demo
make demo
# Instalacja i konfiguracja
make install # Zainstaluj zależności
make dev # Zainstaluj zależności deweloperskie
make install-hooks # Zainstaluj git hooks
# Testowanie
make test # Uruchom testy
make test-coverage # Testy z pokryciem kodu
make test-unit # Tylko testy jednostkowe
# Jakość kodu
make lint # Sprawdź jakość kodu
make format # Sformatuj kod
make qa # Uruchom pełne sprawdzenie jakości
# Dokumentacja
make docs # Zbuduj dokumentację
make docs-serve # Uruchom lokalny serwer
# Publikacja
make build # Zbuduj pakiet
make publish # Opublikuj na PyPI
git clone https://github.com/wronai/mdiss.git
cd mdiss
make dev
make install-hooks
git checkout -b feature/nazwa-funkcjonalnosci
Zawsze uruchom przed commitem:
make qa # równoważne z: make format lint test
make version-patch # lub version-minor/version-major
make build
make publish
make docs-deploy
mdiss automatycznie kategoryzuje błędy i określa priorytety:
Tytuł: Fix failed command: Make target: install
Treść:
## Problem Description
Command `make install` is failing consistently.
**Priority**: HIGH
**Category**: dependencies
**Confidence**: 90%
### Error Analysis
🔍 **Root Cause**: Poetry lock file is out of sync with pyproject.toml...
### Suggested Solution
1. Run `poetry lock` to regenerate the lock file
2. Run `poetry install` to install dependencies
3. Commit the updated poetry.lock file
mdiss rozpoznaje pliki w formacie:
## X. Nazwa polecenia
**Command:** `polecenie`
**Source:** ścieżka/do/pliku
**Type:** typ_polecenia
**Status:** ❌ Failed
**Return Code:** kod_błędu
**Execution Time:** czas_w_sekundach
**Output:**
standardowy output
**Error Output:**
komunikaty błędów
**Metadata:**
- **klucz1:** wartość1
- **klucz2:** wartość2
---
graph LR
A[Markdown File] --> B[Parser]
B --> C[Analyzer]
C --> D[GitHub Client]
D --> E[Issues Created]
B --> F[Statistics]
C --> G[Categorization]
C --> H[Priority Assignment]
C --> I[Solution Suggestions]
# 1. Konfiguracja tokenu (jednorazowo)
mdiss setup
# 2. Analiza pliku z błędami
mdiss analyze build_failures.md
# 3. Podgląd issues (dry run)
mdiss create build_failures.md myorg myproject --dry-run
# 4. Tworzenie rzeczywistych issues
mdiss create build_failures.md myorg myproject
# Z dodatkowymi opcjami
mdiss create failures.md owner repo \
--assignees "dev1,dev2" \
--milestone 5 \
--skip-existing \
--token-file .github_token
# Export do różnych formatów
mdiss export failures.md --format json --output data.json
mdiss export failures.md --format csv --output report.csv
# Listowanie istniejących issues
mdiss list-issues owner repo --state open --labels "bug,high"
mdiss doskonale integruje się z systemami CI/CD:
# .github/workflows/auto-issues.yml
name: Auto Issues
on:
workflow_run:
workflows: ["CI"]
types: [completed]
jobs:
create-issues:
if: $
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install mdiss
run: pip install mdiss
- name: Create issues from failures
run: |
mdiss create failure_report.md \
$ \
$
env:
GITHUB_TOKEN: $
from mdiss import MarkdownParser, GitHubClient, ErrorAnalyzer
from mdiss.models import GitHubConfig
# Parsowanie pliku
parser = MarkdownParser()
commands = parser.parse_file("failures.md")
# Analiza błędów
analyzer = ErrorAnalyzer()
for cmd in commands:
analysis = analyzer.analyze(cmd)
print(f"Priority: {analysis.priority.value}")
print(f"Category: {analysis.category.value}")
# Tworzenie issues
config = GitHubConfig(token="...", owner="...", repo="...")
client = GitHubClient(config)
for cmd in commands:
issue = client.create_issue_from_command(cmd)
print(f"Created: {issue['html_url']}")
mdiss generuje szczegółowe statystyki:
mdiss analyze large_failure_report.md
Przykładowy output:
📊 Statystyki:
• Całkowita liczba poleceń: 84
• Średni czas wykonania: 8.5s
• Timeout'y: 6
• Krytyczne błędy: 2
🔧 Typy poleceń:
• make_target: 45
• npm_script: 25
• docker: 8
• python: 4
🚨 Kody błędów:
• 2: 35
• 1: 28
• 254: 12
• -1: 6
Stworzone przez WRONAI Team ❤️