{{ message }}
Repository navigation
A GitHub repository source skips empty files, and its repository, token and globs can be changed after it is created - #1326
Merged
WaylandYang merged 2 commits intoOct 21, 2026
Conversation
…en and globs can be changed after it is created Signed-off-by: Quintin Botes <quintinbotes@outlook.com>
Contributor
gedaiu
added a commit
to re-cinq/utopia
that referenced
this pull request
Oct 21, 2026
Sync upstream dev into re-dev (2026-10-21): deeplethe#1349, deeplethe#1280, deeplethe#1331, deeplethe#1326, deeplethe#1328
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Follow-up to #1325, covering two of the three optional points from its review.
Why
In the #1325 review you pointed out that empty files never become documents, so they were fetched again on every sync. You also noted that a
github_reposource couldn't be changed once created: the edit dialog showed no repository, token or glob fields, and the glob fields didn't say that a value replaces the defaults.What changes
FileFilter::eligiblenow requiressize > 0.ingest_itemcreates nothing for empty bytes, so an empty file used to cost a commits request and a blob request every round. The new unit testan_empty_file_is_not_takenuses the real SHA of git's empty blob.github_repo. It shows the same repository, token, include and exclude fields as the create dialog, and changing the repository or a glob shows the existing note about what happens to the old documents.githubRepoConfigbuilds it from the stored config. Keys the form doesn't show, such asmax_file_bytes, survive an edit.keep_secretsexpects.globListmoved toweb/src/pages/githubRepoConfig.tsand is shared by both dialogs.en.tsandzh.ts.Not in this PR: your other point, storing the git SHA so the unchanged check doesn't read each file back on every sync. That one also covers files whose content another document already holds. It needs a column, so it would be a change of its own.
How it was checked
On an M1 Max (macOS), at the PR head on top of
devd62e880:cargo fmt --all --check: passes.cargo clippy --workspace --all-targets -- -D warnings: no issues.cargo test --workspace --no-fail-fastwithUTOPIA_DATABASE_URLpointing at a database created and migrated for this branch alone: 1,646 passed, 0 failed, 6 ignored.pnpm buildandpnpm testinweb/: build passes, 308 tests pass.an_empty_file_is_not_takenfails withoutsize > 0.githubRepoConfig.test.tsfails if the stored config isn't carried over, becausemax_file_bytesis lost.Before review
git commit -s)cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warningsandcargo test --workspacepassweb/:pnpm buildandpnpm testpassweb/src/i18n/en.tsandzh.ts