Merge pull request 'docs: adjust for v0.3.0 release' (#36) from release/prepare_for_v0.3.0 into main

Reviewed-on: https://codeberg.org/romaintb/fgj/pulls/36
This commit is contained in:
Romain Bertrand 2026-03-13 18:24:34 +01:00
commit 3db03ed5e2
2 changed files with 108 additions and 10 deletions

View file

@ -5,6 +5,42 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.3.0] - 2026-03-13
### Added
#### Forgejo Actions
- `fgj actions run watch <run-id>` - Poll a run until completion
- `fgj actions run rerun <run-id>` - Trigger a rerun of a workflow run
- `fgj actions run cancel <run-id>` - Cancel an in-progress workflow run
- `fgj actions workflow enable <workflow>` - Enable a workflow
- `fgj actions workflow disable <workflow>` - Disable a workflow
#### Repository Management
- `fgj repo create <name>` - Create a new repository with full option set: `--private`/`--public`, `--description`, `--add-readme`, `--gitignore`, `--license`, `--homepage`, `--clone`, `--team`
#### Issue Management
- `fgj issue create -l <label>` - Assign labels when creating an issue
- `fgj issue edit --add-label` / `--remove-label` - Add or remove labels on existing issues
- `fgj issue close -c <comment>` - Close an issue with an optional comment
#### Workflow Management
- `fgj actions workflow list/view/run` - List, view, and trigger workflows
#### Auth Helpers
- `fgj auth token` - Print the stored token for the current host
- `fgj auth logout` - Remove authentication for a host
#### Shell Completions and Man Pages
- `fgj completion [bash|zsh|fish|powershell]` - Generate shell completion scripts
- `fgj manpages --dir <path>` - Generate man pages for all commands
#### JSON Output
- `--json` flag for all list and view commands: PRs, issues, releases, workflow runs, workflows
### Fixed
- Respect `$XDG_CONFIG_HOME` for config file location (was always using `~/.config`)
## [0.2.0] - 2026-01-09
### Added
@ -96,5 +132,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Cobra framework for CLI structure
- Viper for configuration management
[0.3.0]: https://codeberg.org/romaintb/fgj/releases/tag/v0.3.0
[0.2.0]: https://codeberg.org/romaintb/fgj/releases/tag/v0.2.0
[0.1.0]: https://codeberg.org/romaintb/fgj/releases/tag/v0.1.0

View file

@ -10,11 +10,15 @@
- Multi-instance support (works with any Forgejo instance)
- Pull request management (create, list, view, merge)
- Issue tracking (create, list, view, comment, close)
- Repository operations (view, list, clone, fork)
- Forgejo Actions (workflow runs, secrets, variables)
- Automatic repository detection from git context
- Issue tracking (create, list, view, comment, close, labels)
- Repository operations (view, list, create, clone, fork)
- Forgejo Actions (workflow runs, watch/rerun/cancel, enable/disable, secrets, variables)
- Releases (create, upload, delete)
- Shell completions (bash, zsh, fish, PowerShell) and man pages
- JSON output (`--json`) for all list/view commands
- Automatic repository and hostname detection from git context
- Secure authentication with personal access tokens
- XDG Base Directory compliant config location
- AI coding agent friendly
## Installation
@ -72,6 +76,16 @@ To create a personal access token:
fgj auth status
```
### Auth Helpers
```bash
# Print the stored token for the current host
fgj auth token
# Remove authentication for a host
fgj auth logout
```
## Usage
### Repository Detection
@ -131,6 +145,9 @@ fgj issue view 456
# Create an issue
fgj issue create -t "Issue Title" -b "Issue Description"
# Create an issue with labels
fgj issue create -t "Issue Title" -b "Issue Description" -l bug -l enhancement
# Comment on an issue
fgj issue comment 456 -b "My comment"
@ -139,6 +156,10 @@ fgj issue close 456
# Close an issue with a comment
fgj issue close 456 -c "Fixed in v2.0"
# Edit an issue (title, body, state, labels)
fgj issue edit 456 -t "New Title"
fgj issue edit 456 --add-label priority --remove-label bug
```
### Repositories
@ -150,6 +171,10 @@ fgj repo view owner/repo
# List your repositories
fgj repo list
# Create a repository
fgj repo create my-repo
fgj repo create my-repo -d "My project" --private --add-readme -g Go -l MIT
# Clone a repository
fgj repo clone owner/repo
@ -197,6 +222,10 @@ fgj actions workflow run deploy.yml -f environment=production -f version=1.2.3
# Run a workflow on a specific branch
fgj actions workflow run deploy.yml -r feature-branch
# Enable or disable a workflow
fgj actions workflow enable ci.yml
fgj actions workflow disable ci.yml
# List workflow runs
fgj actions run list
@ -212,6 +241,15 @@ fgj actions run view 123 --log
# View specific job logs
fgj actions run view 123 --job 456 --log
# Watch a run until completion
fgj actions run watch 123
# Rerun a workflow run
fgj actions run rerun 123
# Cancel a running workflow
fgj actions run cancel 123
# List secrets
fgj actions secret list
@ -237,6 +275,30 @@ fgj actions variable update MY_VAR "new value"
fgj actions variable delete MY_VAR
```
## Shell Completions and Man Pages
```bash
# Generate shell completion scripts
fgj completion bash > /etc/bash_completion.d/fgj
fgj completion zsh > "${fpath[1]}/_fgj"
fgj completion fish > ~/.config/fish/completions/fgj.fish
# Generate man pages to a directory
fgj manpages --dir ~/.local/share/man/man1
```
## JSON Output
Most list and view commands support `--json` for machine-readable output:
```bash
fgj pr list --json
fgj issue view 456 --json
fgj release list --json
fgj actions run list --json
fgj actions workflow view ci.yml --json
```
## Configuration
Configuration is stored in `~/.config/fgj/config.yaml`:
@ -311,15 +373,14 @@ Contributions are welcome! Please feel free to submit a Pull Request.
`fgj` aims to be a drop-in replacement for `gh` when working with Forgejo instances. While we've implemented the core features, some `gh` commands are not yet available:
### Forgejo Actions / Workflows
**Not Yet Implemented:**
- `workflow enable/disable` - Enable or disable workflows
- `run watch` - Follow a workflow run in real-time
- `run rerun` - Rerun entire run, failed jobs, or specific jobs
- `run cancel` - Cancel a running workflow
- `run delete` - Delete a workflow run
- `run download` - Download workflow run artifacts
- `pr checkout`, `pr close/reopen`, `pr comment`, `pr diff`
- `pr review`, `pr checks`, `pr ready/draft`
- `issue reopen`, `issue assign`
- `release edit`, `release download`, `release generate-notes`
- `repo delete`, `repo rename`, `repo visibility`
We welcome contributions to implement any of these features! Please check the issues or create a new one to discuss implementation before starting work.