housebroken-cli 0.2.3__tar.gz → 0.2.4__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.2.3 → housebroken_cli-0.2.4}/PKG-INFO +1 -1
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/pyproject.toml +1 -1
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/scripts/inbox.sh +27 -20
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/.gitignore +0 -0
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/LICENSE +0 -0
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/README.md +0 -0
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/bin/housebroken +0 -0
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/hatch_build.py +0 -0
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/scripts/check-ai-policy.sh +0 -0
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/scripts/comment-census.sh +0 -0
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/scripts/diff-defaults.sh +0 -0
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/scripts/distinct-outside.sh +0 -0
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/scripts/file-pr.sh +0 -0
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/scripts/fork-hygiene.sh +0 -0
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/scripts/notes.sh +0 -0
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/scripts/pr-sweep.sh +0 -0
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/scripts/prior-art.sh +0 -0
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/scripts/verify-filed-pr.sh +0 -0
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/skills/housebroken/SKILL.md +0 -0
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/src/housebroken/__init__.py +0 -0
- {housebroken_cli-0.2.3 → housebroken_cli-0.2.4}/src/housebroken/cli.py +0 -0
|
@@ -64,7 +64,7 @@ if [ -z "$since" ]; then
|
|
|
64
64
|
if [ -s "$cursor_file" ]; then since="$(head -1 "$cursor_file")"; else since="$(date -u -d '24 hours ago' +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -v-24H +%Y-%m-%dT%H:%M:%SZ)"; fi
|
|
65
65
|
fi
|
|
66
66
|
|
|
67
|
-
is_bot() { case "$1" in *"[bot]"|copilot
|
|
67
|
+
is_bot() { case "$1" in *"[bot]"|Copilot|copilot*|codecov-commenter|coveralls|CLAassistant|meta-cla*|vercel*|coderabbitai*|copy-pr-bot*|oracle-contributor-agreement*|dependabot*|github-actions*|sonarcloud*|netlify*) return 0 ;; *) return 1 ;; esac; }
|
|
68
68
|
|
|
69
69
|
echo "== inbox for $user since $since (now $now) =="
|
|
70
70
|
if ! feed="$(gh api "notifications?all=true&since=$since&per_page=100" --paginate 2>/dev/null)"; then
|
|
@@ -85,27 +85,34 @@ while IFS= read -r t; do
|
|
|
85
85
|
echo
|
|
86
86
|
echo "--- $repo#$num [$reason, $at] $state"
|
|
87
87
|
echo " $title"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
echo " latest: yours, $when"
|
|
93
|
-
elif is_bot "$who"; then
|
|
94
|
-
echo " latest: $who (bot), $when$where"
|
|
95
|
-
else
|
|
96
|
-
human=$((human + 1))
|
|
97
|
-
echo " latest: $who, $when$where${rstate:+ [$rstate]}"
|
|
98
|
-
jq -r '.body // ""' <<<"$c" | sed 's/^/ | /'
|
|
99
|
-
fi
|
|
100
|
-
else
|
|
101
|
-
echo " latest comment could not be fetched: $latest"
|
|
102
|
-
fi
|
|
88
|
+
ic="$(gh api "repos/$repo/issues/$num/comments?since=$since&per_page=100" 2>/dev/null || echo '[]')"
|
|
89
|
+
if [ "$type" = "PullRequest" ]; then
|
|
90
|
+
rc="$(gh api "repos/$repo/pulls/$num/comments?since=$since&per_page=100" 2>/dev/null || echo '[]')"
|
|
91
|
+
rv="$(gh api "repos/$repo/pulls/$num/reviews?per_page=100" 2>/dev/null || echo '[]')"
|
|
103
92
|
else
|
|
104
|
-
|
|
105
|
-
if [ "$type" = "PullRequest" ]; then
|
|
106
|
-
gh api "repos/$repo/pulls/$num/reviews?per_page=100" --jq --arg since "$since" --arg me "$user" '.[] | select(.submitted_at > $since and .user.login != $me) | " review " + .state + " by " + .user.login + ", " + .submitted_at + (if (.body // "") != "" then "\n | " + (.body | gsub("\r\n"; "\n | ")) else "" end)' 2>/dev/null
|
|
107
|
-
fi
|
|
93
|
+
rc='[]'; rv='[]'
|
|
108
94
|
fi
|
|
95
|
+
events="$(jq -nc --argjson ic "$ic" --argjson rc "$rc" --argjson rv "$rv" --arg since "$since" '
|
|
96
|
+
[ ($ic[] | {t: .created_at, who: (.user.login // "?"), kind: "comment", where: "", rst: "", body: (.body // "")}),
|
|
97
|
+
($rc[] | {t: .created_at, who: (.user.login // "?"), kind: "inline", where: (" on " + .path + ":" + ((.line // .original_line // 0) | tostring)), rst: "", body: (.body // "")}),
|
|
98
|
+
($rv[] | select((.submitted_at // "") > $since) | {t: .submitted_at, who: (.user.login // "?"), kind: "review", where: "", rst: (.state // ""), body: (.body // "")}) ]
|
|
99
|
+
| sort_by(.t) | .[]' 2>/dev/null)"
|
|
100
|
+
shown=0
|
|
101
|
+
while IFS= read -r e; do
|
|
102
|
+
[ -n "$e" ] || continue
|
|
103
|
+
who=$(jq -r .who <<<"$e"); when=$(jq -r .t <<<"$e"); kind=$(jq -r .kind <<<"$e"); where=$(jq -r .where <<<"$e"); rst=$(jq -r .rst <<<"$e")
|
|
104
|
+
shown=$((shown + 1))
|
|
105
|
+
if [ "$who" = "$user" ]; then
|
|
106
|
+
echo " $when yours: $kind$where"
|
|
107
|
+
elif is_bot "$who"; then
|
|
108
|
+
echo " $when $who (bot): $kind$where${rst:+ [$rst]}"
|
|
109
|
+
else
|
|
110
|
+
human=$((human + 1))
|
|
111
|
+
echo " $when $who: $kind$where${rst:+ [$rst]}"
|
|
112
|
+
jq -r .body <<<"$e" | tr -d '\r' | sed 's/^/ | /'
|
|
113
|
+
fi
|
|
114
|
+
done <<<"$events"
|
|
115
|
+
[ "$shown" -gt 0 ] || echo " (no comment or review since the cursor: a merge, a close, a push, a mention or a review request; see the state above)"
|
|
109
116
|
done <<<"$threads"
|
|
110
117
|
|
|
111
118
|
if [ "$do_ci" -eq 1 ]; then
|
|
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
|