usage() in issue-assign.sh, issue-create.sh, issue-list.sh,
milestone-create.sh, pr-create.sh, pr-list.sh, and pr-merge.sh
hard-coded exit 1, so every -h/--help invocation printed help but
exited nonzero — logging phantom isError:true records fleet-wide and
breaking set -e composition in callers.
Fix (per #701's proposed fix): usage() now takes an exit-code
argument defaulting to 1; each wrapper's -h|--help case calls
usage 0 so help exits cleanly. All other invocations of usage()
(unknown option, missing required arg) are unchanged and still
default to exit 1.
Scope: help/exit-code handling only. No merge, approval, auth, or
gate-enforcement logic was touched — verified via git diff --stat
(exactly 2 lines changed per file, 14 total) and confirmed by reading
the full diff of pr-merge.sh (squash-only enforcement, base-branch
check, CI queue-guard invocation, tea/API merge fallback all
untouched).
lane-brief.sh is intentionally excluded (separate deployed-only file,
follow-up per #701).
Added packages/mosaic/framework/tools/git/test-help-exit-code.sh, a
small regression harness matching the existing test-*.sh convention
in this directory: asserts --help and -h exit 0 with usage output for
all 7 wrappers, and that a genuine unknown flag still exits nonzero.
Passes 7/7.
usage() in issue-assign.sh, issue-create.sh, issue-list.sh,
milestone-create.sh, pr-create.sh, pr-list.sh, and pr-merge.sh
hard-coded exit 1, so every -h/--help invocation printed help but
exited nonzero — logging phantom isError:true records fleet-wide and
breaking set -e composition in callers.
Fix (per #701's proposed fix): usage() now takes an exit-code
argument defaulting to 1; each wrapper's -h|--help case calls
usage 0 so help exits cleanly. All other invocations of usage()
(unknown option, missing required arg) are unchanged and still
default to exit 1.
Scope: help/exit-code handling only. No merge, approval, auth, or
gate-enforcement logic was touched — verified via `git diff --stat`
(exactly 2 lines changed per file, 14 total) and confirmed by reading
the full diff of pr-merge.sh (squash-only enforcement, base-branch
check, CI queue-guard invocation, tea/API merge fallback all
untouched).
lane-brief.sh is intentionally excluded (separate deployed-only file,
follow-up per #701).
Added packages/mosaic/framework/tools/git/test-help-exit-code.sh, a
small regression harness matching the existing test-*.sh convention
in this directory: asserts --help and -h exit 0 with usage output for
all 7 wrappers, and that a genuine unknown flag still exits nonzero.
Passes 7/7.
Closes #701
usage() hard-coded exit 1, so every --help/-h invocation on
issue-assign, issue-create, issue-list, milestone-create, pr-create,
pr-list, and pr-merge exited nonzero, logging phantom isError records
across fleet lanes and breaking set -e composition. usage() now takes
an exit-code arg (default 1); the -h|--help case calls usage 0. All
other error paths are untouched.
Closes#701
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
usage() in issue-assign.sh, issue-create.sh, issue-list.sh,
milestone-create.sh, pr-create.sh, pr-list.sh, and pr-merge.sh
hard-coded exit 1, so every -h/--help invocation printed help but
exited nonzero — logging phantom isError:true records fleet-wide and
breaking set -e composition in callers.
Fix (per #701's proposed fix): usage() now takes an exit-code
argument defaulting to 1; each wrapper's -h|--help case calls
usage 0 so help exits cleanly. All other invocations of usage()
(unknown option, missing required arg) are unchanged and still
default to exit 1.
Scope: help/exit-code handling only. No merge, approval, auth, or
gate-enforcement logic was touched — verified via
git diff --stat(exactly 2 lines changed per file, 14 total) and confirmed by reading
the full diff of pr-merge.sh (squash-only enforcement, base-branch
check, CI queue-guard invocation, tea/API merge fallback all
untouched).
lane-brief.sh is intentionally excluded (separate deployed-only file,
follow-up per #701).
Added packages/mosaic/framework/tools/git/test-help-exit-code.sh, a
small regression harness matching the existing test-*.sh convention
in this directory: asserts --help and -h exit 0 with usage output for
all 7 wrappers, and that a genuine unknown flag still exits nonzero.
Passes 7/7.
Closes #701