instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
GitGuardian__ggshield__1233
GitGuardian/ggshield
1,233
defect
55f09c8ac4f80d267c135287604b64a7402d6eb8
4ecef4beaef6bd745bd9874b9b9364d32cac881c
Add Codex AI hook support
## Summary Adds native Codex support to `ggshield secret scan ai-hook`. ## Changes - Adds a Codex agent implementation with native Codex hook JSON output. - Detects Codex hook payloads via `turn_id` or `.codex` transcript paths. - Scans Codex `Bash` and `apply_patch` PreToolUse payloads. - Adds `ggshield install -t ...
diff --git a/README.md b/README.md index 762671cd71..83f68a05a6 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,7 @@ To catch errors earlier, use `ggshield` as a [pre-commit, pre-push or pre-receiv You can install the hooks with the `ggshield install` command. -Supported tools: **Cursor**, **Claude Code**, a...
4
3
2
[{"id": "G0", "claim": "Since recent Codex versions no longer require explicitly enabling the hooks feature, the logic that enables codex_hooks in config.toml should be removed.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Support for edit tools (the T...
null
GitGuardian__ggshield__407
GitGuardian/ggshield
407
defect
407f654b0831834a981078f6307ed7b1d5347655
e84f94d8e8b767e20def2deed97e58619bbf6e0d
rework outputs of pre-commit, pre-push and pre-receive
pre-commit ![Screenshot from 2022-10-28 10-46-22](https://user-images.githubusercontent.com/112862545/198551480-abe9dc29-2dfe-41f5-822f-ecaa08ffdc08.png) pre-push ![Screenshot from 2022-10-28 11-13-40](https://user-images.githubusercontent.com/112862545/198551627-47b8258a-958a-4039-a4f7-fedc3ea38be1.png) pre-re...
diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index c71474a634..c494f435a7 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -1,17 +1,17 @@ - id: ggshield - name: GitGuardian Shield (pre-commit) + name: ggshield (pre-commit) entry: ggshield description: Runs ggshield to detect ...
8
6
0
[{"id": "G0", "claim": "The remediation_steps and bypass_message strings (and the same in the other commands) should be defined as module-level constants to keep the messages grouped at the top and the code easier to read.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}...
null
GitGuardian__ggshield__679
GitGuardian/ggshield
679
defect
a2cff8db13dc1f3855e63904f259b563ad6644a9
db6164ccfb78346734255dafdcf7f731d727085b
Xblanchot/sca 942/fix commit range in ci
This MR adds a util to get the previous state of the targeted branch in CI for github, and use it in sca scan ci. It also removes the need of defining a custom env variable for PR in github CI. A custom env variable is still required for push event on github. For now, SCA and IaC CI scans work only with github and gi...
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc9056ebab..dc00ed49c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -184,7 +184,6 @@ jobs: env: GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }} GITHUB_PUSH_BASE_SHA: ${{ github.event.base ...
17
10
2
[{"id": "G0", "claim": "The hunk in github_actions_range is a no-op: only the order of the two if statements changed.", "category": "correctness", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The GitLab helper is misspelled `gitlav_previous_commit_sha` and should read `gitlab_p...
null
GitGuardian__ggshield__722
GitGuardian/ggshield
722
defect
3051e3bda99f5f7ecbed7b176a6dc20c4f0f6d01
ea9464e954b665351b9d9ae8cdfe1bc1a285e123
refactor: Move ggshield.core.file_utils to ggshield.utils.files
The functions inside the module are not ggshield specific and should be in the ggshield.utils module according to the architecture described in #521. refs #521
diff --git a/ggshield/cmd/iac/scan/diff.py b/ggshield/cmd/iac/scan/diff.py index 615c314bb5..5bfe1d2a9f 100644 --- a/ggshield/cmd/iac/scan/diff.py +++ b/ggshield/cmd/iac/scan/diff.py @@ -23,10 +23,10 @@ ) from ggshield.core.config import Config from ggshield.core.errors import handle_exception -from ggshield.core.fi...
1
1
1
[{"id": "G0", "claim": "The utils package should not use Click exceptions or reference ggshield CLI options: get_filepaths() should raise a ValueError and its single caller should turn it into a UsageError.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
GitGuardian__ggshield__747
GitGuardian/ggshield
747
defect
a608c5d44f46689bf9b0157b26a7f715df367096
29ee9e39b0bac6f48d4844e1c670de548b4d8750
Send the scanned repository's origin url as an extra header
Compute the repository remote url. Pick one at random if several are found. This will allow a better connection between ggshield and GIM's database. This will appear in the request headers: `'GGShield-Repository-URL': 'https://github.com/bridgecrewio/terragoat.git'` All verticals will send this header. For IAC/SCA,...
diff --git a/ggshield/cmd/iac/scan/diff.py b/ggshield/cmd/iac/scan/diff.py index 7aa4b75057..4b5d53e794 100644 --- a/ggshield/cmd/iac/scan/diff.py +++ b/ggshield/cmd/iac/scan/diff.py @@ -31,6 +31,7 @@ Filemode, get_diff_files_status, get_filepaths_from_ref, + get_repository_url_from_path, ) from ggs...
1
1
1
[{"id": "G0", "claim": "The iac_scan_all command should also fetch the remote url and send it, handling the edge cases: local repo only sends None, a repo containing sub repos sends the repo linked to the provided path, and scanning repoB from inside repoA sends repoB.", "category": "correctness", "verdict": "supported...
null
GitGuardian__ggshield__791
GitGuardian/ggshield
791
defect
38c916e4cc76dfbe114be6e499bd33b6b1df1f31
5f78ae6f6125e0cbf19c14ec0e543e35bf274375
feat(core): try to extract repository url from ci env variables
Following #747, we want CI commands to gather the current repository URL from the CI environment variables first, falling back on `git remote -v` if variables are not found.
diff --git a/ggshield/core/git_hooks/ci/__init__.py b/ggshield/core/git_hooks/ci/__init__.py index f5bc0bebbb..8fd0877347 100644 --- a/ggshield/core/git_hooks/ci/__init__.py +++ b/ggshield/core/git_hooks/ci/__init__.py @@ -1,6 +1,7 @@ from .commit_range import collect_commit_range_from_ci_env from .current_and_previo...
2
2
0
[{"id": "G0", "claim": "The test class constants could be moved outside the class to avoid the `self.` prefix, and the TestScanContextRepositoryURL class itself dropped in favour of standalone pytest functions to save indentation.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "intr...
null
GitGuardian__ggshield__833
GitGuardian/ggshield
833
defect
21de1b0f81b727055e9d4d01ffe3f27524ed5342
de1b1eb44802dd1f359030f3dd3d8cfd0f7f9179
Add a script to build a standalone binary
This PR adds the `scripts/build-standalone-exe` script. This script builds a standalone ggshield executable using [Pyinstaller](https://pyinstaller.org/en/stable/). It builds binaries for: - Windows x86_64 - Linux x86_64 - Mac x86_64 - Mac M1 The binaries can be downloaded from the bottom of the [summary page...
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 105b5ab6dc..2e2054d6bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,7 +94,7 @@ jobs: - name: Use Pipfile.lock on locked version of Python # Keep version in sync with scripts/update-pipfile-lock/Docker...
1
1
0
[{"id": "G0", "claim": "The project's dependency management should be considered for a move from pipenv to pdm at some point.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GitGuardian__ggshield__849
GitGuardian/ggshield
849
defect
f598b5b44e68716cedb4222e449dcc5727671b2d
435bdfab5f6b754257276ddac75401c509a3e7f0
feat(honeytokens): add honeytoken create-with_context command
This PR adds the command `create-with-context` in honeytoken group to create a honeytoken and insert it in a file.
diff --git a/Pipfile.lock b/Pipfile.lock index 4640ccd5ea..90070e8de1 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -207,6 +207,7 @@ }, "ggshield": { "editable": true, + "markers": "python_version >= '3.8'", "path": "." }, "idna": { @@ -273,12 +...
9
9
2
[{"id": "G0", "claim": "setup.cfg should pin pygitguardian to a commit sha instead of the master branch name to avoid breakage.", "category": "maintainability", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Opening and writing the file manually can be simplified to a single fi...
null
GitGuardian__ggshield__857
GitGuardian/ggshield
857
defect
30afb5e771b9c27be463e9ece63ed42a7874ba09
24750798275d612ca2112af3012b8006cb2362a2
fix: Fix ignored paths in GGShield
This MR : - Adds a fixture in auto use to clear the cache from functools.lru_cache between tests - Makes ggshield get the local config from the root of the repo (if it can find git and is scanning a git repo) - Corrects the check to return an error when scanning an ignored directory - Fixes the test `test_retrieve_...
diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index 742016072d..933391e55c 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -16,6 +16,11 @@ from ggshield.core.cache import Cache from ggshield.core.url_utils import dashboard_to_api_url +from ggshield.utils.git_shell import ( + _g...
1
1
1
[{"id": "G0", "claim": "test_ci_no_env should copy only the $PATH variable into the patched environment instead of merging the whole existing environment, since inheriting CI variables like GITHUB_ACTIONS makes the app detect the wrong CI and stops the test exercising the no-CI-env fallback.", "category": "correctness"...
null
GitGuardian__ggshield__873
GitGuardian/ggshield
873
defect
6c47369405f003150085fffab2657dfeb01a12c7
57abcec7e38b6a2228979b9edf61e3d89df3fae3
Ignoring with an until date is broken
### Context Ggshield breaks when a vulnerability is ignored until a certain date. ## Steps to reproduce 1. Add a Pipfile and a Pipfile.lock with celery=4.4.7 as dependency 2. Ignore by adding the following in .gitguardian.yaml ``` - identifier: GHSA-q4xr-rc97-m4xx path: "Pipfile.lock" comment:...
diff --git a/ggshield/cmd/sca/scan/sca_scan_utils.py b/ggshield/cmd/sca/scan/sca_scan_utils.py index 8065aea257..e5601a837c 100644 --- a/ggshield/cmd/sca/scan/sca_scan_utils.py +++ b/ggshield/cmd/sca/scan/sca_scan_utils.py @@ -1,5 +1,5 @@ import re -from datetime import datetime +from datetime import datetime, timezon...
2
1
1
[{"id": "G0", "claim": "The IaC scan path may need the same fix as the SCA one, because it could still compare an until date against a naive or deprecated datetime.", "category": "correctness", "verdict": "opposed", "priority": "P1", "scope": "pre_existing"}, {"id": "G1", "claim": "The PR should add a proper non-regres...
null
GitGuardian__ggshield__887
GitGuardian/ggshield
887
defect
3f2f11913fd2ea4502e2af46e8fc67a8435bcc4d
0859a44e35ac3cbd66a94de7a0578c0896e4f7ca
feat(secret): Add option --use-gitignore to command secret scan path
## Context When running a scan at the root of a git checkout with `ggshield secret scan path`, files that are not part of the repository are scanned because the .gitignore is not honored. This creates irrelevant results. ## What has been done `secret scan path` now supports a `--use-gitignore` option to h...
diff --git a/changelog.d/20240515_144740_salome.voltz_scrt_4125_add_an_option_to_make_ggshield_secret_scan_path_honor.md b/changelog.d/20240515_144740_salome.voltz_scrt_4125_add_an_option_to_make_ggshield_secret_scan_path_honor.md new file mode 100644 index 0000000000..8e50dc5c2e --- /dev/null +++ b/changelog.d/2024051...
2
2
0
[{"id": "G0", "claim": "The new test should create its repository in a temporary directory via the tmp_path fixture and use the Repository helper instead of running git with os.system() in the current directory.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cla...
null
GitGuardian__ggshield__891
GitGuardian/ggshield
891
defect
dda1dd32b99d2e95367e74edf0ab76dbe36b5b03
ff04602c27a3ad079965e2d247015d6c220e4a54
Add cmd to scan changes between the default branch and the current state (commits + staged)
## Context Add a command to scan the change between the current state and the default branch. Useful to check a feature branch does not add any new secret. The naming (`changes`) may be discussed. ## What has been done - Add an util to list the remotes - Add an util to get the default branch - Add a `chan...
diff --git a/changelog.d/20240520_164203_samuel.guillaume_secret_scan_change.md b/changelog.d/20240520_164203_samuel.guillaume_secret_scan_change.md new file mode 100644 index 0000000000..39c0943c7c --- /dev/null +++ b/changelog.d/20240520_164203_samuel.guillaume_secret_scan_change.md @@ -0,0 +1,41 @@ +<!-- +A new scri...
10
10
2
[{"id": "G0", "claim": "The next(...) generator expression in get_default_branch could be replaced with a simpler for-loop that breaks on the first 'HEAD branch: ' line.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The test comment should say ...
null
GitGuardian__ggshield__931
GitGuardian/ggshield
931
defect
ef2a491833aa82a54f4706996a861ad6059c2766
f775feb60332b632fe479c6a246f8d2365c1122e
Reword error messages in honeytoken command
## Context The message from 403 errors in honeytoken commands is not used and replaced by a static one in order to explain how to access to the honeytoken feature, but if the error come from a rejection by IP allow list rules, this message is pointless. ## What has been done If the error message from API is ab...
diff --git a/changelog.d/20240710_174404_cedric.bosselut_reword_error_message_for_honeytoken.md b/changelog.d/20240710_174404_cedric.bosselut_reword_error_message_for_honeytoken.md new file mode 100644 index 0000000000..d57e34cc24 --- /dev/null +++ b/changelog.d/20240710_174404_cedric.bosselut_reword_error_message_for_...
1
1
1
[{"id": "G0", "claim": "The pull request's new allowlist-403 handling in the honeytoken commands should be covered by enriching the tests in tests/unit/cmd/honeytoken/test_honeytoken.py.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
GitGuardian__ggshield__956
GitGuardian/ggshield
956
defect
b0b0c8563351a1216b238b4020ab41714857231e
a76a1c762e0e11a08fc8b796077e201279ba797d
Add incident details option for json and sarif formats
## Context - Add `--with-incident-details` to output (json and sarif output only) more information about incident when the secret is already known by the gitguardian dashboard. ## What has been done <!-- If the changes are non-trivial, describe them to make it easier for reviewers to understand them. For...
diff --git a/Pipfile.lock b/Pipfile.lock index cbbcd3b3ad..580cc6b4d0 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -16,69 +16,84 @@ "default": { "certifi": { "hashes": [ - "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b", - "sha256:c19...
11
11
2
[{"id": "G0", "claim": "The SARIF output puts incident details under an `incidentDetails` key that does not exist in the SARIF result object schema, so it needs to be mapped to SARIF concepts (or SARIF support added in a separate PR).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "intr...
null
GitGuardian__ggshield__957
GitGuardian/ggshield
957
defect
a9555f7b206a6ea3b57a7e8b727c902afc617fef
d44ad2b9729f3a30dbb6434f5935fcf6e80e9c82
Fix git parser
## Context This PR fixes two problems: Problem 1: sometimes the path for a diff is wrong. This is because `commit_utils.parse_patch()` assumes that the diffs are in the same order as the filenames in the commit header, which turns out to not always be true. Problem 2: turning merge commits into individual comm...
diff --git a/changelog.d/20240910_170441_aurelien.gateau_fix_git_parser.md b/changelog.d/20240910_170441_aurelien.gateau_fix_git_parser.md new file mode 100644 index 0000000000..0c5a8a48f9 --- /dev/null +++ b/changelog.d/20240910_170441_aurelien.gateau_fix_git_parser.md @@ -0,0 +1,3 @@ +### Fixed + +- The git commit pa...
2
2
1
[{"id": "G0", "claim": "The parse_patch docstring should start with \"A patch\" instead of \"patch\" and should document what the function returns, e.g. that it extracts the paths of files modified by the commit.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1...
null
GitGuardian__ggshield__960
GitGuardian/ggshield
960
defect
5a57931358254ca34e71821b1de179a05236c76f
dd2ba4257ac81934a7ad11dd4cef7f3b5a9a1df3
Add default behavior to ggshield secret ignore
## Context Command `ggshield secret ignore` had no default behavior. ## What has been done Default behavior is now : `ggshield secret ignore MATCH` to ignore a secret using its hash. There is also an optional option `--name` to name the secret in the `gitguardian.yaml`. ## Validation - Get a secret hash...
diff --git a/changelog.d/20240912_120216_salome.voltz_add_ignore_hash_cmd.md b/changelog.d/20240912_120216_salome.voltz_add_ignore_hash_cmd.md new file mode 100644 index 0000000000..adae3a4d76 --- /dev/null +++ b/changelog.d/20240912_120216_salome.voltz_add_ignore_hash_cmd.md @@ -0,0 +1,3 @@ +### Added + +- Default beh...
8
7
1
[{"id": "G0", "claim": "The new positional argument should not be called `hash`: the reviewer first asked to name it `match` like in the .gitguardian.yaml file, then settled on `secret_sha`/`SECRET_SHA` to match the \"Secret SHA\" wording used in scan output.", "category": "design", "verdict": "supported", "priority": ...
null
GitbookIO__gitbook__2347
GitbookIO/gitbook
2,347
defect
22dc0d4ff513887619186f71cb2df673383e4f24
dd23af24b37b6bcba8afb29be231607d4640502d
Share memory cache between middleware and request handler
~~This PR reduces the work done in the middleware, since some of it is useless.~~ ~~The most certain one is that we call either `get(Space|CurrentSite)LayoutData` that fetches both the scripts and customization for the space/site. However, we only need the scripts for the current content to compute the CSP. Fetching...
diff --git a/src/middleware.ts b/src/middleware.ts index 6e924f8d25..c3bef11fa1 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -10,12 +10,11 @@ import { getPublishedContentByUrl, api, getSpace, - getSpaceContentData, userAgent, withAPI, - getSpaceLayoutData, DEFAULT_API_EN...
1
1
1
[{"id": "G0", "claim": "The middleware should keep proactively warming the cache with getSpaceContentData via waitUntil, since that pre-fetch didn't block the middleware and was measured to be efficient.", "category": "performance", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
GitbookIO__gitbook__2513
GitbookIO/gitbook
2,513
defect
133c3e7c0a27fb014b1eb8e2aac6cd87ef9cc5d7
4ad68b50900eef3ab82d50d1d0b5d336b8a616a8
Implement header link style
- **Add a way to silent logs** - **Fix active flag (to be removed)** - **Support link header style** **Default light** ![default-light](https://github.com/user-attachments/assets/5960956a-e086-42ee-82c4-d356135d673c) **Default dark** ![default-dark](https://github.com/user-attachments/assets/a65f5cfa-3ea9-4ac9-...
diff --git a/packages/gitbook/.env.example b/packages/gitbook/.env.example index fb641c4087..3d6e8bd14f 100644 --- a/packages/gitbook/.env.example +++ b/packages/gitbook/.env.example @@ -25,3 +25,6 @@ ### Sentry ### # SENTRY_DSN=xxx + +### Silent logs +# SILENT=true \ No newline at end of file diff --git a/packages...
2
1
1
[{"id": "G0", "claim": "The page may be starting to generate too many CSS variables, which could impact the HTML payload; if it gets too big, the variables should perhaps be moved to a dynamic route generating a style.css (explicitly not requested for this PR).", "category": "performance", "verdict": "opposed", "priori...
null
GitbookIO__gitbook__2623
GitbookIO/gitbook
2,623
defect
bb208ab36af24f23418e0ac592a9c48ffeca2588
a0884c9bb9b7d4fed793aabf1d1b08d36fae9791
Improve styles of Tables
This PR changes some of the styling of Tables to make them feel more up to date. - we use the `tint` if provided by the customization settings - we inherit the rounded or sharp angles if provided by customization # Screenshots Examples of sample and existing public docs in light and dark mode ## Before Keeper...
diff --git a/packages/gitbook/src/components/DocumentView/Table/ViewGrid.tsx b/packages/gitbook/src/components/DocumentView/Table/ViewGrid.tsx index c301a5c6de..144848e724 100644 --- a/packages/gitbook/src/components/DocumentView/Table/ViewGrid.tsx +++ b/packages/gitbook/src/components/DocumentView/Table/ViewGrid.tsx @...
2
1
1
[{"id": "G0", "claim": "The `columnHeader` class could be renamed to `tableHeader`, which would be a better name.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The table style changes should be covered by visual tests: check whether visual tests ...
null
GitbookIO__gitbook__2786
GitbookIO/gitbook
2,786
defect
12c786225011fb476a4a3706a5b30bb0fe49d151
111397668df33c56cc6069b3ddf7b3d8b4972db5
Highlight code client-side
This PR let us highlight the code client-side if the block is offscreen. It represents a huge performance improvement because highlighting code is very expensive. Also it unlocks the ability to create interactive blocks with code by using them client-side.
diff --git a/.changeset/thin-files-flow.md b/.changeset/thin-files-flow.md new file mode 100644 index 0000000000..aa81cb5264 --- /dev/null +++ b/.changeset/thin-files-flow.md @@ -0,0 +1,5 @@ +--- +'gitbook': patch +--- + +Improve performances by highlighting code client-side if the code block is offscreen diff --git a/...
9
7
1
[{"id": "G0", "claim": "loadHighlighter and loadHighlighterLanguage were downgraded from a concurrency-safe singleton (with mutex) to plain memoize because server-side code cannot be used in a client component, losing the concurrent-call handling the loader documented.", "category": "design", "verdict": "supported", "p...
null
GitbookIO__gitbook__2936
GitbookIO/gitbook
2,936
defect
16292def79adbb0005666709919a22d81897045e
66e49da3912749ecb5423e576c07a6378f4d8624
Support `prominent` search bar style
This PR adds support for the new `prominent` search bar style, resulting in a bigger search bar in the middle of the header. It also reworks the the sizing and spacing of header items in general, and fixes a small layout issue in the footer. https://github.com/user-attachments/assets/4ff8e1eb-2e1b-4e33-82c5-b9c4c4a1...
diff --git a/.changeset/empty-suns-agree.md b/.changeset/empty-suns-agree.md new file mode 100644 index 0000000000..9c05a75967 --- /dev/null +++ b/.changeset/empty-suns-agree.md @@ -0,0 +1,5 @@ +--- +'gitbook': minor +--- + +Add styling for prominent search bar option diff --git a/packages/gitbook/src/components/Footer...
5
4
1
[{"id": "G0", "claim": "The HeaderLinks element should not be passed an empty style=\"\" prop (suggested replacement: <HeaderLinks>).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Header links should be keyed by something unique to the link rat...
null
GitbookIO__gitbook__3173
GitbookIO/gitbook
3,173
defect
0353a8186cd8388fd0cc8dcebb748f97b9cde2b8
139219c64452ccbd4fb0d0109203cab811daa684
Support for reusable content across spaces.
This PR adds support for reusable content across spaces. It relies on the API token passed from GitBook to resolve the reference.
diff --git a/.changeset/polite-falcons-agree.md b/.changeset/polite-falcons-agree.md new file mode 100644 index 0000000000..7743ab7095 --- /dev/null +++ b/.changeset/polite-falcons-agree.md @@ -0,0 +1,6 @@ +--- +"gitbook-v2": minor +"gitbook": minor +--- + +Add support for reusable content across spaces. diff --git a/b...
1
1
0
[{"id": "G0", "claim": "Instead of extending the RevisionReusableContent interface with space and revision, ResolvedContentRef should use an interface holding these as three separate props.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GitbookIO__gitbook__3231
GitbookIO/gitbook
3,231
defect
778624af00e48390d39782b4f63345d1f013708a
4e758bc28b32ba7c2034fd88cd9e72848fd3b576
Persist visitor params values in public visitor session cookie
This PR aims to persist visitor params values in public visitor session cookie.
diff --git a/packages/gitbook-v2/src/middleware.ts b/packages/gitbook-v2/src/middleware.ts index 5cb34052f8..b39d41f4ea 100644 --- a/packages/gitbook-v2/src/middleware.ts +++ b/packages/gitbook-v2/src/middleware.ts @@ -9,6 +9,7 @@ import { removeLeadingSlash, removeTrailingSlash } from '@/lib/paths'; import { typ...
6
5
2
[{"id": "G0", "claim": "The visitor params cookie's one-hour max age may be wrong — it should probably be an actual session cookie (or a much longer period) instead.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The visitor params cookie should be retur...
null
GitbookIO__gitbook__3257
GitbookIO/gitbook
3,257
defect
c730845e17c0858132c176439cf4a5b707cb0047
c3cfbe69368d21db63750e4b9c43e89820942949
RND-6843: columns block
Adds a columns block to document: ![Screenshot 2025-05-22 at 14 27 37](https://github.com/user-attachments/assets/a4d8ed88-1c65-4ce8-91cf-b2b02932c730)
diff --git a/.changeset/flat-wolves-poke.md b/.changeset/flat-wolves-poke.md new file mode 100644 index 0000000000..2b5c201cd1 --- /dev/null +++ b/.changeset/flat-wolves-poke.md @@ -0,0 +1,6 @@ +--- +"gitbook-v2": patch +"gitbook": patch +--- + +Adds Columns layout block to GBO diff --git a/bun.lock b/bun.lock index 96...
1
1
0
[{"id": "G0", "claim": "A comment should be added explaining that the indices of the COLUMN_WIDTHS array are used as lookups (e.g. COLUMN_WIDTHS[1] = a column with width 1).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GitbookIO__gitbook__3351
GitbookIO/gitbook
3,351
defect
b4918f60cebccb4660a2a32a738f513eba83f0e3
e1aacb2a9cbe4a776865d517b55f0d73a66993c5
Fix an issue where PDF export URLs were not bringing their query params.
When we rewrite the URL in the middleware, we were losing the query params of the original request. This fixes that. Here's an example of it working now: https://gitbook-v2-7p90urrx2-gitbook.vercel.app/url/gitbook.com/docs/~gitbook/pdf?page=DfnNkU49mvLe2ythHAyx&only=yes&limit=100
diff --git a/.changeset/rich-buses-hunt.md b/.changeset/rich-buses-hunt.md new file mode 100644 index 0000000000..fbc59d232d --- /dev/null +++ b/.changeset/rich-buses-hunt.md @@ -0,0 +1,5 @@ +--- +"gitbook-v2": patch +--- + +Fix an issue where PDF export URLs were not keeping their query params. diff --git a/packages/g...
2
1
0
[{"id": "G0", "claim": "The author questions whether the rewrite should include all searchParams in the rewritten URL, as the change does.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The searchParams copying loop could be replaced with the simpler `rewr...
null
GitbookIO__gitbook__3356
GitbookIO/gitbook
3,356
defect
8d3c6562a266fc24d20a94af7f2f9c1e629970d6
624e9bfd4c6e0cdf8f094e952594c52384bb4e42
Update SpacesDropdown to manage active state based on current space
Pass the current space ID to the `SpacesDropdownMenuItems` to correctly set the active state for each item.
diff --git a/packages/gitbook/src/components/Header/SpacesDropdown.tsx b/packages/gitbook/src/components/Header/SpacesDropdown.tsx index 87ad44b5d7..abb712d427 100644 --- a/packages/gitbook/src/components/Header/SpacesDropdown.tsx +++ b/packages/gitbook/src/components/Header/SpacesDropdown.tsx @@ -72,6 +72,7 @@ export ...
1
1
0
[{"id": "G0", "claim": "The active state should be passed as `active` inside `slimSpaces` instead of adding a separate `curSpaceId` prop.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GitbookIO__gitbook__3369
GitbookIO/gitbook
3,369
defect
47214039868b0287f754dd46802dca2bde4bcccd
d9649f364ae6e0057d16c7325dca9d35633aa839
Properly redirect to the root page
Fix the linker methods to never return an empty path. Close RND-7230
diff --git a/packages/gitbook-v2/src/lib/links.test.ts b/packages/gitbook-v2/src/lib/links.test.ts index f73ec5ee86..713f7a4a75 100644 --- a/packages/gitbook-v2/src/lib/links.test.ts +++ b/packages/gitbook-v2/src/lib/links.test.ts @@ -36,7 +36,8 @@ describe('toPathInSpace', () => { }); it('should not add a ...
2
1
0
[{"id": "G0", "claim": "After the pull request changed the root-page expectations to '/', the 'should not add a trailing slash' tests in links.test.ts lost their meaning, so the tests should be renamed to reflect what they now assert.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduc...
null
GitbookIO__gitbook__3423
GitbookIO/gitbook
3,423
defect
e8fb84d362b6d6b7379338d00756fc5759e5d91d
9b5774cb7a9bc0f1bed492e929d00b4f9ebef8c2
Adjust cache life for error responses
Modify caching behavior to differentiate between 404 errors and other error codes, allowing longer cache durations for 404 errors while reducing cache time for other errors. I'm still a bit worried about the API load that this will create, we could do it on a per function basis instead of like that all at once
diff --git a/packages/gitbook/src/lib/data/errors.test.ts b/packages/gitbook/src/lib/data/errors.test.ts new file mode 100644 index 0000000000..8667aa37e8 --- /dev/null +++ b/packages/gitbook/src/lib/data/errors.test.ts @@ -0,0 +1,121 @@ +import { describe, expect, it } from 'bun:test'; +import { GitBookAPIError } from...
1
1
0
[{"id": "G0", "claim": "The hand-rolled cache-control parsing in extractCacheControl should use the already-available parse-cache-control package instead.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GitbookIO__gitbook__3503
GitbookIO/gitbook
3,503
defect
56d1b8fe2d4220d8182e204f35be103de2b649fc
54c0db1350f4c565f15854f7e34b28f6ecebc8cf
Implement basic URL scheme for Assistant & AI Search
- Reshapes the query parameters previously used for Search & Ask AI to work for all three: search, AI Search, and AI Assistant. - `?q=` always dictates the search state - `?ask=` always dictates the AI Search / AI Assistant state. - You can switch between the two. - Both parameters now accept a string. When they ar...
diff --git a/.changeset/odd-candles-move.md b/.changeset/odd-candles-move.md new file mode 100644 index 0000000000..0fa9828619 --- /dev/null +++ b/.changeset/odd-candles-move.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Implement basic URL scheme for assistant with ask diff --git a/packages/gitbook/e2e/internal.sp...
3
3
1
[{"id": "G0", "claim": "The nested import of `useSearch` from '../Search/useSearch' in useAIChat.tsx should be avoided and the module exported from an index.ts instead.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The conditional in the ask-mo...
null
GitbookIO__gitbook__3539
GitbookIO/gitbook
3,539
defect
cc2e615b9a790c58a8dcf5f9f27cc7c213df28d2
c0fc79d8aa0d4ec7ca808e37dd5eb497c23fc02c
Tweaks to AIChatButton and AIChatInput
- Switch to Cmd+I to open Assistant - AIChatButton now only ever opens the assistant - Clean up AIChatInput to better account for long translated strings and add prettier focus state - Improve some color inconsistencies in `Button` that were showing up in Assistant
diff --git a/packages/gitbook/e2e/internal.spec.ts b/packages/gitbook/e2e/internal.spec.ts index c309c9a06b..01058b1311 100644 --- a/packages/gitbook/e2e/internal.spec.ts +++ b/packages/gitbook/e2e/internal.spec.ts @@ -227,7 +227,7 @@ const searchTestCases: Test[] = [ }), screenshot: false, r...
2
2
1
[{"id": "G0", "claim": "The new import in AIChatButton.tsx should use the index module ('../AI') instead of the nested path '../AI/useAIChat'.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The pull request is missing a changeset file, so its ch...
null
GitbookIO__gitbook__3555
GitbookIO/gitbook
3,555
defect
28f7fbaa8a1791bc96aeb38b8858d9ae47bb3048
3cca758b7642227c2e62f6439e3b55700e60816f
Improve OpenAPI parsing errors
We make the error more explicit, saying that we didn't find any version. <img width="1618" height="732" alt="CleanShot 2025-08-12 at 14 29 52@2x" src="https://github.com/user-attachments/assets/755dc829-46f4-48c0-b2e9-11592c98827c" />
diff --git a/.changeset/tough-beers-own.md b/.changeset/tough-beers-own.md new file mode 100644 index 0000000000..3d797027bf --- /dev/null +++ b/.changeset/tough-beers-own.md @@ -0,0 +1,6 @@ +--- +"@gitbook/openapi-parser": patch +"gitbook": patch +--- + +Improve OpenAPI parsing errors diff --git a/packages/gitbook/src...
3
2
0
[{"id": "G0", "claim": "Renaming fetchFilesystemUncached to fetchFilesystemNoCache and dropping its options parameter will remove all the existing data cache for fetchFilesystem.", "category": "performance", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new comment in packag...
null
GitbookIO__gitbook__3607
GitbookIO/gitbook
3,607
defect
1b8609ac6093fc9be35ad977c3da09653abbc52a
d2f223ad7bbdc72343d64991e62319afdd2dabcd
Adapt OpenAPI to eval adaptive exprs & prefill TryIt config
This PR aims to adapt the OpenAPI blocks to eval adaptive content expression within an OpenAPI spec and use them to prefill the TryIt dialog with info contained in visitor claims (like API keys, server). API keys injection in code samples will be implemented in another PR. **Demo** https://github.com/user-atta...
diff --git a/.changeset/clean-queens-train.md b/.changeset/clean-queens-train.md new file mode 100644 index 0000000000..fbb604355b --- /dev/null +++ b/.changeset/clean-queens-train.md @@ -0,0 +1,7 @@ +--- +"@gitbook/react-openapi": minor +"gitbook": minor +"@gitbook/openapi-parser": patch +--- + +Adapt OpenAPI blocks t...
15
10
2
[{"id": "G0", "claim": "The provider should prefix React APIs for clarity, e.g. React.createContext instead of the imported createContext.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The provider prop getVisitorClaimsUrl should be renamed to visitorCl...
null
GitbookIO__gitbook__3619
GitbookIO/gitbook
3,619
defect
17dd382dc386523c3ad8ab232f273798c6303793
8f022e611ff6507107b1bc15c26186914ed2b690
Add pagination for llms-full.txt file
Implement pagination for the llms-full.txt file to improve performance and fix errors for very big files.
diff --git a/packages/gitbook/src/app/sites/static/[mode]/[siteURL]/[siteData]/llms-full.txt/[startIdx]/route.ts b/packages/gitbook/src/app/sites/static/[mode]/[siteURL]/[siteData]/llms-full.txt/[startIdx]/route.ts new file mode 100644 index 0000000000..b4e5736ec5 --- /dev/null +++ b/packages/gitbook/src/app/sites/stat...
3
3
2
[{"id": "G0", "claim": "The pagination parameter should be renamed from startIdx/startingNumber to a more conventional name such as offset (or start).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The URL should use a proper page number instead of a num...
null
GitbookIO__gitbook__3691
GitbookIO/gitbook
3,691
defect
319a1e536c4ddd34a5dc9330f06a8824869240e8
355ebc6024be8bc09ae399a4579e74b768917e4e
Highlight discriminator properties in oneOf, allOf, anyOf objects
<img width="590" height="269" alt="Screenshot 2025-09-26 at 15 35 24" src="https://github.com/user-attachments/assets/0c946b63-3dca-426d-9125-1e0cb7c6db20" />
diff --git a/.changeset/dirty-mice-sleep.md b/.changeset/dirty-mice-sleep.md new file mode 100644 index 0000000000..4071c03a07 --- /dev/null +++ b/.changeset/dirty-mice-sleep.md @@ -0,0 +1,6 @@ +--- +"@gitbook/react-openapi": patch +"gitbook": patch +--- + +Highlight discriminator properties in oneOf, allOf, anyOf obje...
1
1
0
[{"id": "G0", "claim": "The discriminator badge rendered next to the property name in the screenshot looks slightly misaligned.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GitbookIO__gitbook__3734
GitbookIO/gitbook
3,734
defect
8eae6e970bc1d8977ce248bb59925a77edd64333
ac09ae6d1d83073731dc5fed3e820d49ae1f63bb
Support emojis in outline
<img width="2256" height="816" alt="CleanShot 2025-10-16 at 16 34 59@2x" src="https://github.com/user-attachments/assets/1d6aaffe-b6ae-4a90-96f2-62ace5da8612" />
diff --git a/packages/gitbook/src/lib/document-sections.ts b/packages/gitbook/src/lib/document-sections.ts index d0b1edbb46..64da21ce95 100644 --- a/packages/gitbook/src/lib/document-sections.ts +++ b/packages/gitbook/src/lib/document-sections.ts @@ -1,8 +1,9 @@ import type { GitBookAnyContext } from '@/lib/context'; ...
2
1
0
[{"id": "G0", "claim": "The `key` prop should not be set on the Emoji component in getNodeReactText since it is not rendered in a list context there; return <Emoji code={node.data.code} /> instead.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The ...
null
GitbookIO__gitbook__3758
GitbookIO/gitbook
3,758
defect
6c9893945d565ca7330da76888532e6e3890ff2c
b1b9ace5bb8cacc09b1dc154b149787239fbfd72
Support cover image heights and positioning changes
- Sets the new `height` property on the page cover, set in the app or through md - Changed the way we set the `y` position of a page cover to align the app - Added a shimmer state to better fallback UI while cover is retrieved and avoid the objectPosition shifting from default 50% to whatever value was set. ## Dem...
diff --git a/packages/gitbook/src/components/PageBody/PageCover.tsx b/packages/gitbook/src/components/PageBody/PageCover.tsx index 0623310519..638801f2c1 100644 --- a/packages/gitbook/src/components/PageBody/PageCover.tsx +++ b/packages/gitbook/src/components/PageBody/PageCover.tsx @@ -8,6 +8,7 @@ import { tcls } from ...
3
2
0
[{"id": "G0", "claim": "In the PageCover div the inline style should pass the numeric height directly (`style={{ height }}`) instead of a pre-formatted string (`style={{ height: `${height}px` }}`).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "...
null
GitbookIO__gitbook__3772
GitbookIO/gitbook
3,772
defect
1d1f0a7c6a3d9e8819fffe910d9ad80769de348d
f0b99de4ea27691295620e942ef32e02dd932648
Support translations and generic variants together
Add rudimentary support for translations & generic variants to be used on the same site. The variant dropdown on the left and translation dropdown in the header can now function independently from each other. - Refactor `withVariants` into a `variants` object that contains two arrays for the different types: `transl...
diff --git a/.changeset/rich-hairs-check.md b/.changeset/rich-hairs-check.md new file mode 100644 index 0000000000..f12f76ba56 --- /dev/null +++ b/.changeset/rich-hairs-check.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Support translations and generic variants together diff --git a/packages/gitbook/src/components...
3
3
0
[{"id": "G0", "claim": "Rename getSpaceVariants to categorizeVariants because the name wrongly hints it is about a specific space.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a small one-line comment documenting the variant-categorizing f...
null
GitbookIO__gitbook__3779
GitbookIO/gitbook
3,779
defect
065a5e6e55bf6ed67f3a2eb0c862ef82f40456b2
cc4de25935a4d9a1132b427b84e279b8e177c648
Support custom cover heights
This PR handles the GBO-side of enabling cover height resizing. The basic idea is: 1. by default, we handle cover images the same as usual (aka there's a fixed aspect ratio as recommended in the docs that we adhere to, so this can lead to cover images [of e.g. < 100px tall](https://help.connected.illumina.com/) on sma...
diff --git a/packages/gitbook/e2e/internal.spec.ts b/packages/gitbook/e2e/internal.spec.ts index 34088e136b..8ea1a361a1 100644 --- a/packages/gitbook/e2e/internal.spec.ts +++ b/packages/gitbook/e2e/internal.spec.ts @@ -33,6 +33,7 @@ import { headerLinks, runTestCases, waitForCookiesDialog, + waitForCo...
3
3
2
[{"id": "G0", "claim": "The dimension-loading fallback should not prefer the dark image; everywhere else the light image is tried first.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The provided-dimensions resolution in useCoverPosition should als...
null
GitbookIO__gitbook__3796
GitbookIO/gitbook
3,796
defect
a512c90bdaefebf921fc8d69de55deefff92ae11
b506464750497f0e481651c05bde59c006d1cdd6
Use an available alternate when switching variants in a page
When switching between variants we check if the current page has an alternate link pointing to the space variant that we are switching to in order more accurately navigate the user. The default behaviour of replacing path still exists if there was no alternate configured
diff --git a/packages/gitbook/e2e/internal.spec.ts b/packages/gitbook/e2e/internal.spec.ts index afc5a056ac..d4b33458c2 100644 --- a/packages/gitbook/e2e/internal.spec.ts +++ b/packages/gitbook/e2e/internal.spec.ts @@ -338,6 +338,37 @@ const testCases: TestsCase[] = [ ).toBeVisible(); ...
7
5
3
[{"id": "G0", "claim": "The `if (!context)` guard in `useCurrentPageMetadata` will never throw because the context's default value is an object, so either set the default to `undefined`/`null` or remove the check.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1"...
null
GitbookIO__gitbook__3830
GitbookIO/gitbook
3,830
defect
87d68ea59e8ba738866cb9bd9cb6c2d037115066
7df72f10b5fa4a1f868ef073a35ce2db1ba3937b
Add e2e tests for embed frame
This PR adds E2E test coverage for GitBook Embed (standalone, assistant+docs, docs-only modes) and their configuration APIs. > [!IMPORTANT] > Cloudflare can only run a subset of these tests due to a URL issue in preview mode. In short, when loading the `~gitbook/embed/demo` route, we load the embed script from the ...
diff --git a/packages/embed/src/index.ts b/packages/embed/src/index.ts index 4f1cce44fa..cbfb347dcd 100644 --- a/packages/embed/src/index.ts +++ b/packages/embed/src/index.ts @@ -1 +1,2 @@ export * from './client'; +export * from './standalone'; diff --git a/packages/gitbook/e2e/internal.spec.ts b/packages/gitbook/e2e...
3
2
0
[{"id": "G0", "claim": "The comment in waitForTOCScrolling contains a grammatical error and should read \"the viewport is only a fraction\" instead of \"the viewport only a fraction\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In the 'Configu...
null
GitbookIO__gitbook__3904
GitbookIO/gitbook
3,904
defect
71c2e7f8b4b14ac35bb709a1479ebc9d804d78e8
ef3f35e0f6ea95f18c40f82b18f759c2a1f215a5
Standardise toggle chevrons across the app
We have a bunch of places where we need an animated chevron that changes based on open/closed state. This PR introduces a new `ToggleChevron` component to standardise the use across the app.
diff --git a/.changeset/rare-ties-find.md b/.changeset/rare-ties-find.md new file mode 100644 index 0000000000..3c7de54c2e --- /dev/null +++ b/.changeset/rare-ties-find.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Standardise toggle chevrons across the app diff --git a/packages/gitbook/src/components/DocumentView/...
2
1
0
[{"id": "G0", "claim": "The prop `type` is too generic and easily mistaken for typing, so it should be given a more precise name (suggested `direction`).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The prop `open` alone can be mistaken for a ...
null
GitbookIO__gitbook__3915
GitbookIO/gitbook
3,915
defect
887c3f8eacfe6f06c7491abe2b76f36ab976fbc2
b69186d3de08b1746b21e3fcd07921814f7423af
Add decodeURLPath function for URL decoding and validation
Implement a new function to decode URL path components, ensuring validation against invalid characters and limiting decoding iterations. This will now error on path with too deeply nested percent encoding, which should reduces 404 for voluntarily bad URL. It can also handle percent encoded character properly in the...
diff --git a/packages/gitbook/src/lib/data/urls.test.ts b/packages/gitbook/src/lib/data/urls.test.ts index d916003afb..a2013e1a1f 100644 --- a/packages/gitbook/src/lib/data/urls.test.ts +++ b/packages/gitbook/src/lib/data/urls.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'bun:test'; -import { getURLL...
6
5
2
[{"id": "G0", "claim": "The DataFetcherError messages thrown by decodeURLPath interpolate url.toString(), so query params (e.g. ?token=...) are reflected back to the client and into logs; use only the pathname or a redacted form instead.", "category": "security", "verdict": "supported", "priority": "P1", "scope": "intr...
null
GitbookIO__gitbook__3925
GitbookIO/gitbook
3,925
defect
2a0f37f4b3fe074f8ac3de0f5e28f9ac5a26c6f5
9d7ee8168d70bf5b58e9052de023728dcf1e0a27
Add support for custom cookie banner registration
This PR introduces support for custom cookie banner handling. This is a v1 and is subject to change once we start using it.
diff --git a/.changeset/tiny-rockets-obey.md b/.changeset/tiny-rockets-obey.md new file mode 100644 index 0000000000..084559e47b --- /dev/null +++ b/.changeset/tiny-rockets-obey.md @@ -0,0 +1,6 @@ +--- +"@gitbook/browser-types": patch +"gitbook": patch +--- + +Add support for custom cookie banner registration diff --gi...
11
7
4
[{"id": "G0", "claim": "The e2e custom-banner test calls onApprove, which triggers window.location.reload() and interferes with the subsequent assertion, so the handler should be registered without calling the callbacks.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "...
null
GitbookIO__gitbook__3938
GitbookIO/gitbook
3,938
defect
58f0cc828713892ac6e546513528f8d33cd818a7
39519e02958791836196afd9ad81731ecbb5b932
Add OpenAPI 3.1 nullable array support
Fix for this discussion: https://github.com/orgs/GitbookIO/discussions/1138
diff --git a/.changeset/yellow-fans-hunt.md b/.changeset/yellow-fans-hunt.md new file mode 100644 index 0000000000..ce0708991a --- /dev/null +++ b/.changeset/yellow-fans-hunt.md @@ -0,0 +1,5 @@ +--- +"@gitbook/react-openapi": patch +--- + +Add OpenAPI 3.1 nullable array support diff --git a/packages/react-openapi/src/O...
4
4
2
[{"id": "G0", "claim": "getSchemaTitle is declared to accept OpenAPIV3_1.ReferenceObject but its body immediately accesses properties like enum, type and items that do not exist on ReferenceObject; a type guard should be added or the parameter narrowed to SchemaObject only.", "category": "correctness", "verdict": "supp...
null
GitbookIO__gitbook__4029
GitbookIO/gitbook
4,029
defect
9dfa9c2db04af5b7463c2b53d83ad08f32190bdb
35a60c0cbd86803150e60b5b5504c00c46ab161d
Strip trailing slash from OpenAPI server URLs
## Summary - Strip trailing slash from interpolated OpenAPI server URLs to prevent double slashes in rendered paths (e.g. `/butler/api//endpoint` → `/butler/api/endpoint`) - Fix applied in `interpolateServerURL`, which is the shared function used by path display, code samples, and multi-server selection
diff --git a/.changeset/clean-servers-slash.md b/.changeset/clean-servers-slash.md new file mode 100644 index 0000000000..78677d3783 --- /dev/null +++ b/.changeset/clean-servers-slash.md @@ -0,0 +1,5 @@ +--- +"@gitbook/react-openapi": patch +--- + +Strip trailing slash from OpenAPI server URLs to avoid double slashes i...
1
1
1
[{"id": "G0", "claim": "Stripping the trailing slash inside interpolateServerURL desyncs it from call sites that still key and display server select items by the raw server.url, which can reintroduce double slashes when a selected server URL ends with '/' and can make the default selection key match no item; normalize ...
null
GitbookIO__gitbook__4030
GitbookIO/gitbook
4,030
defect
93eea0b6d975d68369f737fd153e948080c9eea0
e29ea7dc22f20ee34126c6067e22e147fb5582f6
Handle non-array required field in OpenAPI schema
## Summary - Fix `TypeError: ((intermediate value) || []) is not iterable` when rendering OpenAPI specs that use `"required": true` (boolean) on individual properties instead of the standard `string[]` format - Guard `mergeRequiredFields` with `Array.isArray()` checks so non-array values are safely ignored
diff --git a/.changeset/brave-doors-glow.md b/.changeset/brave-doors-glow.md new file mode 100644 index 0000000000..f9e581e460 --- /dev/null +++ b/.changeset/brave-doors-glow.md @@ -0,0 +1,5 @@ +--- +"@gitbook/react-openapi": patch +--- + +Handle non-array required field in OpenAPI schema to fix TypeError with specs us...
2
2
1
[{"id": "G0", "claim": "A regression test should be added covering non-standard boolean `required: true` values (e.g. a `getSchemaAlternatives` fixture with `required: true as any`) asserting it does not throw and that `required` is omitted/unchanged, so the original crash (`... is not iterable`) cannot easily be reint...
null
GitbookIO__gitbook__4043
GitbookIO/gitbook
4,043
defect
c348583a1845e23f2c70d8048ac3953afcd8fa85
472d83bdf9f05c2d2b6e418858ea4efcfc5bd827
Fix PDF export links to preserve published/custom domains
### Motivation - PDF exports from published sites with custom domains were generating links that pointed to `app.gitbook.com` editor URLs for pages not included in the exported PDF, causing customers to land on the editor/login instead of the public docs domain. ### Description - Extracted PDF-specific link resolution...
diff --git a/packages/gitbook/src/components/PDF/PDFPage.test.ts b/packages/gitbook/src/components/PDF/PDFPage.test.ts new file mode 100644 index 0000000000..65636d1bfb --- /dev/null +++ b/packages/gitbook/src/components/PDF/PDFPage.test.ts @@ -0,0 +1,49 @@ +import { RevisionPageType } from '@gitbook/api'; +import { de...
6
5
1
[{"id": "G0", "claim": "createPDFLinker generates anchor IDs prefixed `page-` while PDFPage.tsx renders page containers with the `pdf-page-` prefix, so in exports where a link targets another page included in the same PDF the anchor does not exist and internal navigation breaks; use the same ID format in both places (i...
null
GitbookIO__gitbook__4044
GitbookIO/gitbook
4,044
defect
c348583a1845e23f2c70d8048ac3953afcd8fa85
4698c14292ddc124b3d955d06a4cb86fa768e44b
Fix E2E tests
- **Fix PDF image loading flakiness** - **Remove screenshots from AI Assistant (too flaky)**
diff --git a/packages/gitbook/e2e/internal.spec.ts b/packages/gitbook/e2e/internal.spec.ts index 3350eabf1d..4b52103c8b 100644 --- a/packages/gitbook/e2e/internal.spec.ts +++ b/packages/gitbook/e2e/internal.spec.ts @@ -149,6 +149,7 @@ const searchTestCases: Test[] = [ mode: CustomizationAIMode.Assistan...
1
1
0
[{"id": "G0", "claim": "The `aria-busy` on the PDF images-loading status element can be simplified to the boolean expression `state.status !== 'ready'` instead of the `? true : undefined` conditional, matching the pattern used elsewhere in the codebase.", "category": "maintainability", "verdict": "supported", "priority...
null
GitbookIO__gitbook__4045
GitbookIO/gitbook
4,045
defect
f49b0af3fea4e00f40e939dd073180c02bd77859
b09f056989374a50202c8b650b0456bbfad84418
Include headings inside columns and tabs in published page outline
### Motivation - The published site extractor missed headings placed inside `columns` and `tabs` blocks, causing a mismatch with the editor outline and broken hash links for column/tab sections. ### Description - Update `getSectionsFromNodes` in `packages/gitbook/src/lib/document-sections.ts` to handle `columns` and `...
diff --git a/packages/gitbook/src/lib/document-sections.test.ts b/packages/gitbook/src/lib/document-sections.test.ts new file mode 100644 index 0000000000..8c4ed50ab4 --- /dev/null +++ b/packages/gitbook/src/lib/document-sections.test.ts @@ -0,0 +1,184 @@ +import { describe, expect, it, mock } from 'bun:test'; +import ...
2
2
0
[{"id": "G0", "claim": "Headings inside tabs would render in the outline with only their text content, which could be confusing because headings in non-active tabs are not visible on the page and lack the tab item's context; the reviewer asks whether the tab item's title should be added as a prefix.", "category": "desi...
null
GitbookIO__gitbook__4050
GitbookIO/gitbook
4,050
defect
1a7ef78fe2cb248e1753779030a0c688174e33c7
7303c428c7b216bf61f036d87c42bde512f9175d
Add server-side proxy for Scalar API client to bypass CORS
Route API requests from Scalar's "Try It" button through a server-side proxy at `/~scalar/proxy`, avoiding browser CORS restrictions. - Add `x-enable-proxy` spec-level extension to opt-in per OpenAPI spec - Extract and pass `x-enable-proxy` through the OpenAPI data pipeline - Configure Scalar's proxyUrl when `x-en...
diff --git a/.changeset/bright-streets-hammer.md b/.changeset/bright-streets-hammer.md new file mode 100644 index 0000000000..757332bb28 --- /dev/null +++ b/.changeset/bright-streets-hammer.md @@ -0,0 +1,7 @@ +--- +"@gitbook/openapi-parser": patch +"@gitbook/react-openapi": patch +"gitbook": patch +--- + +Add server-si...
13
8
8
[{"id": "G0", "claim": "The IPv4 private-IP detection does not block the multicast (224.0.0.0/4), reserved (240.0.0.0/4) and broadcast (255.255.255.255) ranges (and the other listed reserved blocks), and the tests do not cover them, so these addresses should be blocked and tested for SSRF protection.", "category": "sec...
null
GitbookIO__gitbook__4063
GitbookIO/gitbook
4,063
defect
b9b444c24ee99354687a88480d872f7225970c68
4fd0e1f925e5585f2044a5116741fabcd05aded0
Add server-side insight event tracking for MCP route
Extract postInsightsEvents utility from serveProxyAnalyticsEvent to allow sending insight events directly from server-side code. Use it in the MCP route to track search_type_query events.
diff --git a/packages/gitbook/src/app/sites/static/[mode]/[siteURL]/[siteData]/~gitbook/mcp/route.ts b/packages/gitbook/src/app/sites/static/[mode]/[siteURL]/[siteData]/~gitbook/mcp/route.ts index 7398b40956..7ab20ab055 100644 --- a/packages/gitbook/src/app/sites/static/[mode]/[siteURL]/[siteData]/~gitbook/mcp/route.ts...
6
5
2
[{"id": "G0", "claim": "postInsightsEvents should require the request and use it to fill the event automatically — with a function extracting sessionId/visitorId from the Request, equivalent to generating them with crypto.randomUUID() — rather than defaulting session fields to empty strings.", "category": "design", "ve...
null
GitbookIO__gitbook__4065
GitbookIO/gitbook
4,065
defect
b3e9ff98396668f9c1699ee831e5f4532b75f616
488535ef6838c36484d9bc779c1a351405fdc7e9
Fix PDF export page URL for /~space/ URLs
### Motivation - Ensure links to pages that are not included in a PDF export point back to the published site rather than being made local or broken. - Preserve anchors when linking to non-exported pages so intra-page navigation remains correct on the published site. - Pass the published space URL through the renderin...
diff --git a/packages/gitbook/src/app/~space/[spaceId]/pdf.ts b/packages/gitbook/src/app/~space/[spaceId]/pdf.ts index 44ab82b992..4e5e0dc20b 100644 --- a/packages/gitbook/src/app/~space/[spaceId]/pdf.ts +++ b/packages/gitbook/src/app/~space/[spaceId]/pdf.ts @@ -21,16 +21,15 @@ export async function getSpacePDFContext(...
1
1
0
[{"id": "G0", "claim": "The JSDoc of createPDFLinker should be updated to document the new optional publishedSpaceURL parameter and explain the fallback behavior when it is provided versus when it is not.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GitbookIO__gitbook__4096
GitbookIO/gitbook
4,096
defect
9dd2db667893d62d8ceb190f7c9fa0dafe4196b6
55c7352c6f92f36aa43587349e78602a7dde363d
Site Preview URLs
This PR ensures the new gitbook preview URLs can be resolved and render content. Later I will remove existing code that uses `/url/preview` format to keep things clean and support 1 preview format globally
diff --git a/.github/workflows/deploy-preview.yaml b/.github/workflows/deploy-preview.yaml index 3d7db35ceb..5745f6b2d5 100644 --- a/.github/workflows/deploy-preview.yaml +++ b/.github/workflows/deploy-preview.yaml @@ -136,7 +136,6 @@ jobs: env: BASE_URL: ${{ needs.deploy-v2-vercel.out...
5
1
1
[{"id": "G0", "claim": "getTestPreviewURL() passes the schemeless string returned by getGitBookPreviewURL() into new URL(...), which will throw at runtime; fix it by returning a fully-qualified URL or prefixing https://.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id...
null
GitbookIO__gitbook__4111
GitbookIO/gitbook
4,111
defect
45d32b50846ad2013c2c3236a8f97c6efb019d04
d1c5e70f5b98308a42d6720effac97a9afcfdaf9
Fix auth redirects with the new preview URL
The new preview URL returns a redirect to authenticate but it was getting swallowed with a 400 error. This PR fixes that
diff --git a/packages/gitbook/e2e/internal.spec.ts b/packages/gitbook/e2e/internal.spec.ts index 546ed3a5dc..2c4f937bf7 100644 --- a/packages/gitbook/e2e/internal.spec.ts +++ b/packages/gitbook/e2e/internal.spec.ts @@ -709,6 +709,26 @@ const testCases: TestsCase[] = [ await expect(page.locator('[da...
3
2
0
[{"id": "G0", "claim": "The comment added above the requestURL line has a duplicated word (\"using using\") and the extra \"using\" should be removed.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The doc comment on serveWithQueryAPIToken says \"...
null
GitbookIO__gitbook__4124
GitbookIO/gitbook
4,124
defect
5f132bc979c58f1bc13864692db681d4c2172ea3
5b548a51111bd96255f410d0a62289eec0be583a
Deep-merge schema properties in OpenAPISchema
Before: <img width="1066" height="764" alt="CleanShot 2026-03-18 at 00 11 29@2x" src="https://github.com/user-attachments/assets/cbc438ba-f7d9-421d-aa76-555f9cc313cf" /> After: <img width="1076" height="1426" alt="CleanShot 2026-03-18 at 00 10 34@2x" src="https://github.com/user-attachments/assets/80e5e3ef-8e4...
diff --git a/packages/react-openapi/src/OpenAPISchema.test.ts b/packages/react-openapi/src/OpenAPISchema.test.ts index 4f3e00a3ca..a2abf3d40c 100644 --- a/packages/react-openapi/src/OpenAPISchema.test.ts +++ b/packages/react-openapi/src/OpenAPISchema.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'bun:te...
2
2
2
[{"id": "G0", "claim": "deepMergeSchemas mutates its input by aliasing mergedProperties to schema2.properties and writing into it, which can also mutate the original dereferenced/retrocycled schema objects and lead to hard-to-debug cross-render side effects; it should create a new object (e.g., shallow copy) before mer...
null
GitbookIO__gitbook__4155
GitbookIO/gitbook
4,155
defect
e8224bad6c627f95566ebdab41ba00ffe9165af5
2274b0d1f66e2114db4e130c9a6c0d80da30ce26
Expose a ~gitbook/mcp/auth endpoint for non-VA adaptive content sites
This PR aims to add an additional MCP endpoint for non-VA adaptive content sites: `~gitbook/mcp/auth`. Unlike the existing `~gitbook/mcp` endpoint, this endpoint forces the OAuth protected-resource flow for non-VA adaptive content site (through site resolutioon) so authenticated claims can be passed to MCP tools when ...
diff --git a/packages/gitbook/src/app/sites/static/[mode]/[siteURL]/[siteData]/~gitbook/mcp/route.ts b/packages/gitbook/src/app/sites/static/[mode]/[siteURL]/[siteData]/~gitbook/mcp/[[...mcpPath]]/route.ts similarity index 93% rename from packages/gitbook/src/app/sites/static/[mode]/[siteURL]/[siteData]/~gitbook/mcp/ro...
2
2
0
[{"id": "G0", "claim": "The new ~gitbook/mcp routes should live under the dynamic site paths instead of the static ones, since an MCP server is by nature dynamic even if resolution happens in the middleware.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": ...
null
GitbookIO__gitbook__4173
GitbookIO/gitbook
4,173
defect
f17e292ba436f97f188185ccf15a08f698f23c09
321100e0289435122c3d112d678b643a94821a92
Extend gitbook/expr std lib with some additional methods
Extends the `@gitbook/expr` std lib symbol table with some additional methods to improve the expression editor autocomplete ([context](https://gitbook.slack.com/archives/C05DA0MQ7J9/p1775676244029489)).
diff --git a/.changeset/few-pandas-crash.md b/.changeset/few-pandas-crash.md new file mode 100644 index 0000000000..7c8d3445d4 --- /dev/null +++ b/.changeset/few-pandas-crash.md @@ -0,0 +1,5 @@ +--- +"@gitbook/expr": patch +--- + +Extend gitbook/expr std lib with some additional methods diff --git a/packages/expr/src/_...
1
1
0
[{"id": "G0", "claim": "Rename the misspelled test variable visitorClaimsKeyPropStrinSymbol to visitorClaimsKeyPropStringSymbol, as offered in the review suggestion.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
GitbookIO__gitbook__4195
GitbookIO/gitbook
4,195
defect
b2854500a14e4e15a0fa3dc454b0a13676ece37d
e9cc0f4cb0bf7f01e4e6b75bd8c1d40ec01d4c2b
Add ~gitbook/auth/logout endpoint in GBO
This PR aims to expose add a `~gitbook/auth/logout` endpoint to clear visitor authentication state.
diff --git a/packages/gitbook/src/app/sites/dynamic/[mode]/[siteURL]/[siteData]/~gitbook/auth/logout/route.ts b/packages/gitbook/src/app/sites/dynamic/[mode]/[siteURL]/[siteData]/~gitbook/auth/logout/route.ts new file mode 100644 index 0000000000..6a9ad91b63 --- /dev/null +++ b/packages/gitbook/src/app/sites/dynamic/[m...
1
1
0
[{"id": "G0", "claim": "The logout route should use `cookies.delete()` directly instead of building logout cookies via `getResponseCookiesForAuthLogout` and applying them with `writeResponseCookies`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
Gitlawb__openclaude__865
Gitlawb/openclaude
865
defect
28de94df5dcd7718cb334e2e793e9472f5b291c5
182c4f56426bf61f2112cd3dc826bb154f5c07fb
feat: add xAI as official provider
- Add xAI preset to ProviderManager (alphabetical order) - Add xAI provider detection via XAI_API_KEY - Add xAI startup screen heuristic (x.ai base URL or grok model) - Add xAI status display properties - Add grok-4 and grok-3 context windows - Add xAI model fallbacks across all tiers - Fix JSDoc priority order i...
diff --git a/src/components/ProviderManager.test.tsx b/src/components/ProviderManager.test.tsx index 44f75adc19..eea11d8c2d 100644 --- a/src/components/ProviderManager.test.tsx +++ b/src/components/ProviderManager.test.tsx @@ -123,6 +123,7 @@ const PRESET_ORDER = [ 'OpenAI', 'OpenRouter', 'Together AI', + 'xA...
2
2
1
[{"id": "G0", "claim": "The persisted startup profile path serializes xAI as generic OpenAI env and does not reliably reconstruct the xAI-specific classification on relaunch, so the new xAI provider/status/model-default branches are not reliably preserved across relaunch — the persisted startup env should reconstruct x...
null
Gitlawb__openclaude__877
Gitlawb/openclaude
877
defect
5a21d057410fb0c806173e3e4511b6d04a75eb1a
47e8434af6aa1eecd49dd8c3fd728c52662820e7
Add DeepSeek V4 flash/pro support and DeepSeek thinking compatibility
## Summary This PR updates OpenClaude's OpenAI-compatible DeepSeek integration for the current DeepSeek V4 model lineup and DeepSeek-specific thinking behavior. Closes #876 ## What Changed - added `deepseek-v4-flash` and `deepseek-v4-pro` to the DeepSeek preset/default model list - added provider-specific ...
diff --git a/.env.example b/.env.example index 1684e1bf88..42555f2b98 100644 --- a/.env.example +++ b/.env.example @@ -145,6 +145,11 @@ ANTHROPIC_API_KEY=sk-ant-your-key-here # CLAUDE_CODE_USE_OPENAI=1 # OPENAI_API_KEY=sk-your-key-here # OPENAI_MODEL=gpt-4o +# For DeepSeek, set: +# OPENAI_BASE_URL=https://api.deepse...
3
3
3
[{"id": "G0", "claim": "The reviewer asks for confirmation that the reasoning_content preservation across tool-call turns is gated to DeepSeek (or at least to providers that emit reasoning_content), so the field is not preserved for providers that would reject it on the follow-up turn.", "category": "correctness", "ver...
null
GitoxideLabs__gitoxide__1417
GitoxideLabs/gitoxide
1,417
defect
78b8e4110abd303511bad3fab469e7458f31f75a
2a563870fc4d2f65e34c4e4a448b446fc05a43b2
fix mailmap parsing issue
Fixes #1416. ### Tasks * [x] reproduce issue * [x] fix it * [x] add `mailmap check` to the CLI
diff --git a/gitoxide-core/src/repository/mailmap.rs b/gitoxide-core/src/repository/mailmap.rs index f9c947d8502..668ccd3c086 100644 --- a/gitoxide-core/src/repository/mailmap.rs +++ b/gitoxide-core/src/repository/mailmap.rs @@ -1,3 +1,5 @@ +use anyhow::bail; +use gix::bstr::{BString, ByteSlice}; use std::io; #[cfg...
1
1
1
[{"id": "G0", "claim": "The doc comment on the new `Check` subcommand is a copy of the `Entries` comment and incorrectly says it prints all entries in configured mailmaps instead of describing what `Check` does.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
GitoxideLabs__gitoxide__1730
GitoxideLabs/gitoxide
1,730
defect
69ee6a32dd221a1aae7b8c3817f90feacf577598
3614c21da2357cb58b7e8572ca49b52656780594
fix!: consider non-files as pruned officially.
Fixes #1729. ### Tasks * [x] experiment with `NonFile` + `Pruned` * [x] change it to `NoneFile` + default status handling I think the learning is that `NonFile` is a file type downstream has to deal with officially, just pruning these leads to unexpected results. Git will officially say that it won't diff ...
diff --git a/gitoxide-core/src/repository/clean.rs b/gitoxide-core/src/repository/clean.rs index a21bbe25a6c..0a05d4c0e7d 100644 --- a/gitoxide-core/src/repository/clean.rs +++ b/gitoxide-core/src/repository/clean.rs @@ -161,11 +161,16 @@ pub(crate) mod function { if entry.disk_kind.is_none() { ...
2
1
0
[{"id": "G0", "claim": "The `NonFile` variant name is unintuitive (regular files, directories and symlinks are not `NonFile`s while FIFOs and devices are) and its documentation comment is too brief, so the docs should be expanded and a clearer name considered.", "category": "documentation", "verdict": "supported", "pri...
null
GitoxideLabs__gitoxide__1899
GitoxideLabs/gitoxide
1,899
defect
b10cc6f0f2c3757677d9fdb3c01196d371ac6631
434bab7714e5ff62e9715fcb4bc64a79dd72478d
Improve filesystem timestamp granularity check
Fixes #1896 This avoids false positives for the check of whether we can proceed to run the filesystem snapshot `journey` test, by making a hundred files about as fast as we can using ordinary non-parallelized techniques, then checking if all their timestamps are distinct. This carries a small risk of false negati...
diff --git a/Cargo.lock b/Cargo.lock index a0f54606ae0..6fdc84aeb21 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1903,6 +1903,7 @@ dependencies = [ "fastrand", "gix-features 0.40.0", "gix-utils 0.1.14", + "is_ci", "serde", "tempfile", ] diff --git a/gix-fs/Cargo.toml b/gix-fs/Cargo.toml index ba396c5f25a..a1...
5
3
0
[{"id": "G0", "claim": "The macOS-on-CI assertion should pass an explanation as a third argument (possibly condensed from the comment above) saying why the failure occurs.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The number of files create...
null
GitoxideLabs__gitoxide__2274
GitoxideLabs/gitoxide
2,274
defect
df393f37bb03955eff3ad52c27440393737fb334
af9e974ec2cbb469392355aba425ed98b4c29862
protocol: split async and blocking APIs for fetching refmaps
This is just one part of the problem in gix-protocol, but I'm happy that I was able to resolve it with only about +20 lines despite some duplication. Happy to take feedback if you can articulate it (to save you on refactoring time).
diff --git a/gitoxide-core/src/pack/receive.rs b/gitoxide-core/src/pack/receive.rs index 0be29d7afd0..4d354eef9c3 100644 --- a/gitoxide-core/src/pack/receive.rs +++ b/gitoxide-core/src/pack/receive.rs @@ -87,17 +87,17 @@ where fetch_refspecs: fetch_refspecs.clone(), extra_refspecs: vec![], }; - ...
8
6
1
[{"id": "G0", "claim": "It would be nice if the test failed at compile time with a clear message when both client features are enabled, instead of probably failing more indirectly due to invalid code.", "category": "testing", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "What sh...
null
GitoxideLabs__gitoxide__2283
GitoxideLabs/gitoxide
2,283
defect
42cece8adcfcdda570c129ad99bc15d62f57f35e
c72ea8b57749ca30a30c83c6aebfd5aa68fc9aba
Add support for `:(optional)` prefix for path configuration values
## Tests for optional path configuration Added 4 comprehensive tests for accessing optional configuration paths: ✅ **optional_path_with_existing_file_is_returned** - Verifies that optional paths with existing files return Some(Ok(path)) ✅ **optional_path_with_missing_file_returns_none** - Verifies that optional paths...
diff --git a/gix-config-value/Cargo.toml b/gix-config-value/Cargo.toml index 16eae9faae9..aa1cdd2bfd8 100644 --- a/gix-config-value/Cargo.toml +++ b/gix-config-value/Cargo.toml @@ -12,7 +12,7 @@ rust-version = "1.82" include = ["src/**/*", "LICENSE-*"] [lib] -doctest = false +doctest = true [features] ## Data s...
1
1
1
[{"id": "G0", "claim": "Tests should be written for accessing optional configuration paths, i.e. for the :(optional) handling added to trusted_file_path in this pull request.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
GitoxideLabs__gitoxide__2285
GitoxideLabs/gitoxide
2,285
defect
9f49dd31559303bf32e0b6e38e0d184ea8a0e7b2
cb66d197fb1bc75813ce1079d43e3870dffa055c
Account for "\ No newline at end of file" in baseline diff parser
This is a small PR that fixes an oversight in the baseline diff parser in the diff slider tests. The parser now also parses `\ No newline at end of file` lines. This is something I found while using the script to run more tests. Off the top of my head, I don’t know whether there’s more cases the parser doesn’t handle y...
diff --git a/gix-diff/src/blob/platform.rs b/gix-diff/src/blob/platform.rs index 1907319b54d..b7b723eccc7 100644 --- a/gix-diff/src/blob/platform.rs +++ b/gix-diff/src/blob/platform.rs @@ -243,8 +243,8 @@ pub mod prepare_diff { /// Use it in [`Platform::prepare_diff_command`](super::Platform::prepare_diff_...
1
1
0
[{"id": "G0", "claim": "The new `b'\\\\'` arm added to the baseline diff parser should just be an `assert!` with a message instead of the if/else around `unreachable!`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GitoxideLabs__gitoxide__2286
GitoxideLabs/gitoxide
2,286
defect
9f49dd31559303bf32e0b6e38e0d184ea8a0e7b2
51ca8342067865cc97381afe220c976a0b7908ff
Add imara-diff v0.2 with slider heuristics support
Adds imara-diff v0.2 alongside existing v0.1 to provide Git's slider heuristics for more intuitive diff placement. ## Changes - **Dependency**: Added `imara-diff-v0_2` (v0.2.0) alongside existing v0.1.8 - **API**: Exposed v0.2 types via `blob::v0_2` module (`Diff`, `UnifiedDiffPrinter`, `IndentHeuristic`, etc.) - **C...
diff --git a/Cargo.lock b/Cargo.lock index 00b2e56836e..324c1919ee3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1612,7 +1612,8 @@ dependencies = [ "gix-trace", "gix-traverse", "gix-worktree", - "imara-diff", + "imara-diff 0.1.8", + "imara-diff 0.2.0", "serde", "thiserror 2.0.17", ] @@ -1904,7 +1905,7 @@ dep...
1
1
0
[{"id": "G0", "claim": "The doc example for diff_with_slider_heuristics should showcase slider heuristics by asserting on diff positions/hunk content rather than only counting removals and additions, since slider movement does not affect those counts.", "category": "documentation", "verdict": "supported", "priority": "...
null
GitoxideLabs__gitoxide__2287
GitoxideLabs/gitoxide
2,287
defect
111b625494f5d7e4f66df216866308205a883c56
fcbdd65c8e2ac9de24560f185d88f0c3fc4c9e42
Update `gix-blame` to `imara-diff` 0.2
This is a quick conversion of `gix-blame` to use `imara-diff` 0.2 through `gix-diff`’s new `blob-experimental` feature. I haven’t run any benchmarks yet, just wanted to open the PR, so you can have a look yourself! The update made one test that previously was marked `should_panic` pass, so that’s already promising. :-)...
diff --git a/gix-blame/Cargo.toml b/gix-blame/Cargo.toml index 4417277cfe6..51bc903424c 100644 --- a/gix-blame/Cargo.toml +++ b/gix-blame/Cargo.toml @@ -10,6 +10,11 @@ authors = ["Christoph Rüßler <christoph.ruessler@mailbox.org>", "Sebastian Thi edition = "2021" rust-version = "1.82" +[features] +## An experimenta...
2
2
1
[{"id": "G0", "claim": "The justfile is probably missing a line to run the gix-blame tests with the blob-experimental feature: cargo nextest run -p gix-blame --features blob-experimental --no-fail-fast.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The...
null
GitoxideLabs__gitoxide__2294
GitoxideLabs/gitoxide
2,294
defect
7e5c05f99ad6b11c75a514e821808cab367f3442
c01545f7f2e2e49f71665fa760b1cb76bbc76aae
Replace zip crate with rawzip in gix-archive
Migrates `gix-archive` from the `zip` crate to `rawzip` for ZIP archive creation. ## Changes - **Dependencies**: Replaced `zip = "6.0.0"` with `rawzip = "0.4.2"` and added `flate2` to zip feature (required for deflate compression) - **Archive writing** (`write.rs`): - Use `rawzip::ZipArchiveWriter` with explicit `...
diff --git a/Cargo.lock b/Cargo.lock index 324c1919ee3..e5a888901aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -103,15 +103,6 @@ version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" -[[package]] -name = "a...
3
3
0
[{"id": "G0", "claim": "The `use bstr::ByteSlice;` import statement is repeated in all three match arms of append_zip_entry; for maintainability it should be moved to the top of the function so it is available to all arms without repetition.", "category": "maintainability", "verdict": "supported", "priority": "P2", "sc...
null
GitoxideLabs__gitoxide__2297
GitoxideLabs/gitoxide
2,297
defect
691a2057966621a27062f05934dfe4b0dee11791
1dc41431eb13d19eec3d0eb61642ff160d928302
feat: add `Prefix::from_hex_nonempty()` to allow creating short prefixes.
This can be useful in certain situations where the set of candidate object ids is very small.
diff --git a/Cargo.lock b/Cargo.lock index 324c1919ee3..cba42ea32ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -420,9 +420,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.48" +version = "1.2.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c481bdbf0ed3b892f6f806287d7...
5
5
1
[{"id": "G0", "claim": "The new tests use `Prefix::try_from()` for inputs of 4 or more characters and directly exercise `from_hex_nonempty()` only for short inputs, so tests that explicitly call `from_hex_nonempty()` with various input lengths should be added to cover the new public API.", "category": "testing", "verdi...
null
GitoxideLabs__gitoxide__2306
GitoxideLabs/gitoxide
2,306
defect
a000a7337d7e481ed2e576f66316cbcf0b01e19d
f59a6cf78c576dc804b1a90b603df221d81de095
fix: validate UTF-8 in TimeBuf::write() to prevent UB in as_str()
`TimeBuf` exposed a public `Write` implementation that allowed arbitrary bytes, while `as_str()` used `unsafe` UTF-8 conversion. This enabled creating invalid strings: ```rust let mut buf = TimeBuf::default(); buf.write(&[0xff]).unwrap(); // non-UTF8 byte println!("{}", buf.as_str()); // undefined behavior ``` ## C...
diff --git a/gix-date/src/parse/mod.rs b/gix-date/src/parse/mod.rs index 943c82887f9..3347cb47d95 100644 --- a/gix-date/src/parse/mod.rs +++ b/gix-date/src/parse/mod.rs @@ -43,22 +43,14 @@ impl TimeBuf { } } -impl std::io::Write for TimeBuf { - fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> { - ...
3
1
0
[{"id": "G0", "claim": "The PR description promises UTF-8 validation in Write::write() and a regression test, but the implementation removes the Write trait entirely and adds no test, so the description should be updated to match the implementation or the promised test added.", "category": "documentation", "verdict": "...
null
GitoxideLabs__gitoxide__2314
GitoxideLabs/gitoxide
2,314
defect
d602d7e836071f1e9e3af44c33f01522dde5c417
1ba18ac834f2db412e29dfd5702a36d669f31286
Fix shallow clone to use remote HEAD instead of local init.defaultBranch
Shallow clones were falling back to the local `init.defaultBranch` configuration when determining which branch to fetch, causing platform-specific test failures where Windows defaulted to `master` while other platforms used `main`. ## Changes - **Use refmap for HEAD detection**: Changed from checking only the handsha...
diff --git a/gix/src/clone/fetch/mod.rs b/gix/src/clone/fetch/mod.rs index 22e95bd4039..bf12bbffcde 100644 --- a/gix/src/clone/fetch/mod.rs +++ b/gix/src/clone/fetch/mod.rs @@ -118,38 +118,27 @@ impl PrepareFetch { if let Some(ref_name) = &self.ref_name { Some(Category::LocalBranch.to_full...
1
1
1
[{"id": "G0", "claim": "The HEAD lookup in shallow clone only matches Ref::Symbolic and should also handle the Ref::Unborn variant, extracting its target instead of falling back to the hardcoded default.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
GitoxideLabs__gitoxide__2358
GitoxideLabs/gitoxide
2,358
defect
9081b8f79ca977c653cf7e92162be5d079aece6e
0098a3306f5bdacf31707e4c2b9c282529c06df5
Implement percent-decoding in simple_url for all URL components
Percent-encoded usernames, passwords, and paths were being decoded outside the `simple_url` module in `parse.rs`, creating duplicated logic and making the parser incomplete. ## Changes - **Modified `ParsedUrl` structure**: Changed `username`, `password`, and `path` fields from `&str` to `String` to store decoded valu...
diff --git a/gix-url/src/parse.rs b/gix-url/src/parse.rs index 9f49bc084b4..55cdb29518f 100644 --- a/gix-url/src/parse.rs +++ b/gix-url/src/parse.rs @@ -1,7 +1,6 @@ use std::convert::Infallible; use bstr::{BStr, BString, ByteSlice}; -use percent_encoding::percent_decode_str; use crate::Scheme; @@ -135,11 +134,...
2
2
1
[{"id": "G0", "claim": "The `path` should also be percent-decoded, like username and password.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The extra whitespace validation on username/password is unnecessary because the percent decoding takes care...
null
GitoxideLabs__gitoxide__2376
GitoxideLabs/gitoxide
2,376
defect
7be8f9068ab875ca4123300ba08df9d32fd63941
5eb6ce0d21b2a53cb1ab807130e2100eb8f71fb9
bugfix: gix-worktree-state: Reduced-size files on checkout should be truncated to correct length
gix-worktree-state: Upon checkout of a file, truncate it to the length indicated by the blob Hi @Byron! This is a second PR for a different bugfix we have in our copy of `gitoxide`. Originally authored here at Roku by @cesfahani . I don't have tests for this one, its just a bugfix we have internally that you should ...
diff --git a/gix-worktree-state/src/checkout/chunk.rs b/gix-worktree-state/src/checkout/chunk.rs index 92663ae48d6..8098d5fdd9a 100644 --- a/gix-worktree-state/src/checkout/chunk.rs +++ b/gix-worktree-state/src/checkout/chunk.rs @@ -224,9 +224,11 @@ where inner: std::io::BufWriter::with_capacity(51...
2
2
2
[{"id": "G0", "claim": "The truncation fix lacks test coverage; add a test that creates a larger existing file, checks out a smaller blob over it, and verifies the resulting file is exactly the expected size and contains only the new content.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "...
null
GitoxideLabs__gitoxide__2384
GitoxideLabs/gitoxide
2,384
defect
6cff65786b5213194fffd2c77b7c2dc44dcb4b52
2d5ae3b2ec1b9f03ae90f5fb4a63bba30e46b48f
refactor!: catch up Exn designs with the upstream
This follows https://github.com/GitoxideLabs/gitoxide/pull/2352#discussion_r2702101315. I push several changes in separate commits. If you'd like to handle them in multiple PRs, please let me know.
diff --git a/gix-error/src/exn/ext.rs b/gix-error/src/exn/ext.rs index 5ac31a80372..c24e2c048dd 100644 --- a/gix-error/src/exn/ext.rs +++ b/gix-error/src/exn/ext.rs @@ -44,7 +44,7 @@ pub trait ErrorExt: std::error::Error + Send + Sync + 'static { I: IntoIterator, I::Item: Into<Exn<T>>, { - ...
3
3
0
[{"id": "G0", "claim": "The doc comment of `Exn::chain` reads ungrammatically ('Use the current exception the head of a chain, adding `err` as its children') and should be reworded to 'Use the current exception as the head of a chain, adding `err` to its children'.", "category": "documentation", "verdict": "supported",...
null
GitoxideLabs__gitoxide__2400
GitoxideLabs/gitoxide
2,400
defect
f4f9e02ceb289d86c341e9d18d3545c410051803
c7f84c26a420af3107d28f647f4ef8c5a64d44ed
More of `gix-error`
It's a bit strange that each time I seem to be picking cases with delegates and generics, so it's not super trivial. ### Tasks * [x] `gix-worktree-stream` * [x] `gix-archive` * [x] thorough review
diff --git a/Cargo.lock b/Cargo.lock index cc23c878760..e17bb71ffb4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1461,6 +1461,7 @@ dependencies = [ "flate2", "gix-attributes", "gix-date", + "gix-error", "gix-filter", "gix-hash", "gix-object", @@ -1471,7 +1472,6 @@ dependencies = [ "gix-worktree-stream", ...
5
5
1
[{"id": "G0", "claim": "The `err.raise().erased().raise(...)` sequence in `next_entry()` adds an extra allocation by double-boxing and discards the original error type without obvious need, so the `erased()` step should be dropped to keep the typed frame, improve diagnostics and reduce overhead.", "category": "performa...
null
GitoxideLabs__gitoxide__2412
GitoxideLabs/gitoxide
2,412
defect
7fd48c003f73e799a430d3744b9268006b5301a5
fff844bb4d3dfcd20f9c033815e9de7e35a8270a
feat: add Rust closure fixtures to gix-testtools
Adds ability to create fixtures using Rust closures instead of shell scripts, with manual version numbers for cache invalidation. ### New API - `rust_fixture_read_only(name, version, closure)` - cached read-only fixture - `rust_fixture_writable(name, version, mode, closure)` - writable temp directory copy - `*_standa...
diff --git a/tests/tools/.gitignore b/tests/tools/.gitignore new file mode 100644 index 00000000000..67fc140b98f --- /dev/null +++ b/tests/tools/.gitignore @@ -0,0 +1 @@ +fixtures/ diff --git a/tests/tools/src/lib.rs b/tests/tools/src/lib.rs index 19e88aab815..1f08d15adfa 100644 --- a/tests/tools/src/lib.rs +++ b/tests...
5
1
0
[{"id": "G0", "claim": "The `name` argument is interpolated directly into `archive_name` and used to build filesystem paths and lock resource names, so names containing path separators or `..` could escape the intended fixture directories; consider validating/sanitizing it and returning an error.", "category": "securit...
null
GitoxideLabs__gitoxide__2413
GitoxideLabs/gitoxide
2,413
defect
8c88c59fe99e23645df9e85d0f4bc5d58c2f1b9c
e30c7d7f4e2fc51fe4c81ce9fb7ab927152aa085
Various improvements to gix-testtools
This should make Rust closures usable finally. ## Tasks * [x] sort out API * [x] thorough review
diff --git a/tests/tools/Cargo.toml b/tests/tools/Cargo.toml index 0c423fd8878..d65e8d92030 100644 --- a/tests/tools/Cargo.toml +++ b/tests/tools/Cargo.toml @@ -15,7 +15,7 @@ name = "jtt" path = "src/main.rs" [lib] -doctest = false +doctest = true [features] default = [] diff --git a/tests/tools/src/lib.rs b/te...
11
8
3
[{"id": "G0", "claim": "The doc comments say \"FixtureState state\", repeating the type name where \"fixture state\" is meant, and should be reworded.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The doc sentence \"with the `fixture_state` It ca...
null
GitoxideLabs__gitoxide__2420
GitoxideLabs/gitoxide
2,420
defect
5eff1cff5c27a45e556d349f9145c8373b6ebd91
0392a6d94d811ae7a85b34e7b91cfd0209229a6f
Switch to `imara-diff` 0.2 in `gix-blame`
This PR changes `gix-blame` to always use `imara-diff` 0.2 through `gix-diff/blame-experimental`. It removes the `blob-experimental` feature flag in `gix-blame` as well as the `blame-experimental` feature flag in `gix`. This PR does not yet change `gix-diff` itself yet. I’m in the process of preparing a separate PR fo...
diff --git a/Cargo.toml b/Cargo.toml index 95048e5db8e..217d18f1e40 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -155,11 +155,6 @@ http-client-reqwest = ["gix/blocking-http-transport-reqwest-rust-tls"] ## Use async client networking. gitoxide-core-async-client = ["gitoxide-core/async-client", "futures-lite"] -#! ###...
5
1
0
[{"id": "G0", "claim": "The test function `diff_disparity_imara_diff_v2`, which now runs unconditionally and iterates both Myers and Histogram algorithms, has a misleading name (and accompanying comment mentioning v0.2/v1) and should be renamed to reflect that it verifies algorithm parity.", "category": "maintainabilit...
null
GitoxideLabs__gitoxide__2426
GitoxideLabs/gitoxide
2,426
defect
e4f016bd386deae6466bf703ba0b7959e6460ac8
fca0fc51fc42cd878b301915e1fec67e1a38a772
Remove unsafe UTF-8 conversions and add named relative date parsing
- Replace unsafe `from_utf8_unchecked` with safe `from_utf8().expect()` in TimeBuf::as_str() and Time::fmt() , i was not sure from comment if its intended to remain unsafe, or why, but I did not encounter failing tests with making it safe or perf issues. - Add support for parsing "now", "today", and "yesterday" as rel...
diff --git a/gix-date/src/parse/mod.rs b/gix-date/src/parse/mod.rs index cf8df177734..942880bf20f 100644 --- a/gix-date/src/parse/mod.rs +++ b/gix-date/src/parse/mod.rs @@ -14,13 +14,9 @@ impl TimeBuf { /// Represent this instance as standard string, serialized in a format compatible with /// signature fields...
6
5
1
[{"id": "G0", "claim": "The previous unsafe-free-from-the-start design skipped UTF-8 checks on a known-ASCII buffer, and Byron suggests keeping that fix while calling the old unsafe version a premature optimisation given the ~30% speed-up it might have offered.", "category": "design", "verdict": "uncertain", "priority"...
null
GitoxideLabs__gitoxide__2431
GitoxideLabs/gitoxide
2,431
defect
9327b73785227f1322a327cb48fbb0800e1286ae
d6ca7e2e4991a1b0436f53528e4195e955d14cab
Restore lossless HTTP(S) URL serialization for percent-encoded paths
HTTP/HTTPS URLs started storing paths in decoded form, but canonical serialization wrote the decoded bytes back verbatim. This broke lossless round-tripping for reserved/path-encoded characters (e.g., `%20`, `%25`) in `Url::to_bstring()`. - **Canonical serialization behavior** - Updated `Url::write_canonical_form_to...
diff --git a/gix-url/src/lib.rs b/gix-url/src/lib.rs index 0706d5c5424..47bc1ddaa5d 100644 --- a/gix-url/src/lib.rs +++ b/gix-url/src/lib.rs @@ -445,7 +445,26 @@ impl Url { if matches!(self.scheme, Scheme::Ssh | Scheme::Git) && !self.path.starts_with(b"/") { out.write_all(b"/")?; } - ...
1
1
1
[{"id": "G0", "claim": "Encoding '?' and '#' in PATH_ENCODE_SET is a behavioral regression that rewrites URLs whose parsed path relies on query/fragment delimiters into different request paths (for example, https://host/repo.git?token=abc serializes as /repo.git%3Ftoken=abc); fix it and add a regression test.", "catego...
null
GitoxideLabs__gitoxide__2436
GitoxideLabs/gitoxide
2,436
defect
228caf7191eed5fd9e2095cc5a60179b374156b5
84d2daec191890701759ea961ed6b547e777cc2b
Fix ls-refs ref-prefix'ing
See discussion at https://github.com/GitoxideLabs/gitoxide/issues/2429 I didn't quite have the correct environment set up, so I'm not sure if all the tests are passing, but let's see if CI catches anything I messed up :)
diff --git a/gix-protocol/src/handshake/mod.rs b/gix-protocol/src/handshake/mod.rs index dc00f5726b3..d179e75c434 100644 --- a/gix-protocol/src/handshake/mod.rs +++ b/gix-protocol/src/handshake/mod.rs @@ -71,6 +71,7 @@ pub(crate) mod hero { #[cfg(feature = "fetch")] mod fetch { + use crate::ls_refs::...
4
4
2
[{"id": "G0", "claim": "RefPrefixes lives in the pub(crate) ls_refs::function module and is not re-exported, so downstream callers of LsRefsCommand::new's new signature can only pass None, silently removing the public ability to configure ref-prefix filtering as a source-breaking regression.", "category": "design", "ve...
null
GitoxideLabs__gitoxide__2489
GitoxideLabs/gitoxide
2,489
defect
96d86cb8fa4754a7c3a1631847e0db7feba4ba21
99662d096b2b2ee7d55d12e36a793ec035ce89b5
fix(tree): peel to the final tree entry
## Summary - update `Tree::peel_to_entry{_by_path}` to move `self` to the final tree entry when the leaf entry is a tree - clarify the behavior in the API docs - add a regression test for peeling to a tree leaf ## Testing - `cargo test -p gix --test gix object::tree::` Refs #2456 Context: https://github.com/GitoxideL...
diff --git a/gix/src/object/tree/mod.rs b/gix/src/object/tree/mod.rs index 731f2bd24cf..09530831676 100644 --- a/gix/src/object/tree/mod.rs +++ b/gix/src/object/tree/mod.rs @@ -88,6 +88,7 @@ impl<'repo> Tree<'repo> { /// Follow a sequence of `path` components starting from this instance, and look them up one by ...
3
2
2
[{"id": "G0", "claim": "Avoid the (effective) double `if let Some(_)` in the `ControlFlow::Break` arm by destructuring the entry once and restructuring the arm accordingly (suggestion block).", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "When pee...
null
GitoxideLabs__gitoxide__2505
GitoxideLabs/gitoxide
2,505
defect
ed1e75b6f9d6e175410569b00604d047074aff4e
d558c3cdd2f59732922e02cbdab7bd13e31ef7c8
fix: reject the creation of `refs/heads/HEAD` just like Git
See https://github.com/git/git/blob/cf2139f8e1680b076e115bc0b349e369b4b0ecc4/refs.c#L776-L778 for the source of this rule. Brought to light by https://github.com/gitbutlerapp/gitbutler/pull/13156 ### Tasks * [x] refackiew
diff --git a/gix-ref/src/fullname.rs b/gix-ref/src/fullname.rs index 40cf7bc8661..f5bd87087b1 100644 --- a/gix-ref/src/fullname.rs +++ b/gix-ref/src/fullname.rs @@ -166,6 +166,9 @@ impl Category<'_> { /// the `short_name` to create a valid fully qualified [reference name](FullName). /// /// If `short_nam...
4
3
1
[{"id": "G0", "claim": "Routing `init.defaultBranch` through `Category::LocalBranch::to_full_name()` de-duplicates config values that already start with `refs/heads/` instead of Git's unconditional prefixing, so `init_opts()` can write a different `HEAD` target than Git for the same config and `is_pristine()` can wrong...
null
GitoxideLabs__gitoxide__2508
GitoxideLabs/gitoxide
2,508
defect
e51c40bd5c206305197bd635014f51930b5d8fc2
dfadc8b306bb5a265696ca52954e829e79eb4ab6
Allow checkouts of repositories into non-empty directories
Allow `gix::clone::PrepareFetch` callers to clone and check out into a destination directory that is not empty. Before this change, `PrepareFetch::new()` unconditionally overrode `create::Options::destination_must_be_empty` to `true` regardless of what the caller passed, so the flag was effectively non-functional and ...
diff --git a/gix/src/clone/mod.rs b/gix/src/clone/mod.rs index c3d50ad3d9b..4ad1f49c68b 100644 --- a/gix/src/clone/mod.rs +++ b/gix/src/clone/mod.rs @@ -99,10 +99,9 @@ impl PrepareFetch { mut url: gix_url::Url, path: &std::path::Path, kind: crate::create::Kind, - mut create_opts: crate...
4
4
3
[{"id": "G0", "claim": "The pull request needs test coverage — specifically a test that fails if the change of this PR isn't present, showing the checkout behaviour the PR enables.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Byron feared the change n...
null
GitoxideLabs__gitoxide__2593
GitoxideLabs/gitoxide
2,593
defect
575113dfb10b3ba12eb57f57a81b241e773968bd
0a387801eabbb2bdcd491f17fa0051f4ce64bf1e
refactor: reduce smallvec dep from git-date
Resolve TODO when encountering it. Comments inline. cc @Byron
diff --git a/Cargo.lock b/Cargo.lock index 2efd9a7cbda..9ad990cab71 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1715,7 +1715,6 @@ dependencies = [ "jiff", "pretty_assertions", "serde", - "smallvec", ] [[package]] diff --git a/gix-date/Cargo.toml b/gix-date/Cargo.toml index 38e67da9e4d..3bda1742649 100644 ---...
6
5
4
[{"id": "G0", "claim": "The doc comments above TimeBuf were already truncated before the refactor (a dangling \"It's used in conjunction with\" fragment), and no reasonable fix-up was found for them.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim":...
null
GitoxideLabs__gitoxide__2595
GitoxideLabs/gitoxide
2,595
defect
85c608725f11c47d5236b1d825e31c9b575493e5
d80c534f85d7bb41b2b04a482e25c50c8f83d019
Add hex_to_id_sha1_only, use in SHA-1 only tests
This is a follow-up to #2578. There’s some tests in `gix/tests` that are SHA-1 only in that they contain hard-coded SHA-1 hashes and don’t have a corresponding version for SHA-256 hashes. They still share the same `hex_to_id` function that returns a SHA-1 or SHA-256 hash, based on `gix_testtools::object_hash`. The beha...
diff --git a/gix/tests/gix/repository/mod.rs b/gix/tests/gix/repository/mod.rs index 72e7a131218..f60ad9e4192 100644 --- a/gix/tests/gix/repository/mod.rs +++ b/gix/tests/gix/repository/mod.rs @@ -27,7 +27,7 @@ mod worktree; #[cfg(feature = "revision")] mod revision { - use crate::util::hex_to_id; + use crate...
6
2
1
[{"id": "G0", "claim": "The new doc comments on hex_to_id/hex_to_id_sha1_only mention `GIX_TEST_FEATURE_HASH`, but the env var actually read is `GIX_TEST_FIXTURE_HASH`, which misleads anyone trying to run the tests with SHA-256 fixtures; please fix the env var name in the comments.", "category": "documentation", "verdi...
null
GitoxideLabs__gitoxide__271
GitoxideLabs/gitoxide
271
defect
cf1b1e6d82f691ab17975e4f1479d93720368803
b8e961812548a28f11277810352a46b6788855ab
Test/git traverse
- Ensure a merge commit is created in the git-traverse test fixture by adding `git config merge.ff false` in the fixture script. - ~~Ensure the test fixture is re-created on each test run~~ - Rename fixture directory to `generated-do-not-edit` closes #268
diff --git a/.gitignore b/.gitignore index 5237667d4f6..22079a9c0c8 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ target/ /tests/fixtures/repos **/generated/ +.idea diff --git a/git-traverse/tests/fixtures/make_traversal_repo_for_commits.sh b/git-traverse/tests/fixtures/make_traversal_repo_for_commits.sh...
2
2
0
[{"id": "G0", "claim": "The `.idea` entry this pull request adds to the repository's .gitignore belongs in the user's `~/.gitignore` instead.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The script-result fixture directory named `generated` sh...
null
GladysAssistant__Gladys__1022
GladysAssistant/Gladys
1,022
defect
92f42560dd96126079b82e625b8c5cb60226eee1
9a11b36f03d58141dd8cd2f603391d01c7f9c460
Fix #1021 service status
Fixes #1021 ### Pull Request check-list To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items: - [x] If your changes affects code, did your write the tests? - [x] Are tests passing? (`npm test` on both front/server) - [x] Is the linter passing? (`n...
diff --git a/front/src/config/demo.json b/front/src/config/demo.json index dfef8ae0ca..f6732815e3 100644 --- a/front/src/config/demo.json +++ b/front/src/config/demo.json @@ -1124,7 +1124,7 @@ "selector": "telegram", "version": "0.1.0", "has_message_feature": true, - "status": "NOT_CONFIGURED"...
1
1
0
[{"id": "G0", "claim": "The new migration should be written with Sequelize instead of a raw SQL query, to avoid raw SQL that may work in one database system but not another if other DB types are supported in the future.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
GladysAssistant__Gladys__1047
GladysAssistant/Gladys
1,047
defect
d6f521ae4786892d164d284582546435ce6f9e44
d40a935bf62946c1c0c5aa74ff7ff51feebe7668
Inject scene variables in other boxes
### Pull Request check-list To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items: - [x] If your changes affects code, did your write the tests? - [x] Are tests passing? (`npm test` on both front/server) - [x] Is the linter passing? (`npm run eslint` o...
diff --git a/front/package-lock.json b/front/package-lock.json index efa869f289..87dc40ab4a 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -346,6 +346,11 @@ "integrity": "sha1-DTyzECL4Qn6ljACK8yuA2hJspOM=", "dev": true }, + "@yaireo/tagify": { + "version": "3.21.5", + ...
5
4
1
[{"id": "G0", "claim": "It is questionable whether the '{{' typing trigger for opening the variable list is straightforward; the author asks whether another trigger such as '#' should be used instead.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The valu...
null
GladysAssistant__Gladys__1051
GladysAssistant/Gladys
1,051
defect
9ec3f15e49979d4d7e06934344b2eda370560d02
ef9712ef4e68271845cfc4872dc48374f749c996
fix(conversation): Spread chat messages to same user open tabs
Fix #553 ### Pull Request check-list To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items: - [x] If your changes affects code, did your write the tests? - [X] Are tests passing? (`npm test` on both front/server) - [X] Is the linter passing? (`npm r...
diff --git a/front/src/actions/message.js b/front/src/actions/message.js index bb56e4feaaa..f8d6dd485d2 100644 --- a/front/src/actions/message.js +++ b/front/src/actions/message.js @@ -43,13 +43,17 @@ function createActions(store) { }); }, pushMessage(state, message) { + let newMessages = store.ge...
5
5
2
[{"id": "G0", "claim": "The new frontend message attribute is named `uuid` instead of `id` as used in most other places.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The controller forwards a `uuid` attribute into `message.create`, which isn't...
null
GladysAssistant__Gladys__1151
GladysAssistant/Gladys
1,151
defect
a483b2c9d8edaa3a3ca46676e199d8ca83ea7169
b41784cc9ddeff7d2efdbd59ae2793171e61c0a8
Add time condition in scenes
### Pull Request check-list To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items: - [x] If your changes affects code, did your write the tests? - [x] Are tests passing? (`npm test` on both front/server) - [x] Is the linter passing? (`npm run eslint` o...
diff --git a/front/src/config/i18n/en.json b/front/src/config/i18n/en.json index d05a571da7..e137b17569 100644 --- a/front/src/config/i18n/en.json +++ b/front/src/config/i18n/en.json @@ -903,6 +903,12 @@ "orText": "OR", "orButton": "+ OR" }, + "checkTime": { + "description": "The sc...
4
4
1
[{"id": "G0", "claim": "CheckTime.jsx lists the seven days of the week explicitly instead of building the options from a small array with .map, as done in ScheduledTrigger.jsx.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The date/time picker ...
null
GladysAssistant__Gladys__1297
GladysAssistant/Gladys
1,297
defect
cccc3f4a2044af8d5e96d9336a7e812908602b54
658100045387d01c580c7eb906e50225d85eecd2
Add feature request about camera image rotation 180°
Add feature request about camera image rotation 180° https://community.gladysassistant.com/t/pouvoir-tourner-une-image-de-camera-a-180/6508?u=vonox Preview ![image](https://user-images.githubusercontent.com/1528694/137439756-83fc1958-8f03-411c-bd94-0403baac4a94.png)
diff --git a/front/src/config/demo.json b/front/src/config/demo.json index b1aebc0dfd..7c39d43c1f 100644 --- a/front/src/config/demo.json +++ b/front/src/config/demo.json @@ -1080,6 +1080,10 @@ { "name": "CAMERA_URL", "value": "http://camera-url" + }, + { + "name": ...
6
5
4
[{"id": "G0", "claim": "createOrUpdateCamera and saveCamera do not map the device params (CAMERA_URL and CAMERA_ROTATION) onto the camera object after the save WS call, so the camera put in state has no cameraRotation and the UI breaks with an error/infinite loading after every save; it should be fixed by reusing a map...
null
GladysAssistant__Gladys__1343
GladysAssistant/Gladys
1,343
defect
ce2142054d10b0006128242a4e0c84297dfafd8c
c67647e06beeb93fa005bd9c9f66e043ef9be398
Zigbee2mqtt lqi
### Pull Request check-list To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items: - [ ] If your changes affects code, did your write the tests? - [ ] Are tests passing? (`npm test` on both front/server) - [ ] Is the linter passing? (`npm run eslint` o...
diff --git a/server/services/zigbee2mqtt/exposes/numericType.js b/server/services/zigbee2mqtt/exposes/numericType.js index 1830087b967..d115ae917f9 100644 --- a/server/services/zigbee2mqtt/exposes/numericType.js +++ b/server/services/zigbee2mqtt/exposes/numericType.js @@ -6,6 +6,10 @@ module.exports = { return val...
4
3
3
[{"id": "G0", "claim": "In server/services/zigbee2mqtt/exposes/numericType.js the new expose name must be `linkquality`, not `lqi`, both in the readValue condition (line 9) and in the feature mapping key (line 146).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G...
null
GladysAssistant__Gladys__138
GladysAssistant/Gladys
138
defect
6e6a64ef77e486cd34331f313afe81688e6e287c
83159a871a131b5fd803af50edf88c764f0c17e6
add purge function on devicestate
I propose to add a "purge" on devicestate using the delete from mysql statement, based on devicetype id and number of days from now you want to keep. I've added test also, you can check the test and tell me if it is enough. (Maybe we could think about historize data in a histo table .. ?)
diff --git a/api/core/devicestate/deviceState.purge.js b/api/core/devicestate/deviceState.purge.js new file mode 100644 index 0000000000..6ccf316900 --- /dev/null +++ b/api/core/devicestate/deviceState.purge.js @@ -0,0 +1,7 @@ +var queries = require('./deviceState.queries.js'); + +module.exports = function purge(option...
3
3
0
[{"id": "G0", "claim": "The test should declare `options` (and `states`) with `var` instead of creating implicit globals.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The test could replace the intermediate `states` variable with a direct `gla...
null
GladysAssistant__Gladys__1465
GladysAssistant/Gladys
1,465
defect
aa625ebebe412f9928e978c85253c925ab7b3701
7a051dd6839374fa5045cbaeb3b88d533aa4114d
Update temp/humidity in room #1316
### Pull Request check-list To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items: - [x] If your changes affects code, did your write the tests? - [x] Are tests passing? (`npm test` on both front/server) - [x] Is the linter passing? (`npm run eslint` o...
diff --git a/front/src/actions/dashboard/boxes/humidityInRoom.js b/front/src/actions/dashboard/boxes/humidityInRoom.js index 4ec78953d86..b94a03a7474 100644 --- a/front/src/actions/dashboard/boxes/humidityInRoom.js +++ b/front/src/actions/dashboard/boxes/humidityInRoom.js @@ -1,3 +1,5 @@ +import get from 'get-value'; +...
2
2
2
[{"id": "G0", "claim": "session is not defined in the RoomHumidity component (this.props.session is never connected), which the reviewer reports caused a crash on the component.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "Sending a device state e...
null
GladysAssistant__Gladys__1668
GladysAssistant/Gladys
1,668
defect
900b125af61f4d49278fdcf208e0c308ba191437
5f97b7ac8774b025d1da3a7c8b4f6f01d4088a20
MQTT - Replace shell script by javascript functions
### Pull Request check-list To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items: - [ ] If your changes affects code, did your write the tests? - [ ] Are tests passing? (`npm test` on both front/server) - [ ] Is the linter passing? (`npm run eslint` o...
diff --git a/server/services/mqtt/docker/eclipse-mosquitto-env.sh b/server/services/mqtt/docker/eclipse-mosquitto-env.sh deleted file mode 100755 index 04c85395be5..00000000000 --- a/server/services/mqtt/docker/eclipse-mosquitto-env.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -# Configuration path -mosquitto_dir=/va...
1
1
1
[{"id": "G0", "claim": "The MQTT broker container fails to start when run for real because the new JavaScript setup never creates the mosquitto password file (mosquitto logs 'Error: Unable to open pwfile \"/mosquitto/config/mosquitto.passwd\"').", "category": "correctness", "verdict": "supported", "priority": "P0", "sc...
null
GladysAssistant__Gladys__1670
GladysAssistant/Gladys
1,670
defect
fefb9cf21f78b32c6e576ceb4aa2d1b5338ec3f3
30b55988ff5be8d75449057ed0018a236af298cf
Duplicate scene
### Pull Request check-list To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items: - [x] If your changes affects code, did your write the tests? - [x] Are tests passing? (`npm test` on both front/server) - [x] Is the linter passing? (`npm run eslint` o...
diff --git a/.gitignore b/.gitignore index 0b48f74a9e8..9e6f1f7f69f 100644 --- a/.gitignore +++ b/.gitignore @@ -17,5 +17,7 @@ stats.json size-plugin.json # VSCode .vscode +#Webstorm +.idea/ .tmp -.DS_Store \ No newline at end of file +.DS_Store diff --git a/front/cypress/e2e/routes/scene/Scene.cy.js b/front/cypres...
5
5
1
[{"id": "G0", "claim": "The duplicate-scene namePlaceholder strings in en.json and fr.json are far too long to read in a placeholder (and en says \"duplicate\" where \"duplicated\" is meant), so they should be shortened to something like \"Enter a new name\" / \"Entrez un nouveau nom\".", "category": "documentation", "...
null
GladysAssistant__Gladys__1803
GladysAssistant/Gladys
1,803
defect
922747ec7905e6caf7d6dc33ef964ab2f2991697
fe0ab6eac3fd5558c82a256d1e15a5d304542f0b
Add Devices box
### Pull Request check-list To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items: - [x] If your changes affects code, did your write the tests? - [x] Are tests passing? (`npm test` on both front/server) - [x] Is the linter passing? (`npm run eslint` o...
diff --git a/front/src/actions/dashboard/boxes/devices.js b/front/src/actions/dashboard/boxes/devices.js new file mode 100644 index 0000000000..2b4ee8f928 --- /dev/null +++ b/front/src/actions/dashboard/boxes/devices.js @@ -0,0 +1,164 @@ +import { RequestStatus } from '../../../utils/consts'; +import createBoxActions f...
6
6
2
[{"id": "G0", "claim": "Loading all devices of the Gladys instance to populate the box is not wise because the request will be gigantic; the reviewer asks to filter the request to only the devices selected in the box.", "category": "performance", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": ...
null
GladysAssistant__Gladys__1804
GladysAssistant/Gladys
1,804
defect
922747ec7905e6caf7d6dc33ef964ab2f2991697
febdea30b4822012d455a3cc2a18fd4a83e9bd59
Add send camera image action
### Pull Request check-list To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items: - [x] If your changes affects code, did your write the tests? - [x] Are tests passing? (`npm test` on both front/server) - [x] Is the linter passing? (`npm run eslint` o...
diff --git a/front/src/config/i18n/en.json b/front/src/config/i18n/en.json index 27256346fa..862568e7e6 100644 --- a/front/src/config/i18n/en.json +++ b/front/src/config/i18n/en.json @@ -1218,6 +1218,13 @@ "textPlaceholder": "Message text", "explanationText": "To inject a variable in the text, press '...
5
5
2
[{"id": "G0", "claim": "Remove the leftover console.log(cameras) debug statement from the camera-loading code.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Avoid inline helpTextStyle styles in favor of bootstrap native styles or style.css file...
null