ci: format

This commit is contained in:
Barrett Ruth 2026-03-28 00:53:15 -04:00
parent 0c41ff01fb
commit c0d2a19498
No known key found for this signature in database
GPG key ID: A6C96C9349D2FC81

View file

@ -18,7 +18,8 @@ your editor.
unified/split toggle and quickfix navigation unified/split toggle and quickfix navigation
- Commit and branch browsing with checkout, diff, and URL generation - Commit and branch browsing with checkout, diff, and URL generation
- File/line permalink generation and yanking (commit and branch URLs) - File/line permalink generation and yanking (commit and branch URLs)
- [fzf-lua](https://github.com/ibhagwan/fzf-lua) pickers with contextual keybinds - [fzf-lua](https://github.com/ibhagwan/fzf-lua) pickers with contextual
keybinds
- Pluggable source registration for custom or self-hosted forges - Pluggable source registration for custom or self-hosted forges
## Dependencies ## Dependencies
@ -69,8 +70,8 @@ git clone https://github.com/barrettruth/forge.nvim \
## Usage ## Usage
forge.nvim works through two entry points: the `:Forge` command and the forge.nvim works through two entry points: the `:Forge` command and the `<c-g>`
`<c-g>` picker. picker.
`:Forge` with no arguments (or `<c-g>`) opens the top-level picker — PRs, `:Forge` with no arguments (or `<c-g>`) opens the top-level picker — PRs,
issues, CI, commits, branches, worktrees, and browse actions. Each sub-picker issues, CI, commits, branches, worktrees, and browse actions. Each sub-picker
@ -164,7 +165,7 @@ vim.g.forge = {
`:Forge` with no arguments opens the top-level picker. Subcommands: `:Forge` with no arguments opens the top-level picker. Subcommands:
| Command | Description | | Command | Description |
|---|---| | --------------------------------------------- | --------------------------------- |
| `:Forge pr` | List open PRs | | `:Forge pr` | List open PRs |
| `:Forge pr --state={open,closed,all}` | List PRs by state | | `:Forge pr --state={open,closed,all}` | List PRs by state |
| `:Forge pr create [--draft] [--fill] [--web]` | Create PR | | `:Forge pr create [--draft] [--fill] [--web]` | Create PR |
@ -200,7 +201,7 @@ vim.g.forge = {
### Global ### Global
| Key | Mode | Description | | Key | Mode | Description |
|---|---|---| | ----------- | ---- | -------------------------------- |
| `<c-g>` | n, v | Open forge picker | | `<c-g>` | n, v | Open forge picker |
| `]q` / `[q` | n | Next/prev quickfix entry (wraps) | | `]q` / `[q` | n | Next/prev quickfix entry (wraps) |
| `]l` / `[l` | n | Next/prev loclist entry (wraps) | | `]l` / `[l` | n | Next/prev loclist entry (wraps) |
@ -210,7 +211,7 @@ vim.g.forge = {
Active in `fugitive` filetype buffers when a forge is detected. Active in `fugitive` filetype buffers when a forge is detected.
| Key | Description | | Key | Description |
|---|---| | ----- | ----------------------------------- |
| `cpr` | Create PR (compose buffer) | | `cpr` | Create PR (compose buffer) |
| `cpd` | Create draft PR | | `cpd` | Create draft PR |
| `cpf` | Create PR from commits (no compose) | | `cpf` | Create PR from commits (no compose) |
@ -221,7 +222,7 @@ Active in `fugitive` filetype buffers when a forge is detected.
Active during a review session. Active during a review session.
| Key | Description | | Key | Description |
|---|---| | --- | ------------------------- |
| `s` | Toggle unified/split diff | | `s` | Toggle unified/split diff |
### Terminal (log buffers) ### Terminal (log buffers)
@ -229,7 +230,7 @@ Active during a review session.
Active on CI/check log terminals when a URL is available. Active on CI/check log terminals when a URL is available.
| Key | Description | | Key | Description |
|---|---| | ---- | ------------------------- |
| `gx` | Open run/check in browser | | `gx` | Open run/check in browser |
## Picker Actions ## Picker Actions
@ -237,7 +238,7 @@ Active on CI/check log terminals when a URL is available.
Keybinds shown in the fzf header. `default` = `enter`. Keybinds shown in the fzf header. `default` = `enter`.
| Picker | Key | Action | | Picker | Key | Action |
|---|---|---| | ------------ | ------------------------------ | ---------------------------------- |
| **PR** | `enter` | Checkout | | **PR** | `enter` | Checkout |
| | `ctrl-d` | Review diff | | | `ctrl-d` | Review diff |
| | `ctrl-w` | Worktree | | | `ctrl-w` | Worktree |
@ -282,18 +283,18 @@ vim.g.forge = {
``` ```
A source is a table implementing the `forge.Forge` interface. Required fields: A source is a table implementing the `forge.Forge` interface. Required fields:
`name` (string), `cli` (string, checked via `executable()`), `kinds` (`{ issue, `name` (string), `cli` (string, checked via `executable()`), `kinds`
pr }`), and `labels` (`{ issue, pr, pr_one, pr_full, ci }`). (`{ issue, pr }`), and `labels` (`{ issue, pr, pr_one, pr_full, ci }`).
Required methods (all receive `self`): `list_pr_json_cmd`, `list_issue_json_cmd`, Required methods (all receive `self`): `list_pr_json_cmd`,
`pr_json_fields`, `issue_json_fields`, `view_web`, `browse`, `browse_root`, `list_issue_json_cmd`, `pr_json_fields`, `issue_json_fields`, `view_web`,
`browse_branch`, `browse_commit`, `checkout_cmd`, `yank_branch`, `yank_commit`, `browse`, `browse_root`, `browse_branch`, `browse_commit`, `checkout_cmd`,
`fetch_pr`, `pr_base_cmd`, `pr_for_branch_cmd`, `checks_cmd`, `check_log_cmd`, `yank_branch`, `yank_commit`, `fetch_pr`, `pr_base_cmd`, `pr_for_branch_cmd`,
`check_tail_cmd`, `list_runs_json_cmd`, `list_runs_cmd`, `normalize_run`, `checks_cmd`, `check_log_cmd`, `check_tail_cmd`, `list_runs_json_cmd`,
`run_log_cmd`, `run_tail_cmd`, `merge_cmd`, `approve_cmd`, `repo_info`, `list_runs_cmd`, `normalize_run`, `run_log_cmd`, `run_tail_cmd`, `merge_cmd`,
`pr_state`, `close_cmd`, `reopen_cmd`, `close_issue_cmd`, `reopen_issue_cmd`, `approve_cmd`, `repo_info`, `pr_state`, `close_cmd`, `reopen_cmd`,
`draft_toggle_cmd`, `create_pr_cmd`, `create_pr_web_cmd`, `default_branch_cmd`, `close_issue_cmd`, `reopen_issue_cmd`, `draft_toggle_cmd`, `create_pr_cmd`,
`template_paths`. `create_pr_web_cmd`, `default_branch_cmd`, `template_paths`.
See `lua/forge/github.lua`, `lua/forge/gitlab.lua`, or `lua/forge/codeberg.lua` See `lua/forge/github.lua`, `lua/forge/gitlab.lua`, or `lua/forge/codeberg.lua`
for complete implementations. The `forge.Forge` class definition with full type for complete implementations. The `forge.Forge` class definition with full type
@ -328,29 +329,26 @@ Run `:checkhealth forge` to verify your setup. Checks for `git`, forge CLIs
## FAQ ## FAQ
**Q: How do I create a PR?** **Q: How do I create a PR?** `<c-g>` -> Pull Requests -> `ctrl-a` to compose. Or
`<c-g>` -> Pull Requests -> `ctrl-a` to compose. Or from fugitive: `cpr` from fugitive: `cpr` (compose), `cpd` (draft), `cpf` (instant), `cpw` (web).
(compose), `cpd` (draft), `cpf` (instant), `cpw` (web).
**Q: Does review mode require diffs.nvim?** **Q: Does review mode require diffs.nvim?** Yes. Without
Yes. Without [diffs.nvim](https://github.com/barrettruth/diffs.nvim), the diff [diffs.nvim](https://github.com/barrettruth/diffs.nvim), the diff action and
action and review toggling are unavailable. review toggling are unavailable.
**Q: How does forge detection work?** **Q: How does forge detection work?** forge.nvim reads the `origin` remote URL
forge.nvim reads the `origin` remote URL and matches against known hosts and and matches against known hosts and any custom `sources.<name>.hosts`. The first
any custom `sources.<name>.hosts`. The first match wins, and the CLI must be in match wins, and the CLI must be in `$PATH`.
`$PATH`.
**Q: Can I use this with self-hosted GitLab/Gitea?** **Q: Can I use this with self-hosted GitLab/Gitea?** Yes. Add your host to
Yes. Add your host to `vim.g.forge.sources`. See the [examples](#examples). `vim.g.forge.sources`. See the [examples](#examples).
**Q: What does `ctrl-o` do in pickers?** **Q: What does `ctrl-o` do in pickers?** Cycles the state filter: open -> closed
Cycles the state filter: open -> closed -> all -> open. -> all -> open.
**Q: How do I merge/approve/close a PR?** **Q: How do I merge/approve/close a PR?** `ctrl-e` on a PR in the picker opens
`ctrl-e` on a PR in the picker opens the manage picker. Available actions depend the manage picker. Available actions depend on your repository permissions.
on your repository permissions.
**Q: Does this work without a forge remote?** **Q: Does this work without a forge remote?** Partially. Commits, branches, and
Partially. Commits, branches, and worktrees work in any git repo. PRs, issues, worktrees work in any git repo. PRs, issues, CI, and browse require a detected
CI, and browse require a detected forge. forge.