Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Platform bridges: `gh` (GitHub), `glab` (GitLab), REST API (Gitea/Forgejo).

## Key Commands
```bash
make test # Run all 282 tests
make test # Run all 284 tests
make install # Install system-wide (/usr/local)
git issue create "title" -l bug # Create issue with label
git issue ls --format full # List issues with metadata
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Thanks for your interest in contributing! This project welcomes contributions fr
```bash
git clone https://github.com/remenoscodes/git-native-issue.git
cd git-native-issue
make test # Run all 282 tests
make test # Run all 284 tests
```

## Development Setup
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ the deliverable that makes ecosystem adoption possible.
make test
```

282 tests: core (77), bridge (37), merge/fsck (21), QoL (22), validation (36), quality (59), edge cases (13), comment sync (8), concurrency (9).
284 tests: core (79), bridge (37), merge/fsck (21), QoL (22), validation (36), quality (59), edge cases (13), comment sync (8), concurrency (9).

## Performance Notes

Expand Down
9 changes: 7 additions & 2 deletions bin/git-issue-comment
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ usage() {
usage: git issue comment <issue-id> -m <message>

Options:
-m, --message <text> Comment text (required)
-m, --message <text> Comment text; use multiple times for paragraphs
-h, --help Show this help
EOF
exit 1
Expand Down Expand Up @@ -42,7 +42,12 @@ do
case "$1" in
-m|--message)
test $# -ge 2 || { echo "error: -m requires a value" >&2; exit 1; }
message="$2"
if test -n "$message"
then
message="$(printf '%s\n\n%s' "$message" "$2")"
else
message="$2"
fi
shift 2
;;
-h|--help)
Expand Down
9 changes: 7 additions & 2 deletions bin/git-issue-create
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ usage() {
usage: git issue create [options] <title>

Options:
-m, --message <text> Issue description (body)
-m, --message <text> Issue description (body); use multiple times for paragraphs
-l, --label <label> Add a label (can be repeated)
-a, --assignee <email> Assign to someone
-p, --priority <level> Set priority (low, medium, high, critical)
Expand All @@ -34,7 +34,12 @@ do
case "$1" in
-m|--message)
test $# -ge 2 || { echo "error: -m requires a value" >&2; exit 1; }
body="$2"
if test -n "$body"
then
body="$(printf '%s\n\n%s' "$body" "$2")"
else
body="$2"
fi
shift 2
;;
-l|--label)
Expand Down
37 changes: 37 additions & 0 deletions t/test-issue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,24 @@ case "$body" in
;;
esac

# ============================================================
# TEST: create with multiple -m flags builds multi-paragraph body
# ============================================================
run_test
setup_repo
git issue create "Multi-paragraph issue" -m "First paragraph" -m "Second paragraph" >/dev/null
ref="$(git for-each-ref --format='%(refname)' refs/issues/ | head -1)"
root="$(git rev-list --max-parents=0 "$ref")"
body="$(git log -1 --format='%b' "$root" | sed '/^[A-Z][A-Za-z-]*: /d')"
case "$body" in
*"First paragraph"*"Second paragraph"*)
pass "create with multiple -m flags builds multi-paragraph body"
;;
*)
fail "create with multiple -m flags builds multi-paragraph body" "got: '$body'"
;;
esac

# ============================================================
# TEST: create with priority
# ============================================================
Expand Down Expand Up @@ -766,6 +784,25 @@ else
fail "three comments create correct 4-commit chain" "got $total commits"
fi

# ============================================================
# TEST: comment with multiple -m flags builds multi-paragraph body
# ============================================================
run_test
setup_repo
out="$(git issue create "Comment paragraph test" 2>&1)"
id="$(printf '%s' "$out" | sed 's/Created issue //')"
git issue comment "$id" -m "First paragraph" -m "Second paragraph" >/dev/null
ref="$(git for-each-ref --format='%(refname)' refs/issues/ | head -1)"
full="$(git log -1 --format='%B' "$ref")"
case "$full" in
*"First paragraph"*"Second paragraph"*)
pass "comment with multiple -m flags builds multi-paragraph body"
;;
*)
fail "comment with multiple -m flags builds multi-paragraph body" "got: '$full'"
;;
esac

# ============================================================
# TEST: state --state custom value
# ============================================================
Expand Down