walkdiff 0.4.0 → 0.5.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/CHANGELOG.md +4 -1
- package/README.md +11 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 0.5.0
|
|
6
|
+
|
|
7
|
+
- **Install from npm:** `npx walkdiff app`, or `npm install --global walkdiff`, instead of cloning the repository. Releases are published from GitHub Actions with provenance.
|
|
8
|
+
- **The Action and GitLab template use the npm package,** pinned to their release, so they no longer clone and build Walkdiff on every run. The Action takes a `package` input to choose another version.
|
|
6
9
|
- **`walkdiff setup`,** and scanners install on first use: they now live in your cache folder, `~/.cache/walkdiff/scanners`, rather than inside the code, and don't depend on npm install scripts. `--offline` skips installing them.
|
|
7
10
|
## 0.4.0
|
|
8
11
|
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
A review companion for GitHub pull requests and GitLab merge requests. `walkdiff review <url>` fetches the
|
|
6
6
|
change, analyzes it, and serves a local report. (Working name; the project name is still an open decision.)
|
|
7
7
|
|
|
8
|
-
Status: early release, [v0.
|
|
8
|
+
Status: early release, [v0.5.0](CHANGELOG.md). To run it on your team's PRs, see the [pilot guide](docs/pilot.md).
|
|
9
9
|
|
|
10
10
|
**Documentation:** [getting started](docs/getting-started.md), [configuration](docs/configuration.md), [troubleshooting](docs/troubleshooting.md), [security policy](SECURITY.md).
|
|
11
11
|
|
|
@@ -53,21 +53,23 @@ level"; a unit both moved and edited shows as removed plus added; no syntax high
|
|
|
53
53
|
|
|
54
54
|
## Usage
|
|
55
55
|
|
|
56
|
-
Requires Node.js 22.18 or newer
|
|
56
|
+
Requires Node.js 22.18 or newer and git.
|
|
57
57
|
|
|
58
58
|
```sh
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
pnpm walkdiff review https://gitlab.com/group/project/-/merge_requests/45 --no-serve --out ./report
|
|
59
|
+
npx walkdiff review https://github.com/owner/repo/pull/123
|
|
60
|
+
npx walkdiff review https://gitlab.com/group/project/-/merge_requests/45 --no-serve --out ./report
|
|
62
61
|
```
|
|
63
62
|
|
|
63
|
+
Or install it once with `npm install --global walkdiff`, then run `walkdiff`. To work on Walkdiff itself,
|
|
64
|
+
clone this repository, run `pnpm install`, and use `pnpm walkdiff` in place of `walkdiff`.
|
|
65
|
+
|
|
64
66
|
Set `GITHUB_TOKEN` (or `GH_TOKEN`) and `GITLAB_TOKEN` for private repositories and higher API rate limits.
|
|
65
67
|
GitHub Enterprise and self-managed GitLab work by URL; tokens go to them only once they're [trusted](docs/configuration.md#tokens-and-trusted-hosts). Run `pnpm walkdiff --help` for all options.
|
|
66
68
|
|
|
67
69
|
## Keep track of several reviews
|
|
68
70
|
|
|
69
71
|
```sh
|
|
70
|
-
|
|
72
|
+
npx walkdiff app
|
|
71
73
|
```
|
|
72
74
|
|
|
73
75
|
This runs a local page at `http://127.0.0.1:4317/`. Paste a pull request or merge request link to add it; analyses run one at a time, and the list shows each review's status and counts, and flags medium or high severity security findings. Refresh re-runs a review after new commits. The list is kept in SQLite under `~/.local/share/walkdiff`, so it survives restarts. If `GITHUB_TOKEN` is not set, the app asks the GitHub CLI for its login on that PR's host.
|
|
@@ -81,13 +83,13 @@ Private repositories and merge requests work once a token is in the environment.
|
|
|
81
83
|
**GitLab**: create a personal or project access token with the `read_api` and `read_repository` scopes (`api` if you will also post comments with `walkdiff comment`):
|
|
82
84
|
|
|
83
85
|
```sh
|
|
84
|
-
GITLAB_TOKEN=<token>
|
|
86
|
+
GITLAB_TOKEN=<token> walkdiff review https://gitlab.com/group/project/-/merge_requests/123
|
|
85
87
|
```
|
|
86
88
|
|
|
87
89
|
**GitHub**: use a token that can read the repository. With the GitHub CLI:
|
|
88
90
|
|
|
89
91
|
```sh
|
|
90
|
-
GH_TOKEN=$(gh auth token)
|
|
92
|
+
GH_TOKEN=$(gh auth token) walkdiff review https://github.com/owner/repo/pull/123
|
|
91
93
|
```
|
|
92
94
|
|
|
93
95
|
`GITHUB_TOKEN` works too. Self-managed GitLab and GitHub Enterprise are recognized from the URL and use the same variables, once listed in `WALKDIFF_TRUSTED_GITLAB_HOSTS` or `WALKDIFF_TRUSTED_GITHUB_HOSTS`. Without a token, a private repository usually answers 404, and walkdiff says which variable to set.
|
|
@@ -96,7 +98,7 @@ Tokens and code stay on your machine, apart from the host itself, package names
|
|
|
96
98
|
|
|
97
99
|
## In CI
|
|
98
100
|
|
|
99
|
-
The GitHub Action (`navasvarela/walkdiff@v0.
|
|
101
|
+
The GitHub Action (`navasvarela/walkdiff@v0.5.0`) and the GitLab template (`ci/gitlab-ci.yml`) generate the report for each PR, keep it as a job artifact, and post one summary comment that is updated on each push. The [pilot guide](docs/pilot.md) has the setup. Locally, `walkdiff review` also works without a URL inside a CI job, and `walkdiff comment --report <dir> --report-url <url>` posts the summary.
|
|
100
102
|
|
|
101
103
|
## AI review
|
|
102
104
|
|