Files
heretek-actions/.github/workflows/review.yml
T
John SmithandClaude c3633b2b14 Initial commit: Heretek Actions — agent-facing GitHub Actions
Complete implementation of all 7 phases:

Phase 1: Foundation
- Repository directory structure
- .agent/schema.json — Standard JSON envelope schema
- .github/CODEOWNERS, LICENSE (MIT), .gitignore
- README.md shell

Phase 2: Agent-Facing Actions (5 composite actions)
- agent-context — Scans repo, detects stack, queries GitHub API
- pr-summary — Analyzes PR diff, categorizes files, links issues
- issue-triage — Classifies, labels, detects duplicates
- check-status — Watches CI checks, produces merged status
- review — Lightweight structural code analysis
- Shared agent-envelope.sh helper for standardized .agent/output.json

Phase 3: Pre-commit Hooks
- .pre-commit-config.yaml — Universal hook config
- pre-commit-ci.yml — CI workflow running pre-commit

Phase 4: CI Composite Actions
- rust-ci — fmt, clippy, test, coverage (opt), audit (opt)
- js-ci — lint, typecheck, test (npm/pnpm/yarn/bun)
- python-ci — lint (ruff), typecheck (mypy), test (pytest)

Phase 5: Universal CI Orchestrator
- check.yml — Auto-detects languages, routes to CI actions

Phase 6: Universal Release
- release action — Docker, Flatpak, npm, GitHub releases
- release.yml — workflow_call reusable workflow

Phase 7: Documentation
- Full README with quick start, per-action docs, agent integration guide

Co-Authored-By: Claude <[email protected]>
2026-07-30 10:58:06 -04:00

46 lines
1.7 KiB
YAML

name: "Automated Review"
on:
pull_request:
types: [opened, synchronize]
permissions:
contents: read
pull-requests: write
checks: write
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Run Review"
uses: Heretek-AI/heretek-actions/.github/actions/review@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Summarize Review"
shell: bash
run: |
if [ -f .agent/output.json ]; then
ERROR_COUNT=$(cat .agent/output.json | jq '.findings | map(select(.severity == "error")) | length')
WARN_COUNT=$(cat .agent/output.json | jq '.findings | map(select(.severity == "warning")) | length')
INFO_COUNT=$(cat .agent/output.json | jq '.findings | map(select(.severity == "info")) | length')
echo "## Review Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Severity | Count |" >> $GITHUB_STEP_SUMMARY
echo "|----------|-------|" >> $GITHUB_STEP_SUMMARY
echo "| 🔴 Error | ${ERROR_COUNT} |" >> $GITHUB_STEP_SUMMARY
echo "| 🟡 Warning | ${WARN_COUNT} |" >> $GITHUB_STEP_SUMMARY
echo "| 🔵 Info | ${INFO_COUNT} |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "$(cat .agent/output.json | jq '.findings | length')" -gt 0 ] && [ "$(cat .agent/output.json | jq '.findings | length')" -le 20 ]; then
echo "### Findings" >> $GITHUB_STEP_SUMMARY
cat .agent/output.json | jq -r '.findings[] | "- [\(.severity)] \(.file):\(.line) — \(.message)"' >> $GITHUB_STEP_SUMMARY
fi
fi