housebroken-cli 0.6.2__tar.gz → 0.6.3__tar.gz
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.
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/PKG-INFO +1 -1
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/pyproject.toml +1 -1
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/scripts/verify-filed-pr.sh +15 -2
- housebroken_cli-0.6.3/src/housebroken/__init__.py +1 -0
- housebroken_cli-0.6.2/src/housebroken/__init__.py +0 -1
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/.gitignore +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/LICENSE +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/README.md +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/bin/housebroken +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/hatch_build.py +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/scripts/branch-check.sh +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/scripts/check-ai-policy.sh +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/scripts/claim-check.sh +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/scripts/comment-census.sh +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/scripts/comment-check.sh +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/scripts/diff-defaults.sh +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/scripts/distinct-outside.sh +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/scripts/file-pr.sh +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/scripts/fork-hygiene.sh +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/scripts/inbox.sh +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/scripts/notes.sh +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/scripts/pr-sweep.sh +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/scripts/prior-art.sh +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/scripts/review.sh +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/skills/housebroken/SKILL.md +0 -0
- {housebroken_cli-0.6.2 → housebroken_cli-0.6.3}/src/housebroken/cli.py +0 -0
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
# that the caller knows which head sha and which files were intended. Exits
|
|
21
21
|
# non-zero when the head does not match, when checks are red, or when they do
|
|
22
22
|
# not settle before the watch gives up.
|
|
23
|
+
# Exits 3, and says NOT SETTLED, when nothing is wrong but a workflow on the
|
|
24
|
+
# head still waits for a maintainer's approval, so CI has not run.
|
|
23
25
|
set -u
|
|
24
26
|
|
|
25
27
|
usage() {
|
|
@@ -38,6 +40,7 @@ repo="$1"
|
|
|
38
40
|
pr="$2"
|
|
39
41
|
want="${3:-}"
|
|
40
42
|
fail=0
|
|
43
|
+
unsettled=0
|
|
41
44
|
note() { printf '%-26s %s\n' "$1" "$2"; }
|
|
42
45
|
|
|
43
46
|
view() {
|
|
@@ -66,7 +69,7 @@ view files '.files[] | " " + .path + " +" + (.additions|tostring) + "/-" + (.
|
|
|
66
69
|
echo ""
|
|
67
70
|
echo "-- checks (waits until every check has settled)"
|
|
68
71
|
gh pr checks "$pr" --repo "$repo" --watch --interval 20 >/dev/null 2>&1 || true
|
|
69
|
-
rollup=$(view statusCheckRollup '[.statusCheckRollup[] | (.conclusion // .status)] | group_by(.) | map({k:.[0], n:length}) | .[] | .k + "=" + (.n|tostring)')
|
|
72
|
+
rollup=$(view statusCheckRollup '[.statusCheckRollup[] | (.conclusion // .status // .state)] | group_by(.) | map({k:.[0], n:length}) | .[] | .k + "=" + (.n|tostring)')
|
|
70
73
|
if [ -z "$rollup" ]; then
|
|
71
74
|
note "checks" "none reported"
|
|
72
75
|
else
|
|
@@ -76,6 +79,13 @@ else
|
|
|
76
79
|
*IN_PROGRESS*|*QUEUED*|*PENDING*) note "CHECKS DID NOT SETTLE" "watch timed out"; fail=1 ;;
|
|
77
80
|
esac
|
|
78
81
|
fi
|
|
82
|
+
# A fork's workflow that waits for a maintainer's approval has run nothing and
|
|
83
|
+
# is absent from the rollup above.
|
|
84
|
+
waiting=$(gh run list --repo "$repo" --commit "$head" --json conclusion --jq '[.[] | select(.conclusion == "action_required")] | length' 2>/dev/null)
|
|
85
|
+
if [ "${waiting:-0}" -gt 0 ]; then
|
|
86
|
+
note "WORKFLOWS AWAIT APPROVAL" "$waiting run(s) on this head have not started"
|
|
87
|
+
unsettled=1
|
|
88
|
+
fi
|
|
79
89
|
|
|
80
90
|
echo ""
|
|
81
91
|
echo "-- rendered body, first 15 lines"
|
|
@@ -86,5 +96,8 @@ echo "-- comments, newest last"
|
|
|
86
96
|
view comments '.comments[] | " " + .author.login + ": " + (.body | gsub("\n"; " ") | .[0:150])'
|
|
87
97
|
|
|
88
98
|
echo ""
|
|
89
|
-
if [ "$fail" -
|
|
99
|
+
if [ "$fail" -ne 0 ]; then echo "PR-VERIFY: PROBLEMS ABOVE"
|
|
100
|
+
elif [ "$unsettled" -ne 0 ]; then echo "PR-VERIFY: NOT SETTLED (CI has not run on this head)"
|
|
101
|
+
else echo "PR-VERIFY: OK"; fi
|
|
102
|
+
[ "$fail" -eq 0 ] && [ "$unsettled" -ne 0 ] && exit 3
|
|
90
103
|
exit "$fail"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.6.3"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.6.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|