housebroken-cli 0.23.0__tar.gz → 0.24.0__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.23.0 → housebroken_cli-0.24.0}/PKG-INFO +1 -1
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/bin/housebroken +8 -3
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/pyproject.toml +1 -1
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/close.sh +2 -2
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/common.sh +12 -2
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/edit-pr.sh +1 -1
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/file-pr.sh +1 -1
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/fork-hygiene.sh +4 -2
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/inbox.sh +1 -1
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/pr-sweep.sh +6 -3
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/push.sh +2 -2
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/reply.sh +2 -2
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/review.sh +16 -3
- housebroken_cli-0.24.0/src/housebroken/__init__.py +1 -0
- housebroken_cli-0.23.0/src/housebroken/__init__.py +0 -1
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/.gitignore +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/LICENSE +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/README.md +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/hatch_build.py +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/branch-check.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/check-ai-policy.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/ci-legs.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/claim-check.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/comment-census.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/comment-check.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/declare.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/diff-defaults.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/distinct-outside.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/file-issue.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/gate-hook.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/notes.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/prior-art.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/proof.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/ref-check.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/refuse.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/same-code.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/scripts/verify-filed-pr.sh +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/skills/housebroken/SKILL.md +0 -0
- {housebroken_cli-0.23.0 → housebroken_cli-0.24.0}/src/housebroken/cli.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: housebroken-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.24.0
|
|
4
4
|
Summary: Agent-written pull requests that do not make a mess in someone else's house.
|
|
5
5
|
Project-URL: Repository, https://github.com/lenamonj/housebroken
|
|
6
6
|
Project-URL: Issues, https://github.com/lenamonj/housebroken/issues
|
|
@@ -129,6 +129,12 @@ case "$cmd" in
|
|
|
129
129
|
push) script=push.sh ;;
|
|
130
130
|
close) script=close.sh ;;
|
|
131
131
|
install-hook) script=gate-hook.sh; set -- --install ;;
|
|
132
|
+
# The Python command answers these two before it calls this file, so here the
|
|
133
|
+
# install is install.sh's or a clone's, and install.sh installs the skill.
|
|
134
|
+
install-skill|skill-path)
|
|
135
|
+
echo "housebroken: $cmd belongs to the pip, pipx and uv installs; this one came from install.sh or a clone, and install.sh installs the skill: run bash install.sh from the repository again" >&2
|
|
136
|
+
exit 2
|
|
137
|
+
;;
|
|
132
138
|
*)
|
|
133
139
|
echo "housebroken: unknown subcommand: $cmd (try: housebroken help)" >&2
|
|
134
140
|
exit 2
|
|
@@ -151,9 +157,8 @@ stale() { # installed-copy packaged-copy command
|
|
|
151
157
|
echo "note: $1 is not this version's; run $3" >&2
|
|
152
158
|
fi
|
|
153
159
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
done
|
|
160
|
+
stale "$HOME/.claude/skills/housebroken/SKILL.md" "$scripts_dir/../skill/SKILL.md" "housebroken install-skill"
|
|
161
|
+
stale "$HOME/.claude/skills/housebroken/SKILL.md" "$scripts_dir/../skills/housebroken/SKILL.md" "bash install.sh"
|
|
157
162
|
[ "$cmd" = "install-hook" ] || stale "$HOME/.claude/hooks/housebroken-gate.sh" "$scripts_dir/gate-hook.sh" "housebroken install-hook"
|
|
158
163
|
|
|
159
164
|
export HOUSEBROKEN_HOME
|
|
@@ -89,7 +89,7 @@ if pr=$(gh pr view "$num" --repo "$repo" --json author,state,headRefName,headRep
|
|
|
89
89
|
fork=$(printf '%s' "$pr" | jq -r '.headRepository.name // ""' | tr -d '\r')
|
|
90
90
|
branch=$(printf '%s' "$pr" | jq -r '.headRefName // ""' | tr -d '\r')
|
|
91
91
|
oid=$(printf '%s' "$pr" | jq -r '.headRefOid // ""' | tr -d '\r')
|
|
92
|
-
[ "$author" = "$user" ] || refuse close-not-yours "$repo#$num is $author's, not yours"
|
|
92
|
+
[ "$(lower "$author")" = "$(lower "$user")" ] || refuse close-not-yours "$repo#$num is $author's, not yours"
|
|
93
93
|
[ "$state" = "OPEN" ] || refuse close-not-open "$repo#$num is $state; only an open pull request is closed"
|
|
94
94
|
else
|
|
95
95
|
refuse close-thread-unreadable "cannot read $repo#$num, so whose it is and whether it is open are unknown"
|
|
@@ -128,7 +128,7 @@ if ! gh pr close "$num" --repo "$repo"; then
|
|
|
128
128
|
fi
|
|
129
129
|
rc=0
|
|
130
130
|
bash "$here/notes.sh" "$repo" add "we closed #$num: $(printf '%s' "$own" | clean_line | cut -c1-200)" || rc=1
|
|
131
|
-
if [ "$fork_owner" = "$user" ] && [ -n "$fork" ] && [ -n "$branch" ]; then
|
|
131
|
+
if [ "$(lower "$fork_owner")" = "$(lower "$user")" ] && [ -n "$fork" ] && [ -n "$branch" ]; then
|
|
132
132
|
if ! drop_fork_branch "$user" "$fork" "$branch" "CLOSED $repo#$num" 0 "$oid"; then
|
|
133
133
|
echo "housebroken hygiene deletes it on its next run" >&2
|
|
134
134
|
rc=1
|
|
@@ -427,14 +427,24 @@ has_role() { case "$(printf '%s' "$1" | tr '[:lower:]' '[:upper:]')" in OWNER|ME
|
|
|
427
427
|
# shellcheck disable=SC2034 # read by the scripts that source this file
|
|
428
428
|
review_brief_items=13
|
|
429
429
|
|
|
430
|
+
# GitHub logins and repository names are one name in any case.
|
|
431
|
+
lower() { printf '%s' "$1" | tr '[:upper:]' '[:lower:]'; }
|
|
432
|
+
|
|
430
433
|
# The brief a head was reviewed under, read from the header of the report
|
|
431
434
|
# review.sh names for that head: its number, 0 when the header carries none or
|
|
432
435
|
# one no brief will reach, "unreadable" when the report cannot be read, and
|
|
433
|
-
# nothing when this machine holds no report for the head.
|
|
436
|
+
# nothing when this machine holds no report of this repository for the head.
|
|
437
|
+
# The name alone does not say which: a-b/c and a/b-c share it, so the report's
|
|
438
|
+
# review-of line must name the repository.
|
|
434
439
|
reviewed_under() { # repo head home
|
|
435
440
|
local report="$3/reviews/review-${1%%/*}-${1##*/}-${2:0:12}.md" n
|
|
436
441
|
[ -f "$report" ] || return 0
|
|
437
|
-
n=$(awk '{sub(/\r$/, "")} NF == 0 {exit}
|
|
442
|
+
n=$(awk -v repo="$1" '{sub(/\r$/, "")} NF == 0 {exit}
|
|
443
|
+
/^review-of:/ && !named {named = 1; of = $0; sub(/^review-of: */, "", of); sub(/ *$/, "", of)}
|
|
444
|
+
$1 == "brief:" && !seen {seen = 1; brief = $2}
|
|
445
|
+
END {if (tolower(of) == tolower(repo)) print "brief=" brief}' "$report" 2>/dev/null) || { echo unreadable; return 0; }
|
|
446
|
+
[ -n "$n" ] || return 0
|
|
447
|
+
n=${n#brief=}
|
|
438
448
|
case "$n" in ''|*[!0-9]*|???????*) echo 0 ;; *) echo "$n" ;; esac
|
|
439
449
|
}
|
|
440
450
|
|
|
@@ -94,7 +94,7 @@ pr=$(gh pr view "$num" --repo "$repo" --json author,state,headRefOid 2>/dev/null
|
|
|
94
94
|
author=$(printf '%s' "$pr" | jq -r '.author.login // "?"' | tr -d '\r')
|
|
95
95
|
state=$(printf '%s' "$pr" | jq -r '.state // "?"' | tr -d '\r')
|
|
96
96
|
head=$(printf '%s' "$pr" | jq -r '.headRefOid // ""' | tr -d '\r')
|
|
97
|
-
[ "$author" = "$user" ] || { refused edit-pr-not-yours "$repo#$num is $author's, not yours" >&2; exit 2; }
|
|
97
|
+
[ "$(lower "$author")" = "$(lower "$user")" ] || { refused edit-pr-not-yours "$repo#$num is $author's, not yours" >&2; exit 2; }
|
|
98
98
|
[ "$state" = "OPEN" ] || { refused edit-pr-not-open "$repo#$num is $state; only an open pull request is edited" >&2; exit 2; }
|
|
99
99
|
|
|
100
100
|
log="$home/edits/${repo%%/*}-${repo##*/}.log"
|
|
@@ -284,7 +284,7 @@ if [ ! -f "$review" ]; then
|
|
|
284
284
|
refused file-pr-no-review "no adversarial review at $review - run review.sh brief with --text $decl and have a different model attack this head" >&2
|
|
285
285
|
exit 2
|
|
286
286
|
fi
|
|
287
|
-
bash "$(dirname "$0")/review.sh" check "$review" --clone . --text "$bodyfile" --text "$decl" >/dev/null || exit 2
|
|
287
|
+
bash "$(dirname "$0")/review.sh" check "$review" --clone . --text "$bodyfile" --text "$decl" --repo "$repo" >/dev/null || exit 2
|
|
288
288
|
|
|
289
289
|
if [ "${FILE_PR_DRY:-0}" = "1" ]; then
|
|
290
290
|
printf 'DRY RUN, not filed:\ngh pr create -R %s' "$repo"
|
|
@@ -38,6 +38,8 @@ if [ -z "$ME" ]; then
|
|
|
38
38
|
echo "fork-hygiene.sh: cannot determine the GitHub login; set HOUSEBROKEN_USER" >&2
|
|
39
39
|
exit 1
|
|
40
40
|
fi
|
|
41
|
+
# HOUSEBROKEN_USER is typed by hand, and GitHub gives back its own spelling of an owner
|
|
42
|
+
me=$(lower "$ME")
|
|
41
43
|
|
|
42
44
|
if ! closed="$(gh search prs --author "$ME" --state closed --sort updated --json repository,number --limit "$MAX" \
|
|
43
45
|
--jq '.[] | "\(.repository.nameWithOwner) \(.number)"')"; then
|
|
@@ -48,7 +50,7 @@ fi
|
|
|
48
50
|
|
|
49
51
|
while read -r repo n; do
|
|
50
52
|
[ -n "$repo" ] || continue
|
|
51
|
-
|
|
53
|
+
[ "$(lower "${repo%%/*}")" != "$me" ] || continue
|
|
52
54
|
# Tabs and @tsv: a branch name can hold a | or a #.
|
|
53
55
|
# shellcheck disable=SC2016 # jq text
|
|
54
56
|
info=$(gh pr view "$n" --repo "$repo" --json headRefName,headRepository,headRepositoryOwner,state,headRefOid \
|
|
@@ -57,7 +59,7 @@ while read -r repo n; do
|
|
|
57
59
|
continue
|
|
58
60
|
}
|
|
59
61
|
IFS=$'\t' read -r owner fork branch state oid <<< "$info"
|
|
60
|
-
if [ "$owner" != "$
|
|
62
|
+
if [ "$(lower "$owner")" != "$me" ] || [ "$fork" = "-" ] || [ "$branch" = "-" ]; then continue; fi
|
|
61
63
|
drop_fork_branch "$ME" "$fork" "$branch" "$state $repo#$n" "$DRY" "$oid"
|
|
62
64
|
done <<< "$closed"
|
|
63
65
|
|
|
@@ -134,7 +134,7 @@ while IFS= read -r t; do
|
|
|
134
134
|
[ -n "$e" ] || continue
|
|
135
135
|
who=$(jq -r .who <<<"$e"); when=$(jq -r .t <<<"$e"); kind=$(jq -r .kind <<<"$e"); where=$(jq -r .where <<<"$e" | clean_line); rst=$(jq -r .rst <<<"$e"); bot=$(jq -r .bot <<<"$e"); role=$(jq -r .role <<<"$e")
|
|
136
136
|
shown=$((shown + 1))
|
|
137
|
-
if [ "$who" = "$user" ]; then
|
|
137
|
+
if [ "$(lower "$who")" = "$(lower "$user")" ]; then
|
|
138
138
|
echo " $when yours: $kind$where"
|
|
139
139
|
elif [ "$bot" = "true" ] || is_bot "$who"; then
|
|
140
140
|
echo " $when $who (bot): $kind$where${rst:+ [$rst]}"
|
|
@@ -87,6 +87,9 @@ if [ -z "$ME" ]; then
|
|
|
87
87
|
echo "pr-sweep.sh: cannot determine the GitHub login; set HOUSEBROKEN_USER" >&2
|
|
88
88
|
exit 1
|
|
89
89
|
fi
|
|
90
|
+
# what the login is compared as: HOUSEBROKEN_USER is typed by hand, and GitHub
|
|
91
|
+
# gives back its own spelling of an owner or an author
|
|
92
|
+
me=$(lower "$ME")
|
|
90
93
|
|
|
91
94
|
if ! list="$(gh search prs --author "$ME" --state open --limit "$MAX" --json repository,number,title,updatedAt \
|
|
92
95
|
--jq '.[] | [.repository.nameWithOwner, (.number | tostring), .updatedAt, .title] | @tsv' | sort)"; then
|
|
@@ -146,7 +149,7 @@ $id"
|
|
|
146
149
|
head_branch="$(printf '%s' "$v" | jq -r '.headRefName // "-"' | tr -d '\r')"
|
|
147
150
|
head_oid="$(printf '%s' "$v" | jq -r '.headRefOid // "-"' | tr -d '\r')"
|
|
148
151
|
gone_state="$(printf '%s' "$v" | jq -r '.state // "-"' | tr -d '\r')"
|
|
149
|
-
if [ "$gone_state" != OPEN ] && [ "$head_owner" = "$
|
|
152
|
+
if [ "$gone_state" != OPEN ] && [ "$(lower "$head_owner")" = "$me" ] && [ "$(lower "$gone_repo")" != "$me/$(lower "$head_fork")" ] && [ "$head_branch" != "-" ]; then
|
|
150
153
|
tidy="$(printf '%s\n%s\n' "$tidy" "$ME/$head_fork $head_branch $id $head_oid")"
|
|
151
154
|
fi
|
|
152
155
|
case "$gone_state" in
|
|
@@ -241,7 +244,7 @@ while IFS=$'\t' read -r repo num updated title; do
|
|
|
241
244
|
# A gate reads a pull request when it is pushed, so one filed before a review
|
|
242
245
|
# item existed is never read under it. The reports are this machine's, and a
|
|
243
246
|
# pull request in a repository of our own never went through the door.
|
|
244
|
-
if [ "${repo%%/*}" != "$
|
|
247
|
+
if [ "$(lower "${repo%%/*}")" != "$me" ]; then
|
|
245
248
|
mark=""
|
|
246
249
|
if [ -z "$head_oid" ]; then
|
|
247
250
|
mark="head-unread"
|
|
@@ -265,7 +268,7 @@ while IFS=$'\t' read -r repo num updated title; do
|
|
|
265
268
|
why=""
|
|
266
269
|
# The role is GitHub's word on who spoke last: a maintainer is answered, an
|
|
267
270
|
# outsider is read, and the desk should know which before it drafts.
|
|
268
|
-
[ "$la_user" != "-" ] && [ "$la_user" != "$
|
|
271
|
+
[ "$la_user" != "-" ] && [ "$(lower "$la_user")" != "$me" ] && why="$why last-word:$la_user@${la_time:0:10} role:$(printf '%s' "$la_role" | tr '[:upper:]' '[:lower:]')"
|
|
269
272
|
[ "$decision" = "CHANGES_REQUESTED" ] && why="$why changes-requested"
|
|
270
273
|
[ "$ci" = "FAILING" ] && why="$why ci-failing"
|
|
271
274
|
[ "$ci" = "no-ci-on-head" ] && why="$why no-ci-on-head"
|
|
@@ -78,11 +78,11 @@ patch_id() { # head
|
|
|
78
78
|
reviews="$home/reviews/review-${repo%%/*}-${repo##*/}"
|
|
79
79
|
review="$reviews-${head:0:12}.md"
|
|
80
80
|
if [ -f "$review" ]; then
|
|
81
|
-
bash "$here/review.sh" check "$review" --clone . >/dev/null || exit 2
|
|
81
|
+
bash "$here/review.sh" check "$review" --clone . --repo "$repo" >/dev/null || exit 2
|
|
82
82
|
else
|
|
83
83
|
old="$reviews-${theirs:0:12}.md"
|
|
84
84
|
if [ -f "$old" ] && [ "$(patch_id "$head")" = "$(patch_id "$theirs")" ] && [ -n "$(patch_id "$head")" ] \
|
|
85
|
-
&& grep -q "^head: $theirs" "$old" && bash "$here/review.sh" check "$old" >/dev/null 2>&1; then
|
|
85
|
+
&& grep -q "^head: $theirs" "$old" && bash "$here/review.sh" check "$old" --repo "$repo" >/dev/null 2>&1; then
|
|
86
86
|
echo "note: the patch is unchanged since ${theirs:0:12}, so the review of ${theirs:0:12} holds for ${head:0:12}: $old" >&2
|
|
87
87
|
else
|
|
88
88
|
refused push-head-not-reviewed "no review of head ${head:0:12} at $review (a rebase carries the review of ${theirs:0:12} only when both heads are stamped and the patch is unchanged)" >&2
|
|
@@ -97,7 +97,7 @@ if ! refs=$(bash "$here/ref-check.sh" "${refargs[@]}" 2>&1); then
|
|
|
97
97
|
refuse reply-reference-not-found "it names something that does not exist: $(printf '%s\n' "$refs" | grep 'NOT FOUND' | tr -s ' ' | tr '\n' ';')"
|
|
98
98
|
fi
|
|
99
99
|
if [ -n "$report" ]; then
|
|
100
|
-
checked=$(bash "$here/review.sh" check "$report" --text "$body" 2>&1) || refuse reply-review-not-clear "the review does not clear this text: $checked"
|
|
100
|
+
checked=$(bash "$here/review.sh" check "$report" --text "$body" --repo "$repo" 2>&1) || refuse reply-review-not-clear "the review does not clear this text: $checked"
|
|
101
101
|
fi
|
|
102
102
|
|
|
103
103
|
# Whom this answers. One thread read, every page, into a file: a long thread
|
|
@@ -136,7 +136,7 @@ else
|
|
|
136
136
|
($ic[0][] | {t: .created_at, who: .user.login, type: .user.type, r: .author_association}),
|
|
137
137
|
($rv[0][] | {t: .submitted_at, who: .user.login, type: .user.type, r: .author_association}),
|
|
138
138
|
($rc[0][] | {t: .created_at, who: .user.login, type: .user.type, r: .author_association}) ]
|
|
139
|
-
| map(select(.who != null and .who != $me and (.type // "") != "Bot")) | sort_by(.t) | reverse
|
|
139
|
+
| map(select(.who != null and (.who | ascii_downcase) != ($me | ascii_downcase) and (.type // "") != "Bot")) | sort_by(.t) | reverse
|
|
140
140
|
| .[] | "\(.who) \(.r // "?")"' | tr -d '\r')
|
|
141
141
|
while IFS= read -r v; do
|
|
142
142
|
[ -n "$v" ] || continue
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
# bash review.sh brief --author MODEL --repo owner/repo [--reviewer MODEL]
|
|
28
28
|
# [--clone DIR [--base REF]] [--text FILE]...
|
|
29
29
|
# [--context FILE]...
|
|
30
|
-
# bash review.sh check REPORT [--clone DIR] [--text FILE]...
|
|
30
|
+
# bash review.sh check REPORT [--clone DIR] [--text FILE]... [--repo owner/repo]
|
|
31
31
|
# bash review.sh --help
|
|
32
32
|
#
|
|
33
33
|
# reviewer prints the model that reviews work written by MODEL.
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
# keyed by the clone's head, or by the first text's sha256 when there
|
|
38
38
|
# is no clone.
|
|
39
39
|
# check exits 0 when REPORT may gate a filing or a reply, 1 when it may
|
|
40
|
-
# not, with the reason on stderr, and 2 on a usage error.
|
|
40
|
+
# not, with the reason on stderr, and 2 on a usage error. With
|
|
41
|
+
# --repo, the report's review-of line must name that repository.
|
|
41
42
|
#
|
|
42
43
|
# Environment:
|
|
43
44
|
# HOUSEBROKEN_HOME work directory, default $HOME/.housebroken.
|
|
@@ -266,7 +267,7 @@ EOF
|
|
|
266
267
|
}
|
|
267
268
|
|
|
268
269
|
cmd_check() {
|
|
269
|
-
local report="${1:-}" clone="" t
|
|
270
|
+
local report="${1:-}" clone="" repo="" t
|
|
270
271
|
local texts=()
|
|
271
272
|
[ -n "$report" ] || bad_usage "check needs the report path"
|
|
272
273
|
shift
|
|
@@ -274,6 +275,10 @@ cmd_check() {
|
|
|
274
275
|
case "$1" in
|
|
275
276
|
--clone) clone="${2:-}"; shift ;;
|
|
276
277
|
--text) texts+=("${2:-}"); shift ;;
|
|
278
|
+
--repo)
|
|
279
|
+
repo="${2:-}"
|
|
280
|
+
case "$repo" in */*) ;; *) bad_usage "check --repo needs owner/repo" ;; esac
|
|
281
|
+
shift ;;
|
|
277
282
|
*) bad_usage "unknown argument: $1" ;;
|
|
278
283
|
esac
|
|
279
284
|
shift
|
|
@@ -291,6 +296,14 @@ cmd_check() {
|
|
|
291
296
|
reviewer=$(field reviewer-model)
|
|
292
297
|
verdict=$(field verdict | tr '[:lower:]' '[:upper:]')
|
|
293
298
|
head=$(field head)
|
|
299
|
+
# Two repositories can share a report name (a-b/c and a/b-c), so the report
|
|
300
|
+
# clears only the repository it says it reviewed.
|
|
301
|
+
if [ -n "$repo" ]; then
|
|
302
|
+
local of
|
|
303
|
+
of=$(field review-of)
|
|
304
|
+
[ "$(lower "$of")" = "$(lower "$repo")" ] ||
|
|
305
|
+
refuse review-other-repository "$report is a review of ${of:-no repository}, not of $repo: its review-of line names the repository it read"
|
|
306
|
+
fi
|
|
294
307
|
[ -n "$author" ] || refuse review-no-author-model "$report names no author-model in its header, the lines above the first blank line"
|
|
295
308
|
why=$(objection "$(family "$author")" "$(family "$reviewer")")
|
|
296
309
|
[ -z "$why" ] || { refused_reason "$why" >&2; exit 1; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.24.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.23.0"
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|