@0xcraft/powershot 1.0.0 → 1.0.1
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
package/dist/selftest.js
CHANGED
|
@@ -694,16 +694,19 @@ check('the public action persists judge answers and publishes only a verdict', (
|
|
|
694
694
|
assert.match(action, /uses: actions\/cache@[a-f0-9]{40}/);
|
|
695
695
|
assert.match(action, /POWERSHOT_CACHE_DIR: \$\{\{ runner\.temp \}\}\/powershot-cache/);
|
|
696
696
|
assert.match(action, /restore-keys:/);
|
|
697
|
-
assert.match(action, /
|
|
697
|
+
assert.match(action, /upload-sarif:\s*\n\s+description: [^\n]+\n\s+default: 'true'/);
|
|
698
|
+
assert.match(action, /Upload SARIF[\s\S]+inputs\.upload-sarif == 'true'[\s\S]+steps\.review\.outputs\.complete == 'true'/);
|
|
698
699
|
});
|
|
699
700
|
check('published CI examples preserve one verdict and its exit status', () => {
|
|
701
|
+
const action = readFileSync(join(process.cwd(), 'examples', 'github-actions', 'action.yml'), 'utf8');
|
|
700
702
|
const github = readFileSync(join(process.cwd(), 'examples', 'github-actions', 'cli.yml'), 'utf8');
|
|
701
703
|
const gitlab = readFileSync(join(process.cwd(), 'examples', 'gitlab', '.gitlab-ci.yml'), 'utf8');
|
|
702
|
-
assert.match(
|
|
704
|
+
assert.match(action, /upload-sarif: 'true'/);
|
|
705
|
+
assert.match(github, /npm install --global --ignore-scripts @0xcraft\/powershot@1\.0\.1/);
|
|
703
706
|
assert.equal(github.match(/psh review/g)?.length, 1);
|
|
704
707
|
assert.match(github, /--report markdown=powershot\.md[\s\S]+--report sarif=powershot\.sarif/);
|
|
705
708
|
assert.match(github, /\|\| STATUS=\$\?[\s\S]+case "\$STATUS"/);
|
|
706
|
-
assert.match(gitlab, /npm install --global --ignore-scripts @0xcraft\/powershot@1\.0\.
|
|
709
|
+
assert.match(gitlab, /npm install --global --ignore-scripts @0xcraft\/powershot@1\.0\.1/);
|
|
707
710
|
assert.equal(gitlab.match(/psh review/g)?.length, 1);
|
|
708
711
|
assert.match(gitlab, /--format codequality > gl-code-quality-report\.json \|\| STATUS=\$\?/);
|
|
709
712
|
assert.match(gitlab, /test "\$STATUS" -le 1 \|\| exit "\$STATUS"/);
|
package/docs/ci.md
CHANGED
|
@@ -26,8 +26,8 @@ There are two independent decisions:
|
|
|
26
26
|
|
|
27
27
|
## GitHub Action
|
|
28
28
|
|
|
29
|
-
The action runs one review, adds a job summary, uploads SARIF, and can
|
|
30
|
-
pull-request comment.
|
|
29
|
+
The action runs one review, adds a job summary, uploads SARIF when enabled, and can
|
|
30
|
+
maintain one pull-request comment.
|
|
31
31
|
|
|
32
32
|
```yaml
|
|
33
33
|
name: PowerShot
|
|
@@ -51,10 +51,14 @@ jobs:
|
|
|
51
51
|
- uses: xcrft/powershot@v1
|
|
52
52
|
with:
|
|
53
53
|
verify-only: 'true'
|
|
54
|
+
upload-sarif: 'true'
|
|
54
55
|
comment: 'true'
|
|
55
56
|
fail-on-findings: 'true'
|
|
56
57
|
```
|
|
57
58
|
|
|
59
|
+
Set `upload-sarif: 'false'` and omit `security-events: write` when GitHub code scanning
|
|
60
|
+
is unavailable or the workflow should not publish SARIF.
|
|
61
|
+
|
|
58
62
|
The major tag follows compatible `1.x` releases. Pin a full commit SHA in a protected
|
|
59
63
|
required workflow when immutable dependencies are required. The copy-paste version
|
|
60
64
|
lives at [`examples/github-actions/action.yml`](../examples/github-actions/action.yml).
|
|
@@ -67,6 +71,7 @@ lives at [`examples/github-actions/action.yml`](../examples/github-actions/actio
|
|
|
67
71
|
| `anthropic-api-key` | empty | Enable configured model judges |
|
|
68
72
|
| `min-severity` | `low` | Filter findings below a severity |
|
|
69
73
|
| `checks` | empty | Select comma-separated check ids |
|
|
74
|
+
| `upload-sarif` | `true` | Upload a complete SARIF report to GitHub code scanning |
|
|
70
75
|
| `comment` | `true` | Maintain a pull-request comment |
|
|
71
76
|
| `fail-on-findings` | `false` | Turn a complete finding verdict into a failed job |
|
|
72
77
|
| `approve` | `false` | Approve only a complete, clean review |
|
|
@@ -83,7 +88,7 @@ step inside a larger quality job. The complete example is
|
|
|
83
88
|
The core pattern is:
|
|
84
89
|
|
|
85
90
|
```bash
|
|
86
|
-
npm install --global --ignore-scripts @0xcraft/powershot@1.0.
|
|
91
|
+
npm install --global --ignore-scripts @0xcraft/powershot@1.0.1
|
|
87
92
|
|
|
88
93
|
STATUS=0
|
|
89
94
|
psh review --verify-only \
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xcraft/powershot",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Oracle-first code review for machine-written code, with deterministic verification and CI-ready reports.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "aglumova <alina.glumova@gmail.com>",
|