opencode-completion-gate 2.0.0 → 2.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/CHANGELOG.md +7 -0
- package/README.md +2 -0
- package/dist/index.js +4 -3
- package/dist/plugin.js +4 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.1](https://github.com/PauloDevelo/opencode-completion-gate/compare/v2.0.0...v2.0.1) (2026-11-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* keep polling PR policies while CI is still running ([#14](https://github.com/PauloDevelo/opencode-completion-gate/issues/14)) ([40713c4](https://github.com/PauloDevelo/opencode-completion-gate/commit/40713c4be72744ce71df1b3094f68bbb532c4fbe))
|
|
9
|
+
|
|
3
10
|
## [2.0.0](https://github.com/PauloDevelo/opencode-completion-gate/compare/v1.3.1...v2.0.0) (2026-10-15)
|
|
4
11
|
|
|
5
12
|
|
package/README.md
CHANGED
|
@@ -24,6 +24,8 @@ Add the plugin to your OpenCode configuration (V2):
|
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
> Requires OpenCode V2 (`@opencode/plugin` ≥ 2.0). For OpenCode V1, use `opencode-completion-gate@1.x` and the `plugin` field.
|
|
27
|
+
>
|
|
28
|
+
> Restart OpenCode after changing the `plugins` array: plugins are loaded at startup, so a running session keeps the previous plugin set. The addition only takes effect after the restart.
|
|
27
29
|
|
|
28
30
|
## Quick start
|
|
29
31
|
|
package/dist/index.js
CHANGED
|
@@ -399,12 +399,13 @@ function requiredPoliciesGreen(policyListJson, opts = {}) {
|
|
|
399
399
|
if (bad.length > 0) {
|
|
400
400
|
const names = bad.map((e) => `${e.configuration?.type?.displayName ?? "policy"}: ${String(e.status ?? "?")}`).join("; ");
|
|
401
401
|
const skipped = ignored.length > 0 ? ` (${ignored.length} human policy(ies) ignored)` : "";
|
|
402
|
-
const
|
|
403
|
-
(e) =>
|
|
402
|
+
const stillSettling = bad.some(
|
|
403
|
+
(e) => IN_PROGRESS_POLICY_STATUSES.has(String(e.status ?? "").toLowerCase())
|
|
404
404
|
);
|
|
405
|
+
const onlyHumanRemaining = bad.every(isHumanReviewPolicy);
|
|
405
406
|
return {
|
|
406
407
|
green: false,
|
|
407
|
-
retryable:
|
|
408
|
+
retryable: stillSettling || onlyHumanRemaining,
|
|
408
409
|
detail: `PR policies not green \u2014 ${names}${skipped}`
|
|
409
410
|
};
|
|
410
411
|
}
|
package/dist/plugin.js
CHANGED
|
@@ -395,12 +395,13 @@ function requiredPoliciesGreen(policyListJson, opts = {}) {
|
|
|
395
395
|
if (bad.length > 0) {
|
|
396
396
|
const names = bad.map((e) => `${e.configuration?.type?.displayName ?? "policy"}: ${String(e.status ?? "?")}`).join("; ");
|
|
397
397
|
const skipped = ignored.length > 0 ? ` (${ignored.length} human policy(ies) ignored)` : "";
|
|
398
|
-
const
|
|
399
|
-
(e) =>
|
|
398
|
+
const stillSettling = bad.some(
|
|
399
|
+
(e) => IN_PROGRESS_POLICY_STATUSES.has(String(e.status ?? "").toLowerCase())
|
|
400
400
|
);
|
|
401
|
+
const onlyHumanRemaining = bad.every(isHumanReviewPolicy);
|
|
401
402
|
return {
|
|
402
403
|
green: false,
|
|
403
|
-
retryable:
|
|
404
|
+
retryable: stillSettling || onlyHumanRemaining,
|
|
404
405
|
detail: `PR policies not green \u2014 ${names}${skipped}`
|
|
405
406
|
};
|
|
406
407
|
}
|
package/package.json
CHANGED