Rust CLI for tangled
TODO - Tech Debt#
Pull Request Support#
Branch-Based PR Merge#
- Implement branch-based PR merge support in CLI
- Issue: Currently only patch-based PRs can be merged via
tangled pr merge - Location:
crates/tangled-api/src/client.rs:1250-1253 - Current behavior: Returns error: "Cannot merge branch-based PR via CLI. Please use the web interface."
- Required: Add support for merging PRs that have a
sourcefield with SHA/branch info instead of apatchfield - Related: Server-side merge API may need updates to support branch merges
- Issue: Currently only patch-based PRs can be merged via
PR Comments Display#
- Implement
--commentsflag functionality inpr showcommand- Issue: Flag is defined but not implemented
- Location:
crates/tangled-cli/src/commands/pr.rs:145-180 - Current behavior:
tangled pr show <id> --commentsdoesn't display any comments - Required:
- Fetch comments from the API
- Display comment author, timestamp, and content
- Handle threaded/nested comments if supported
- API: Need to determine correct endpoint for fetching PR comments
PR Format Compatibility#
- Support both patch-based and branch-based PR formats
- Completed: Added
PullSourcestruct and madepatchfield optional - Location:
crates/tangled-api/src/client.rs:1392-1413 - Details: PRs can now have either:
patch: String(legacy format)source: { sha, repo?, branch? }(new format)
- Completed: Added
Related Issues#
- Consider adding
--format jsonoutput for programmatic access to PR data - Add better error messages when operations aren't supported for certain PR types
- Document the differences between patch-based and branch-based PRs in user docs