judgelint 0.2.3-x86_64-linux → 0.2.4-x86_64-linux
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +24 -8
- data/libexec/judgelint +0 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e938cb600155875ce4483eb3e32fcc594c6c1e6e051652444b8f8db2c4a29324
|
|
4
|
+
data.tar.gz: 29993402ce175a9e4574451e5644fcc063a24d02a34ae72f44b552a7b8e2cb96
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 82fa0642e05c45c02d4ed544e1007b51d862126906823bf92302075e63ddc7a0b67886fe17055e0f866bb067d51d0a47a395a54dcfba16a074493e9721c5769b
|
|
7
|
+
data.tar.gz: f2f9ff829ffb0a5be6a64fbbf6a3760a1d68ad100c4d55c8a244beeb02b670fa56e2637754ce3ee63e51419d45b8891d53d96269021f657dfcee71dfaef5e524
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.4 (2026-10-30)
|
|
4
|
+
|
|
5
|
+
- On GitHub Actions' default checkout, `--pr` compares GitHub's merge
|
|
6
|
+
commit with its first parent, fetching it if the checkout is one commit
|
|
7
|
+
deep. The checkout needs no history, and a stacked pull request is
|
|
8
|
+
checked for its own changes, not the whole stack's. It's used only when
|
|
9
|
+
the run is a `pull_request` event for a `refs/pull/<n>/merge` ref and
|
|
10
|
+
HEAD is that run's commit, so a merge the pull request committed isn't
|
|
11
|
+
taken for GitHub's.
|
|
12
|
+
- Otherwise, on GitHub Actions, `--pr` reads the branch a pull request
|
|
13
|
+
targets from its event before `GITHUB_BASE_REF`, which names the branch
|
|
14
|
+
a whole stack targets.
|
|
15
|
+
|
|
3
16
|
## 0.2.3 (2026-10-30)
|
|
4
17
|
|
|
5
18
|
`--pr` uses the pull request's own specs and cache again, and hardening
|
data/README.md
CHANGED
|
@@ -243,20 +243,21 @@ A new file is
|
|
|
243
243
|
all changed lines. Rules about a whole file (`scope: file`) still read the
|
|
244
244
|
whole file when any of it changed, and a directory rule asks about a
|
|
245
245
|
directory when a file in it was changed, added or deleted. Only `check`
|
|
246
|
-
takes `--base` and `--pr`. `--pr`
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
merge base.
|
|
246
|
+
takes `--base` and `--pr`. `--pr` checks against `JUDGELINT_BASE_BRANCH`
|
|
247
|
+
when it's set, or else the base branch that GitHub Actions, GitLab,
|
|
248
|
+
Buildkite, Bitbucket, Azure Pipelines or `gh` names. git needs the history
|
|
249
|
+
back to the merge base, except on GitHub Actions' own checkout (below).
|
|
250
250
|
|
|
251
251
|
Under `--base` or `--pr`, a changed file judgelint can't judge fails the
|
|
252
252
|
run: one too large for the model, one the model refused to answer about,
|
|
253
253
|
even in part, one that leads outside the project, or a binary one. Images,
|
|
254
254
|
fonts, archives and other formats that are never code are left out instead.
|
|
255
255
|
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
On GitHub Actions, the default checkout is enough. Keep the cache between
|
|
257
|
+
pushes:
|
|
258
258
|
|
|
259
259
|
```yaml
|
|
260
|
+
- uses: actions/checkout@v4
|
|
260
261
|
- uses: actions/cache@v4
|
|
261
262
|
with:
|
|
262
263
|
path: .judgelint/cache.bin
|
|
@@ -265,10 +266,25 @@ GitHub Actions:
|
|
|
265
266
|
- run: judgelint --pr --format github
|
|
266
267
|
```
|
|
267
268
|
|
|
269
|
+
That checkout is the merge commit GitHub makes for the pull request, and
|
|
270
|
+
`--pr` compares it with its first parent: the base branch, or for a stacked
|
|
271
|
+
pull request, the merge commit of the one below it. So a stacked pull
|
|
272
|
+
request is checked for its own changes, with the config of what it lands
|
|
273
|
+
on. judgelint fetches that parent with the checkout's credentials, so leave
|
|
274
|
+
`persist-credentials` at its default. Line numbers are the merge commit's:
|
|
275
|
+
if the base branch changed lines above an edit, an annotation can sit a few
|
|
276
|
+
lines from where the "Files changed" tab shows it.
|
|
277
|
+
|
|
278
|
+
To check the pull request's own commit instead, check it out with
|
|
279
|
+
`ref: ${{ github.event.pull_request.head.sha }}` and fetch the history
|
|
280
|
+
with `fetch-depth: 0` (`filter: blob:none` skips old file contents). `--pr`
|
|
281
|
+
then compares with the branch the pull request targets, read from GitHub's
|
|
282
|
+
event, since `GITHUB_BASE_REF` names the branch a whole stack targets.
|
|
283
|
+
|
|
268
284
|
### Pull requests from people you don't trust
|
|
269
285
|
|
|
270
|
-
`--pr` reads `.judgelint.yml` from the base branch,
|
|
271
|
-
request, so a pull request can't change where its code is sent or which
|
|
286
|
+
`--pr` reads `.judgelint.yml` from the base branch, or for a stacked pull
|
|
287
|
+
request from the one below it, not from the pull request, so a pull request can't change where its code is sent or which
|
|
272
288
|
API key goes with it.
|
|
273
289
|
|
|
274
290
|
The pull request's own specs and cache are used, so a new or changed
|
data/libexec/judgelint
CHANGED
|
Binary file
|