Files
architecture/skills/forgejo/SKILL.md
Hugo Nijhuis 1f3fcd5b7d Improve PR review workflow
- Remove fj pr status (doesn't work reliably)
- Post review summary as comment before merging
- Delete branch after merge with -d flag
- Document all merge options in forgejo skill

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 23:52:28 +01:00

2.1 KiB

Forgejo CLI (fj)

Command-line interface for interacting with Forgejo repositories.

Authentication

The fj CLI authenticates via fj auth login. Credentials are stored locally by fj.

Repository Detection

fj automatically detects the repository from git remotes when run inside a git repository.

Common Commands

Issues

# List issues
fj issue search -s open              # Open issues
fj issue search -s closed            # Closed issues
fj issue search                      # All issues

# View issue details
fj issue view <number>               # Full issue details

# Create issue
fj issue create "<title>" --body "<body>"

# Edit issue
fj issue edit <number> --title "<new-title>"
fj issue edit <number> --body "<new-body>"

# Close/reopen
fj issue close <number>
fj issue reopen <number>

# Labels
fj issue label add <number> <label>
fj issue label remove <number> <label>

Pull Requests

# List PRs
fj pr search -s open                 # Open PRs
fj pr search -s closed               # Closed/merged PRs

# View PR
fj pr view <number>                  # PR details
fj pr view <number> diff             # PR diff

# Create PR
fj pr create "<title>" --body "<body>"
fj pr create "<title>" --body "Closes #<issue>"

# Comment on PR
fj pr comment <number> "<comment>"

# Merge
fj pr merge <number>                 # Default merge
fj pr merge <number> -d              # Delete branch after merge
fj pr merge <number> -M squash       # Squash commits
fj pr merge <number> -M rebase       # Rebase commits
fj pr merge <number> -M rebase-merge # Rebase then merge commit

Repository

fj repo view                         # Repository info
fj repo clone <owner>/<repo>         # Clone repository

Output Formatting

Most commands support --output flag:

  • --output json - Machine-readable JSON
  • --output table - Tabular format (default for lists)
  • --output simple - Plain text

Tips

  • Always verify you're in the correct repository before running commands
  • Use fj issue search to find issue numbers before viewing/editing
  • Reference issues in PR bodies with Closes #N for auto-linking