Skip to content

Commit ac30727

Browse files
author
Ron Buckton
committed
Update README.md
1 parent 8eb3096 commit ac30727

File tree

4 files changed

+82
-11
lines changed

4 files changed

+82
-11
lines changed

README.md

Lines changed: 81 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,10 @@ focus-dt [options]
1818

1919
```
2020
Authentication options:
21-
--token GitHub Auth Token. Uses %GITHUB_API_TOKEN%,
22-
%FOCUS_DT_GITHUB_API_TOKEN%, or %AUTH_TOKEN% (in
23-
that order) if available [string]
24-
--username GitHub Username [string]
25-
--password GitHub Password [string]
26-
--useCredentialManager, -C Use 'git credential' to load/save the credential
27-
to use [boolean]
21+
--username GitHub Username [string]
22+
--token GitHub Auth Token. Uses %GITHUB_API_TOKEN%,
23+
%FOCUS_DT_GITHUB_API_TOKEN%, or %AUTH_TOKEN% (in that order) if
24+
available [string]
2825
2926
Configuration options:
3027
--config Loads settings from a JSON file
@@ -43,6 +40,7 @@ Browser options:
4340
the chrome process (default: 10,000) [number]
4441
4542
Options:
43+
--help, -h Show help [boolean]
4644
--version Show version number [boolean]
4745
--skipped Include previously skipped items [boolean]
4846
--needsReview Include items from the 'Needs Maintainer Review' column of 'New
@@ -65,13 +63,85 @@ Options:
6563
approvers
6664
- 'always' - Approve PRs when merging if you haven't already
6765
approved
68-
- 'only' - Manually approve PRs in the CLI and advance to the
69-
next item (disables merging)
66+
- 'only' - [DEPRECATED] Manually approve PRs in the CLI and
67+
advance to the next item (disables merging)
7068
[string] [choices: "manual", "auto", "always", "only"]
7169
--verbose, -v Increases the log level [count]
72-
--help, -h Show help [boolean]
7370
```
7471

7572
### Token Acquisition
7673

77-
If not GitHub auth token is provided, then the script will look in your host environment for: `GITHUB_API_TOKEN`, `FOCUS_DT_GITHUB_API_TOKEN` and `AUTH_TOKEN` before asking for a token.
74+
If a GitHub auth token is not provided then the script will look in your host environment for: `GITHUB_API_TOKEN`, `FOCUS_DT_GITHUB_API_TOKEN` and `AUTH_TOKEN` before asking for a token.
75+
76+
When asking for a token, `focus-dt` will use `git credential fill` to use your configured `git` credential helper.
77+
78+
# UI
79+
80+
## Console
81+
82+
When you start `focus-dt` (and have been properly authenticated), you will see a screen like this:
83+
84+
![focus-dt main console](docs/img/console-1.png)
85+
86+
1. These two tabs indicate the two primary columns in the [Pull Request Status Board](https://github.com/DefinitelyTyped/DefinitelyTyped/projects/5).
87+
- The active column is highlighted in blue.
88+
- The number to the right of the column indicates the number of pull request cards in the column
89+
when `focus-dt` was started (or since the last refresh).
90+
- If the number is in the format `x/y`, `x` indicates the number of pull requests that you have either
91+
merged or approved, while `y` indicates the total number of PRs in the column.
92+
- The current sort order is displayed to the right of the tabs.
93+
2. This indicates an activity log since the last reviewed PR.
94+
- Gray lines indicate PRs that were skipped for some reason, either due to configuration, PR status, or
95+
because you've explicitly skipped them until a change is made in the PR (such as when you have provided
96+
review feedback and are waiting on the author).
97+
- The white line indicates the current PR to review.
98+
- The number `[x/y]` indicates the current PR in the column (`x`) and the number of PRs in the column
99+
(`y`), to help keep track of progress.
100+
3. This section indicates information about the PR including:
101+
- A link to the PR (this may or may not be clickable depending on your terminal).
102+
- The author of the PR
103+
- When the PR was last updated.
104+
- Tags assigned to the PR (see 4 for more information)
105+
4. The PR's tags are listed here, with ansi colors matching the tag color on GitHub (if possible).
106+
5. If present, this section indicates the PR status provided by @typescript-bot.
107+
6. If owners or maintainers have already reviewed the PR, this section lists the review status
108+
and whether the PR has been updated since the review was made (in which case it will be marked
109+
`[outdated]`)
110+
7. This section indicates the key bindings used to interact with `focus-dt`
111+
112+
## Chrome
113+
114+
In addition, `focus-dt` will attempt to launch a Chrome window with UI automation with a debugger attached.
115+
This lets `focus-dt` reuse the same Chrome tab as you move between PRs. Eventually it may also be used to
116+
detect when you request changes to a PR to mark it as "skipped".
117+
118+
![focus-dt chrome](docs/img/chrome-1.png)
119+
120+
> NOTE: `focus-dt` may fail to attach to Chrome if an instance was already running when `focus-dt` was
121+
> started. If that happens, `focus-dt` will likely crash. This is a known issue. Until it has been addressed,
122+
> it is best to ensure there are no Chrome instances running when `focus-dt` is started.
123+
124+
## Keybindings
125+
126+
The default keybindings are:
127+
- `h` — Shows advanced options. These advanced keybindings are always available, but are generally
128+
ommitted for brevity.
129+
- `a` — Approves the PR. If the PR supports author merging, the UI will advance to the next PR after
130+
approval.
131+
- `m` — Merges the PR. Depending on configuration, this will approve the PR prior to merging. This
132+
option is hidden if the PR supports author merging.
133+
- `s` — Skips this PR until the PR changes. This is often used after you have requested changes or
134+
if you are waiting on the author. Skipped items will be reviewable again if you use the `--skipped` option
135+
or if over a week has passed since the item was skipped.
136+
- `d` — Moves this PR to the end of the queue for the current column. Useful if you want to come back
137+
to a review later without marking it as "skipped".
138+
- `q` — Quits `focus-dt`
139+
140+
Advanced keybindings (visible if you toggle the `h` option) include:
141+
- `alt+a` — Configure the default approval option.
142+
- `alt+m` — Configure the default merge option.
143+
- `f` — Changes the current filters and sort order.
144+
- `ctrl+s` — Save the current options and filters.
145+
146+
Advanced keybindings (always hidden) include:
147+
- `F5` — Refresh all columns

docs/img/chrome-1.png

87 KB
Loading

docs/img/console-1.png

67.9 KB
Loading

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import { createRunDownPrompt } from "./prompts/runDown";
3030
import { init } from "./init";
3131

3232
async function main() {
33+
process.title = "focus-dt";
3334
let {
3435
token,
3536
credential,

0 commit comments

Comments
 (0)