Files
heretek-actions/.github/actions/pr-summary/action.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

75 lines
2.1 KiB
YAML

name: "PR Summary"
description: |
Analyzes a pull request diff and generates a structured summary with
file breakdown, change statistics, and linked issues.
Outputs both a PR comment and .agent/output.json.
author: "Heretek-AI"
inputs:
github-token:
description: "GitHub token for API access"
default: "${{ github.token }}"
required: false
max-files:
description: "Maximum files to include in detailed breakdown"
default: "50"
required: false
include-diff-stats:
description: "Include per-file diff stats in output"
default: "true"
required: false
include-suggested-reviewers:
description: "Suggest reviewers from CODEOWNERS"
default: "true"
required: false
post-comment:
description: "Post summary as a PR comment"
default: "true"
required: false
outputs:
agent_action:
description: "Always 'pr-summary'"
value: "pr-summary"
status:
description: "success | failure"
value: ${{ steps.analyze.outputs.status }}
summary:
description: "PR summary text"
value: ${{ steps.analyze.outputs.summary }}
runs:
using: "composite"
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
fetch-depth: "0"
- name: "Analyze PR"
id: analyze
shell: bash
env:
GH_TOKEN: ${{ inputs.github-token }}
MAX_FILES: ${{ inputs.max-files }}
INCLUDE_DIFF_STATS: ${{ inputs.include-diff-stats }}
INCLUDE_REVIEWERS: ${{ inputs.include-suggested-reviewers }}
POST_COMMENT: ${{ inputs.post-comment }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_BODY: ${{ github.event.pull_request.body }}
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
PR_BASE: ${{ github.event.pull_request.base.ref }}
PR_HEAD: ${{ github.event.pull_request.head.ref }}
run: |
${{ github.action_path }}/analyze-pr.sh
- name: "Upload Agent Output"
uses: actions/upload-artifact@v4
with:
name: agent-output
path: .agent/output.json
if-no-files-found: warn
retention-days: 7