@safetnsr/vet 1.22.0 → 1.22.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -127,6 +127,8 @@ catch problems as the agent creates them, not after it's done.
127
127
 
128
128
  ## CI/CD
129
129
 
130
+ ### Quick (one-liner)
131
+
130
132
  ```yaml
131
133
  # .github/workflows/vet.yml
132
134
  name: vet
@@ -141,7 +143,43 @@ jobs:
141
143
  - run: npx @safetnsr/vet --ci
142
144
  ```
143
145
 
144
- GitHub Action: [`safetnsr/vet-action`](https://github.com/safetnsr/vet-action) (coming soon)
146
+ ### GitHub Action (with PR comments)
147
+
148
+ Posts a score card directly on your PR with pass/fail status:
149
+
150
+ ```yaml
151
+ name: vet
152
+ on:
153
+ pull_request:
154
+ branches: [main]
155
+
156
+ permissions:
157
+ contents: read
158
+ pull-requests: write
159
+
160
+ jobs:
161
+ vet:
162
+ runs-on: ubuntu-latest
163
+ steps:
164
+ - uses: actions/checkout@v4
165
+ with:
166
+ fetch-depth: 0
167
+ - uses: safetnsr/vet/.github/actions/vet@main
168
+ with:
169
+ threshold: C # minimum grade to pass (A/B/C/D/F)
170
+ comment: true # post score card as PR comment
171
+ ```
172
+
173
+ **Inputs:**
174
+
175
+ | Input | Default | Description |
176
+ |-------|---------|-------------|
177
+ | `threshold` | `C` | Minimum grade to pass |
178
+ | `working-directory` | `.` | Directory to run vet in |
179
+ | `version` | `latest` | @safetnsr/vet version |
180
+ | `comment` | `true` | Post results as PR comment |
181
+
182
+ **Outputs:** `score`, `grade`, `passed`
145
183
 
146
184
  ## config
147
185
 
@@ -156,6 +156,7 @@ function isInCodeContext(lines, lineIndex) {
156
156
  function isWorkflowFile(relPath) {
157
157
  const normalized = relPath.replace(/\\/g, '/');
158
158
  return normalized.includes('.github/workflows/') ||
159
+ normalized.includes('.github/actions/') ||
159
160
  normalized.includes('.circleci/') ||
160
161
  normalized.includes('.gitlab-ci') ||
161
162
  /Makefile|Dockerfile|Jenkinsfile/i.test(normalized);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@safetnsr/vet",
3
- "version": "1.22.0",
3
+ "version": "1.22.2",
4
4
  "description": "vet your AI-generated code — one command, one score card, one letter grade",
5
5
  "type": "module",
6
6
  "bin": {