Summary
Currently codeberg-cli lacks dedicated commands for branch management and retrieving comments separately from issue/PR details. This makes it difficult to build tools that need to work with branches or fetch comments efficiently.
Missing Features
1. Branch Management
-
List branches:
berg repo branches --repo owner/repo- API:
GET /repos/{owner}/{repo}/branches - Output: List of branches with commit info
- API:
-
Delete branch:
berg repo branch delete BRANCH_NAME --repo owner/repo- API:
DELETE /repos/{owner}/{repo}/branches/{branch} - Safety: Require confirmation or
--forceflag
- API:
2. Comment Retrieval
-
List issue comments:
berg issue comments ID --repo owner/repo- API:
GET /repos/{owner}/{repo}/issues/{issue}/comments - Current workaround:
berg issue view ID --commentsbut includes full issue details
- API:
-
List PR comments:
berg pull comments ID --repo owner/repo- API:
GET /repos/{owner}/{repo}/issues/{pr}/comments - Current workaround:
berg pull view ID --commentsbut includes full PR details
- API:
-
List PR review comments:
berg pull review-comments ID --repo owner/repo- API:
GET /repos/{owner}/{repo}/pulls/{pr}/comments - These are code-level review comments (different from discussion comments)
- No current workaround available
- API:
Use Case
Building MCP (Model Context Protocol) server for Codeberg that needs efficient access to:
- Branch lists for showing available branches before creating PRs
- Branch deletion for cleanup after merge
- Comment retrieval without fetching full issue/PR data
- Review comments for code review analysis
Alternatives Considered
- Using
berg api- but it's limited to version endpoint - Direct API calls via HTTP client - defeats purpose of using CLI wrapper
- Parsing
--commentsoutput - inefficient when only comments are needed
Would appreciate these additions to make codeberg-cli more complete for automation and tooling!