@kitlangton/ghui 0.8.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +63 -0
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -60,6 +60,7 @@ bun run dev
60
60
  ## Configuration
61
61
 
62
62
  - `GHUI_PR_FETCH_LIMIT`: max PRs fetched, defaults to `200`
63
+ - `GHUI_RUN_FETCH_LIMIT`: max workflow runs fetched per PR, defaults to `20`
63
64
 
64
65
  Example:
65
66
 
@@ -91,6 +92,66 @@ Scrollable panes hide their scrollbar rails by default. Set `showScrollbars`
91
92
  to `true` to display them while retaining the same keyboard and mouse scrolling
92
93
  behavior.
93
94
 
95
+ ### Open in editor
96
+
97
+ Press `e` on a pull request (in the list, detail, or diff view) to hand it off
98
+ to your editor. ghui suspends the TUI, runs your command attached to the
99
+ terminal, and resumes when it exits.
100
+
101
+ Configure this in `config.json`:
102
+
103
+ ```json
104
+ {
105
+ "editorCommand": "tmux new-window -c {{repoPath}} 'gh pr checkout {{number}} && nvim -c \":DiffviewOpen {{baseRef}}...{{headRef}}\"'",
106
+ "repoPaths": {
107
+ "kitlangton/ghui": "~/code/ghui",
108
+ "kitlangton/*": "~/code/repos/kitlangton/*",
109
+ ":owner/:repo": "~/src/github.com/:owner/:repo"
110
+ }
111
+ }
112
+ ```
113
+
114
+ `repoPaths` maps a repository to a local clone, matched in order: an exact
115
+ `owner/repo` key, then an owner wildcard (`owner/*`, where `*` becomes the repo
116
+ name), then the generic `:owner/:repo` template. `~` expands to your home
117
+ directory.
118
+
119
+ `editorCommand` is a shell command template with these substitutions:
120
+
121
+ - `{{repo}}` — full `owner/repo`
122
+ - `{{owner}}`, `{{name}}`
123
+ - `{{number}}` — PR number
124
+ - `{{headRef}}` — PR head branch
125
+ - `{{baseRef}}` — base branch
126
+ - `{{author}}`
127
+ - `{{url}}`
128
+ - `{{repoPath}}` — resolved local path (requires a matching `repoPaths` entry)
129
+
130
+ If `editorCommand` is omitted, ghui falls back to `$VISUAL`/`$EDITOR` opening
131
+ the resolved `repoPath`. Some common recipes:
132
+
133
+ ```jsonc
134
+ // diffview.nvim: checkout the branch and diff against base
135
+ "editorCommand": "tmux new-window -c {{repoPath}} 'gh pr checkout {{number}} && nvim -c \":DiffviewOpen {{baseRef}}...{{headRef}}\"'"
136
+
137
+ // octo.nvim: review via the GitHub API (no checkout)
138
+ "editorCommand": "tmux new-window -c {{repoPath}} 'nvim -c \":silent Octo pr edit {{number}}\"'"
139
+
140
+ // VS Code
141
+ "editorCommand": "code {{repoPath}}"
142
+ ```
143
+
144
+ ### Workflow runs
145
+
146
+ Press `a` on a pull request to open its **GitHub Actions runs** full-screen,
147
+ scoped to the PR's head commit:
148
+
149
+ - The runs list shows each workflow run with status, conclusion, duration, and age.
150
+ - `enter` drills into a run to see its jobs and steps; failing steps are easy to spot.
151
+ - `n` / `p` jump between failures, `enter` expands a step, `o` opens the run in your browser, `r` refreshes, and `esc` walks back out.
152
+
153
+ Requires the GitHub CLI (`gh`) the same as the rest of ghui; nothing extra to configure.
154
+
94
155
  ## Keybindings
95
156
 
96
157
  - `up` / `down`: move selection
@@ -104,6 +165,7 @@ behavior.
104
165
  - `esc`: return from expanded details, leave diff/comment mode, or close modal
105
166
  - `r`: refresh
106
167
  - `d`: view stacked diff for all changed files
168
+ - `a`: view this PR's GitHub Actions runs (jobs, steps, and failing logs)
107
169
  - `shift-r`: review or approve the selected pull request
108
170
  - `up` / `down` / `pageup` / `pagedown`: move comment target while viewing a diff
109
171
  - `enter`: open a commented diff line, or start a comment on an uncommented line
@@ -118,6 +180,7 @@ behavior.
118
180
  - `t`: choose a fixed theme, including `System` to match your terminal colors; press `m` in the theme picker to follow the OS light/dark appearance with separate theme choices
119
181
  - `l`: manage labels
120
182
  - `o`: open PR in browser
183
+ - `e`: open PR in your editor (configurable; see `editorCommand` / `repoPaths`)
121
184
  - `y`: copy PR metadata
122
185
  - `q`: quit
123
186
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitlangton/ghui",
3
- "version": "0.8.0",
3
+ "version": "0.9.1",
4
4
  "description": "Terminal UI for GitHub pull requests",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -27,10 +27,10 @@
27
27
  "LICENSE"
28
28
  ],
29
29
  "optionalDependencies": {
30
- "@kitlangton/ghui-darwin-arm64": "0.8.0",
31
- "@kitlangton/ghui-darwin-x64": "0.8.0",
32
- "@kitlangton/ghui-linux-arm64": "0.8.0",
33
- "@kitlangton/ghui-linux-x64": "0.8.0"
30
+ "@kitlangton/ghui-darwin-arm64": "0.9.1",
31
+ "@kitlangton/ghui-darwin-x64": "0.9.1",
32
+ "@kitlangton/ghui-linux-arm64": "0.9.1",
33
+ "@kitlangton/ghui-linux-x64": "0.9.1"
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public",