Repository navigation
Expand file tree
/
Copy pathaction.yml
More file actions
69 lines (63 loc) · 2.37 KB
/
Copy pathaction.yml
File metadata and controls
69 lines (63 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: "agent-roast"
description: "Zero-telemetry audit for AI coding shortcuts, skipped tests, and panic loops."
author: "Nariman Abdukarimov"
branding:
icon: "shield"
color: "black"
inputs:
base:
description: "Base branch or commit SHA for diff analysis"
required: false
default: ""
head:
description: "Head commit SHA for pull request analysis"
required: false
default: ""
fail-on:
description: "Comma-separated detectors that trigger pipeline failure (test-skip, type-escape, swallowed-error, trivial-assert, stub-abandonment)"
required: false
default: "test-skip"
format:
description: "Output format: github, terminal, json"
required: false
default: "github"
outputs:
passed:
description: "Whether the audit passed with zero blocking infractions"
value: ${{ steps.run-audit.outputs.passed }}
infractions-count:
description: "Total number of infractions detected"
value: ${{ steps.run-audit.outputs.infractions-count }}
has-supported-changes:
description: "Whether the pull request modified supported source files"
value: ${{ steps.run-audit.outputs.has-supported-changes }}
runs:
using: "composite"
steps:
- name: Run agent-roast audit
id: run-audit
shell: bash
env:
INPUT_BASE: ${{ inputs.base }}
INPUT_HEAD: ${{ inputs.head }}
ROAST_FAIL_ON: ${{ inputs.fail-on }}
ROAST_FORMAT: ${{ inputs.format }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
EVENT_BEFORE_SHA: ${{ github.event.before }}
HEAD_SHA: ${{ github.sha }}
run: |
ROAST_BASE="${INPUT_BASE:-${PR_BASE_SHA:-${EVENT_BEFORE_SHA}}}"
ROAST_HEAD="${INPUT_HEAD:-${PR_HEAD_SHA:-${HEAD_SHA}}}"
if [ -z "$ROAST_BASE" ]; then
echo "::error::Could not resolve base commit SHA. Specify 'base' input or configure actions/checkout with fetch-depth: 0."
exit 2
fi
INSTALL_DIR="${RUNNER_TEMP:-/tmp}/agent-roast-bin"
mkdir -p "$INSTALL_DIR"
npm install --prefix "$INSTALL_DIR" agent-roast@^0.3.0 --ignore-scripts --no-audit --no-fund > /dev/null 2>&1
"$INSTALL_DIR/node_modules/.bin/agent-roast" \
--base "$ROAST_BASE" \
--head "$ROAST_HEAD" \
--fail-on "$ROAST_FAIL_ON" \
--format "$ROAST_FORMAT"