Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Commit 2f4c351

Browse files
committed
refactor: 跳过读取 binary 文件
1 parent 6a20f3e commit 2f4c351

40 files changed

Lines changed: 327 additions & 1267 deletions

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ Repo-Viewer-Search 是 [Repo-Viewer](https://github.com/UE-DND/Repo-Viewer) 的
55
- 索引生成:输出分片索引文件与 `manifest.json`,支持 gzip 压缩。
66
- GitHub Actions 复合 Action:一键生成并维护 `RV-Index` 分支。
77
- 质量保障:索引校验与过期索引清理工具。
8+
- 历史保留:每个分支默认最多保留 10 个索引文件。
89
- 增量复用:当索引参数一致时复用历史条目并跳过无变化分支。
910

10-
当前索引协议为 `schemaVersion: 2.0`,包含倒排索引与 `baseUrls`(详见 `docs/search-index-spec.md`)。
11+
当前索引协议为 `schemaVersion: 2.0`(manifest 为 `2.0`),索引仅包含文件路径与倒排索引(详见 `docs/search-index-spec.md`)。
1112

1213
## 环境要求
1314

@@ -84,9 +85,8 @@ jobs:
8485
| `index-branch` | 存放索引的目标分支 | `RV-Index` |
8586
| `short-sha-length` | 文件命名使用的短提交哈希长度(>=7) | `7` |
8687
| `include-globs` / `exclude-globs` | 额外包含/排除规则(picomatch) | `**` / `.git/**` |
87-
| `snippet-character-limit` / `snippet-byte-limit` | 文本片段截断上限 | `512` |
8888
| `max-files-per-index` | 单个索引文件最多条目数,`0` 表示不分片 | `4000` |
89-
| `index-compression` | 索引压缩方式(`none` / `gzip`) | `none` |
89+
| `index-compression` | 索引压缩方式(`none` / `gzip`) | `gzip` |
9090
| `commit-message` | 提交信息模板(支持 `{updates}`) | `chore(search-index): update {updates}` |
9191
| `git-user-name` / `git-user-email` | 提交用户信息 | `Repo Viewer Bot` / `[email protected]` |
9292
| `skip-empty-commit` | 无变更时是否跳过提交 | `true` |

action.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,14 @@ inputs:
4949
exclude-globs:
5050
description: '生成索引时的 exclude glob 列表'
5151
required: false
52-
snippet-character-limit:
53-
description: '文本片段截断的字符上限'
54-
required: false
55-
snippet-byte-limit:
56-
description: '文本片段截断的字节上限'
57-
required: false
5852
max-files-per-index:
5953
description: '单个索引文件最多包含的条目数,设置 0 表示不分片'
6054
required: false
6155
default: '4000'
6256
index-compression:
6357
description: '索引文件压缩方式,可选 none 或 gzip'
6458
required: false
65-
default: 'none'
59+
default: 'gzip'
6660
skip-empty-commit:
6761
description: '当无文件变化时是否跳过提交'
6862
required: false
@@ -150,8 +144,6 @@ runs:
150144
INPUT_SHORT_SHA_LENGTH: ${{ inputs.short-sha-length }}
151145
INPUT_INCLUDE_GLOBS: ${{ inputs.include-globs }}
152146
INPUT_EXCLUDE_GLOBS: ${{ inputs.exclude-globs }}
153-
INPUT_SNIPPET_CHARACTER_LIMIT: ${{ inputs.snippet-character-limit }}
154-
INPUT_SNIPPET_BYTE_LIMIT: ${{ inputs.snippet-byte-limit }}
155147
INPUT_MAX_FILES_PER_INDEX: ${{ inputs.max-files-per-index }}
156148
INPUT_INDEX_COMPRESSION: ${{ inputs.index-compression }}
157149
INPUT_SKIP_EMPTY_COMMIT: ${{ inputs.skip-empty-commit }}

dist/bin/github-action.js

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bin/github-action.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core/actions/action-runner.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)