gfreview 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +116 -0
- package/dist/gfreview +0 -0
- package/dist/gfreview.js +16908 -0
- package/dist/index.d.ts +2 -0
- package/dist/src/Config.d.ts +2 -0
- package/dist/src/Errors.d.ts +19 -0
- package/dist/src/cli/BodyReader.d.ts +1 -0
- package/dist/src/cli/Commands.d.ts +2 -0
- package/dist/src/cli/Output.d.ts +58 -0
- package/dist/src/client/ForgeClient.d.ts +51 -0
- package/dist/src/client/GitHubClient.d.ts +46 -0
- package/dist/src/client/GitLabClient.d.ts +52 -0
- package/dist/src/client/index.d.ts +3 -0
- package/dist/src/entity/Schemas.d.ts +203 -0
- package/dist/src/entity/Transforms.d.ts +33 -0
- package/dist/src/entity/index.d.ts +2 -0
- package/dist/src/service/DiffService.d.ts +42 -0
- package/dist/src/service/DiscussionService.d.ts +48 -0
- package/dist/src/service/ReviewService.d.ts +59 -0
- package/dist/src/session/SessionStore.d.ts +44 -0
- package/dist/src/session/index.d.ts +1 -0
- package/package.json +47 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Martin C. Richards
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Git Forge Review
|
|
2
|
+
|
|
3
|
+
CLI for managing code reviews on git forges
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### Quick Install (curl | bash)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
curl -fsSL https://raw.githubusercontent.com/martinffx/gfreview/main/install.sh | bash
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
#### Options
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Install to custom location (default: /usr/local/bin)
|
|
17
|
+
curl -fsSL https://raw.githubusercontent.com/martinffx/gfreview/main/install.sh | BIN_DIR=~/.local/bin bash
|
|
18
|
+
|
|
19
|
+
# Install specific version
|
|
20
|
+
curl -fsSL https://raw.githubusercontent.com/martinffx/gfreview/main/install.sh | VERSION=v0.1.0 bash
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### npm
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install -g gfreview
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### From Source
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
bun install
|
|
33
|
+
bun run build
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Configuration
|
|
37
|
+
|
|
38
|
+
Environment variables:
|
|
39
|
+
|
|
40
|
+
- `GFREVIEW_TOKEN` — Required (GitHub PAT or GitLab token)
|
|
41
|
+
- `GFREVIEW_URL` — Default: https://github.com or https://gitlab.com
|
|
42
|
+
- `GFREVIEW_FORGE` — gitlab or github (auto-detected)
|
|
43
|
+
- `GFREVIEW_PROJECT` — Optional: owner/repo or group/project
|
|
44
|
+
|
|
45
|
+
Or use a config file at `$XDG_CONFIG_HOME/gfreview/config.toml`:
|
|
46
|
+
|
|
47
|
+
```toml
|
|
48
|
+
forge = "github"
|
|
49
|
+
url = "https://github.com"
|
|
50
|
+
project = "owner/repo"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Usage
|
|
54
|
+
|
|
55
|
+
### PR Management
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
gfreview list # List open PRs
|
|
59
|
+
gfreview view <id> # Show PR details
|
|
60
|
+
gfreview create --title <title> --source-branch <branch> --target-branch <branch>
|
|
61
|
+
gfreview approve <id>
|
|
62
|
+
gfreview merge <id>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Review Workflow
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
gfreview review start <id> # Open session, cache SHAs
|
|
69
|
+
gfreview review comment <id> --file <path> --line <n> --body <text>
|
|
70
|
+
gfreview review submit <id> [--body <text>]
|
|
71
|
+
gfreview review status <id>
|
|
72
|
+
gfreview review discard <id>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Comments
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
gfreview diff <id>
|
|
79
|
+
gfreview comments <id>
|
|
80
|
+
gfreview resolve <id> --discussion-id <id>
|
|
81
|
+
gfreview note <id> --body <text>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Shared Flags
|
|
85
|
+
|
|
86
|
+
- --forge gitlab|github — Override detected forge
|
|
87
|
+
- --project <path> — Override project
|
|
88
|
+
- --json — JSON output
|
|
89
|
+
- --body - | @<path> — Read body from stdin or file
|
|
90
|
+
|
|
91
|
+
## Diff Format
|
|
92
|
+
|
|
93
|
+
gfreview diff outputs an LLM-optimized format with line numbers that map directly to --line arguments.
|
|
94
|
+
|
|
95
|
+
## Agent Workflow
|
|
96
|
+
|
|
97
|
+
gfreview diff <id> # Read annotated diff
|
|
98
|
+
gfreview review start <id> # Open session, cache SHAs
|
|
99
|
+
gfreview review comment ... # Stage comments
|
|
100
|
+
gfreview review submit <id> # Submit (or warn if stale)
|
|
101
|
+
gfreview comments <id> # Verify
|
|
102
|
+
|
|
103
|
+
## Development
|
|
104
|
+
|
|
105
|
+
- bun test — Run tests
|
|
106
|
+
- bun run types — Type check
|
|
107
|
+
- bun run lint — Lint
|
|
108
|
+
- bun run format:check — Check formatting
|
|
109
|
+
- bun run build — Compile to binary
|
|
110
|
+
|
|
111
|
+
## Architecture
|
|
112
|
+
|
|
113
|
+
- v0.1: GitHub support
|
|
114
|
+
- v0.2: GitLab support (architecture in place)
|
|
115
|
+
|
|
116
|
+
The CLI uses a forge-agnostic interface — GitLab and GitHub clients implement the same API.
|
package/dist/gfreview
ADDED
|
Binary file
|