@rmartz/pr-policy 0.12.0 → 0.13.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 +5 -5
- package/dist/bin/pr-policy.js +3 -3
- package/dist/{chunk-VJXHTDY2.js → chunk-DG7EPA42.js} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -34,13 +34,13 @@ is in its [consumer guide](https://github.com/rmartz/pr-policy-action/blob/main/
|
|
|
34
34
|
|
|
35
35
|
## Library and CLI
|
|
36
36
|
|
|
37
|
-
Every check is importable. The `
|
|
37
|
+
Every check is importable. The `pr-policy` CLI is a thin wrapper around them:
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
pr-policy evaluate --pr 12 --repo rmartz/pr-policy # post the check-run, status + labels
|
|
41
|
+
pr-policy evaluate --pr 12 --repo rmartz/pr-policy --json # evaluate only, change nothing
|
|
42
|
+
pr-policy evaluate --facts pr.json # offline, from a JSON facts file
|
|
43
|
+
pr-policy evaluate --pr 12 --repo rmartz/pr-policy --skip-uat # for a repo with no UAT
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
## Documentation
|
package/dist/bin/pr-policy.js
CHANGED
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
postVerdict,
|
|
8
8
|
resolveRepoTarget,
|
|
9
9
|
selectChecks
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-DG7EPA42.js";
|
|
11
11
|
|
|
12
12
|
// src/bin/pr-policy.ts
|
|
13
13
|
import { readFile } from "fs/promises";
|
|
14
14
|
import { parseArgs } from "util";
|
|
15
15
|
var USAGE = `Usage:
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
pr-policy evaluate --pr <n> [--repo <owner/repo>] [--json] [--skip-uat]
|
|
17
|
+
pr-policy evaluate --facts <path|-> [--skip-uat]
|
|
18
18
|
|
|
19
19
|
--pr Evaluate a live PR, post the pr-policy check-run and commit status on
|
|
20
20
|
its head, and apply the label edits the checks planned. --json
|
|
@@ -897,7 +897,7 @@ function substantiveWorkflowChanges(changes) {
|
|
|
897
897
|
|
|
898
898
|
// src/checks/test-paths.ts
|
|
899
899
|
var TEST_DIRS = /* @__PURE__ */ new Set(["test", "tests", "__tests__", "__snapshots__", "__mocks__", "e2e"]);
|
|
900
|
-
var TEST_FILE = /\.(test|spec)\.[cm]?[jt]sx
|
|
900
|
+
var TEST_FILE = /\.(test|spec)\.[cm]?[jt]sx?$|\.stories\.([cm]?[jt]sx?|mdx)$|^test_.*\.py$|_test\.(py|go)$|^conftest\.py$/;
|
|
901
901
|
function isTestPath(path) {
|
|
902
902
|
const parts = path.split("/");
|
|
903
903
|
const name = parts.at(-1) ?? "";
|
package/dist/index.d.ts
CHANGED
|
@@ -56,8 +56,8 @@ interface PullRequestBase {
|
|
|
56
56
|
/**
|
|
57
57
|
* The facts about a pull request that policy checks judge. Every field is a
|
|
58
58
|
* property of the PR's current state — its content and the labels on it, never
|
|
59
|
-
* its review history, which belongs to the separate lifecycle reconciler
|
|
60
|
-
*
|
|
59
|
+
* its review history, which belongs to the separate lifecycle reconciler in
|
|
60
|
+
* `rmartz/pr-lifecycle`.
|
|
61
61
|
*/
|
|
62
62
|
interface PullRequestFacts {
|
|
63
63
|
title: string;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rmartz/pr-policy",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Read-only PR content classifiers — CI-change classification, title-type rules, and more — reported as one blocking pr-policy check-run. Distributed as a pinned Action kept current by Dependabot.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pr-policy",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"bin": {
|
|
29
|
-
"
|
|
29
|
+
"pr-policy": "./dist/bin/pr-policy.js"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
"dist"
|