发布日期: 2025-09-25
版本号: v1.25.0-rc0

本次更新包含多项改进:安全方面升级了公开密钥;新增了包括3D/CAD文件预览、工作流邮件通知、可配置Git远程名称、仓库内容API扩展等特性;性能上优化了文件可编辑性检测;增强了Markdown粘贴功能、NuGet API支持、通知刷新及界面交互细节;修复了状态检查、通知列表溢出、包链接设置、字体显示等多处问题;API新增了TimeEstimate字段、分支重命名支持及工作流运行相关端点;代码重构涉及编辑器、容器包、邮件模板、Git命令组织等多处优化;构建系统升级了Go至1.25.1、Node.js依赖并切换至pnpm;同时更新了文档与国际化文件。

更新内容 (中文)

  • 突破性变更
    • CreateVariable API 响应返回 201 Created 状态码 (#34517)
    • 为指标 gitea_users 添加 state 标签 (#34326)
  • 安全性
    • 升级安全公钥 (#34956)
  • 功能特性
    • 默认流式传输仓库 zip/tar.gz/bundle 归档文件 (#35487)
    • Git 命令使用可配置的远程名称 (#35172)
    • 工作流运行成功/失败时发送电子邮件 (#34982)
    • 重构 OpenIDConnect 以支持 SSH/FullName 同步 (#34978)
    • 重构仓库内容 API 并新增 “contents-ext” API (#34822)
    • 支持 3D/CAD 文件格式预览 (#34794)
    • 改进实例范围的 SSH 提交签名 (#34341)
    • 为创建分支和提议变更添加文件编辑工作流 (#34240)
    • UI 中跟随文件符号链接至目标文件 (#28835)
    • 允许在 UI 中重命名/移动二进制/LFS 文件 (#34350)
  • 性能优化
    • 提升文件可编辑性检测性能 (#34653)
  • 功能增强
    • 在文本区域编辑器中启用更多 Markdown 粘贴功能 (#35494)
    • gitea dump 不再存储仓库归档 (#35467)
    • 即使无状态信息也始终返回相关状态信息 (#35335)
    • 在性能跟踪中添加开始时间(因部分步骤可能未被记录) (#35282)
    • 移除已弃用的认证来源 (#35272)
    • 按最近截止日期排序时,无截止日期的问题应按升序排列 (#35267)
    • 禁用 CSV 查看器的字段数量验证 (#35228)
    • 仓库 REST API 新增 has_code 字段 (#35214)
    • 在合并提交视图中显示拉取请求 (#35202)
    • 支持归档下载的基本认证 (#35087)
    • 在用户和仓库管理页面为表格行添加悬停背景色 (#35072)
    • 部分刷新通知列表 (#35010)
    • 在拉取请求视图中显示"最近推送的分支"提醒 (#35001)
    • 重构时间跟踪器界面 (#34983)
    • 改进 CLI 命令 (#34973)
    • 改进项目与标签颜色选择器及图片滚动 (#34971)
    • 提升 NuGet API 兼容性 (#21291) (#34940)
    • 支持通过 contents-ext API 获取最新提交消息 (#34904)
    • 在分支提交计数处添加标题 (#34869)
    • 在 Actions 列表页添加"取消工作流运行"按钮 (#34817)
    • 改进图片懒加载 (#34804)
    • 分支仓库列表页与其他仓库页面保持一致 (#34784)
    • 为 POST /repos/{owner}/{repo}/merge-upstream 添加 ff_only 参数 (#34770)
    • 重构删除组织和重命名组织界面 (#34762)
    • 改进 nuget/rubygems 包注册中心 (#34741)
    • 添加仓库文件树项目链接行为 (#34730)
    • 添加问题删除通知器 (#34592)
    • 改进 Actions 列表 (#34530)
    • 迁移时在仓库标题添加默认选项卡 (#34503)
    • 根据管理员账户状态添加安装后重定向 (#34493)
    • 从拉取请求中删除标签时触发 ‘unlabeled’ 事件 (#34316)
    • 使用创建发布 API 时支持带注释的标签 (#31840)
    • 使用 lfs 标签替代长描述来标识 LFS 文件 (#34363)
    • 在 Actions 列表页添加"查看工作流文件" (#34538)
    • 将组织可见性变更移至危险区域 (#34814)
  • 缺陷修复
    • 修复状态检查模式匹配中双星号的不同行为 (#35474)
    • 修复通知列表溢出问题 (#35446)
    • 修复包链接设置只能列出有限仓库的问题 (#35394)
    • 扩展评论树路径长度 (#35389)
    • 修复内联代码评论预览的字体大小 (#35209)
    • 将 git config/remote 移至 gitrepo 包并通过全局锁解决更新仓库 git config 文件时的潜在冲突 (#35151)
    • 将部分列从 text 更改为 longtext 并修复 xorm 导致的列类型错误 (#35141)
    • 对 HEAD 请求重定向到 HEAD 的预签名 URL (#35088)
    • 修复 git commit 提交者解析并添加相关测试 (#35007)
    • 修复 OCI 清单解析器 (#34797)
    • 重构 FindOrgOptions 使用枚举替代布尔值,修复成员可见性 (#34629)
    • 修复可变宽度元素的通知计数定位问题 (#34597)
    • 保持 UI 与 API 的组合提交状态一致性并修复部分错误 (#34562)
    • 修复可能的 panic 问题 (#34508)
    • 修复自动聚焦行为 (#34397)
    • 修复 Actions API (#35204)
    • 修复 ListWorkflowRuns OpenAPI 响应模型 (#35026)
    • 拉取请求页面小修复 (#34612)
    • 修复 http auth 头解析 (#34936)
    • 修复模态框+表单滥用问题 (#34921)
    • 修复拉取请求切换 WIP 状态 (#34920)
    • 修复日志格式 (#34810)
    • 用显式开始/停止操作替代秒表切换按钮 (#34818)
    • 修复部分包注册中心问题 (#34759)
    • 修复 RPM 包下载路由及缺失的包版本计数 (#34909)
    • 修复仓库搜索输入框高度 (#34330)
    • 修复"仓库文件列表侧边栏无固定高度 #34298" (#34321)
    • 修复两个文件中的小拼写错误 #HSFDPMUW (#34944)
    • 修复 actions 跳过的提交状态指示器 (#34507)
    • 修复作业状态聚合逻辑 (#35000)
    • 修复因 OneDev 7.8.0 及更高版本 REST API 变更导致的 OneDev 迁移中断问题 (#35216)
    • 修复 oauth2_full_name_claim_name 字符串拼写错误 (#35199)
    • 修复 locale_en-US.ini 中的拼写错误 (#35196)
  • API
    • 在 API 中公开 TimeEstimate 字段 (#35475)
    • UpdateBranch API 支持重命名分支 (#35374)
    • 为文档添加 ownerparent 字段说明 (#35023)
    • 改进 OAuth2 提供者(修正 Issuer,尊重 ENABLED 设置) (#34966)
    • 为受影响的端点参数和响应/请求模型添加 login/login-name/username 消歧义说明 (#34901)
    • 不修改传递给 SearchRepositoryByName 的入参选项 (#34553)
    • 不修改传递给 RenderUserSearch 和 SearchUsers 的入参选项 (#34544)
    • 导出仓库的手动合并设置 (#34502)
    • 为提交检索端点添加日期范围过滤 (#34497)
    • 添加删除工作流运行的端点 (#34337)
    • 添加 workflow_run API + webhook (#33964)
  • 重构
    • 将 updateref 和 removeref 移至 gitrepo 并移除不必要的打开仓库操作 (#35511)
    • 移除未使用的参数 doer (#34545)
    • 将 GetLatestCommitStatus 拆分为两个函数 (#34535)
    • 设置 wiki 仓库默认分支时使用 gitrepo.SetDefaultBranch (#33911)
    • 重构编辑器 (#34780)
    • 重构包管理 (#34777)
    • 重构容器包 (#34877)
    • 重构"修改文件" API (#34855)
    • 将拉取请求 GetGitRefName 重命名为 GetGitHeadRefName 以准备引入 GetGitMergeRefName (#35093)
    • 将 git 命令移至 git/gitcmd (#35483)
    • 尽可能使用 db.WithTx/WithTx2 替代 TxContext (#35428)
    • 支持带类型剥离的 Node.js 22.6 (#35427)
    • 将工具和配置迁移至 TypeScript,要求 Node.js >= 22.18.0 (#35421)
    • 通过 SSH 传输使用 git 时检查用户和仓库的重定向 (#35416)
    • 移除重复函数 GetTags (#35375)
    • 重构以使用 reflect.TypeFor (#35370)
    • 删除分支时可能删除破损分支(有数据库记录但 git 分支缺失) (#35360)
    • 已为最新版本时成功退出 (#35312)
    • 拆分管理员配置设置模板以便于维护 (#35294)
    • 在服务层使用上下文的小规模重构 (#35179)
    • 重构并更新邮件模板 (#35150)
    • 尽可能使用 db.WithTx/WithTx2 替代 TxContext (#35130)
    • issue-title-buttonslist-header 对齐 (#35018)
    • 在用户设置中添加通知部分 (#35008)
    • 调整差异文件菜单位置 (#34999)
    • 重构邮件模板并支持预览 (#34990)
    • 仅在运行完成时重新运行作业 (#34970)
    • 合并 index.js (#34963)
    • 将 “delete-button” 重构为 “link-action” (#34962)
    • 重构 webhook 并修复飞书/Lark 密钥问题 (#34961)
    • 从 tailwindcss 中排除 devtest.ts (#34935)
    • 重构顶部导航栏图标 (#34922)
    • 改进 HTML 转义 (#34911)
    • 改进标签列表页 (#34898)
    • 改进 labels-list 渲染 (#34846)
    • 移除未使用的变量 HUGO_VERSION (#34840)
    • 修正迁移选项卡名称 (#34826)
    • 重构模板辅助函数 (#34819)
    • .vue 文件中尽可能使用 shallowRef 替代 ref (#34813)
    • 使用独立函数更新仓库列 (#34811)
    • 重构 wiki (#34805)
    • 移除不必要的重复代码 (#34733)
    • 重构内置资源并移除不必要的依赖 (#34692)
    • 更新 x/crypto 包并使内置 SSH 使用默认参数 (#34667)
    • 添加 --color-logo 匹配主色 (#34639)
    • 在无 root 容器镜像中添加 openssh-keygen (#34625)
    • 在部分位置替换更新仓库函数 (#34566)
    • 在第三方拉取请求审查通知中将 “rejected” 改为 “changes requested” (#34481)
    • 移除旧版模板辅助函数 (#34426)
    • 使用 run-name 并评估工作流变量 (#34301)
    • 将 HasWiki 移至仓库服务包 (#33912)
    • 将部分函数从 git 包移至 gitrepo (#33910)
  • 测试
    • 添加推送事件的 webhook 测试 (#34442)
    • 为开发分支添加 webhook 推送测试 (#34421)
    • 添加迁移测试 (#34456) (#34498)
  • 代码风格
    • 为必要的 nolint 指令添加说明并修复错误 (#34883)
    • 修复 gopls modernize 格式化后的遗留问题 (#34771)
    • 更新 gofumpt 并添加 go.mod ignore 指令 (#35434)
    • 强制执行 nolint 作用域 (#34851)
    • 启用 gocritic equalFold 并修复问题 (#34952)
    • 在代码库运行 gopls modernize (#34751)
    • 升级 gopls 至 v0.19.0,添加 make fix (#34772)
  • 构建
    • 使用 github.com/mholt/archives 替代 github.com/mholt/archiver (#35390)
    • 更新 JS 和 PY 依赖 (#35444)
    • 将 devcontainer Go 版本升级至 1.24.6 (#35298)
    • 升级 Go 至 1.25.1 并为 swagger 结构体字段添加描述 (#35418)
    • 更新 JS 和 PY 依赖 (#35191)
    • 更新 JS 和 PY 依赖 (#34391)
    • 更新 Go 工具依赖 (#34845)
    • 更新 uint8-to-base64,移除类型存根 (#34844)
    • generate-images 切换至 @resvg/resvg-wasm (#35415)
    • 切换至 pnpm (#35274)
    • 更新 chroma 至 v2.20.0 (#35220)
    • 迁移至 urfave v3 (#34510)
    • 更新 JS 依赖并重新生成 SVG (#34640)
    • 升级依赖 (#35384)
    • @github/relative-time-element 升级至 v4.4.8 (#34413)
    • 更新 JS 依赖 (#34951)
    • 升级 orgmode 至 v1.8.0 (#34721)
    • 将最低 Node.js 版本提升至 20,在 24 上测试 (#34713)
    • 更新 JS 依赖 (#34701)
    • 升级 htmx 至 2.0.6 (#34887)
    • 更新 eslint 至 v9 (#35485)
    • 更新 JS 依赖 (#35429)
    • 清理 npm 依赖 (#35508)
    • 清理 npm 依赖 (#35484)
    • 将 setup-node 升级至 v5 (#35448)
  • 其他
    • 添加 gitignore 规则以排除 LLM 指令文件 (#35076)
    • Gitignore:Visual Studio 设置文件夹 (#34375)
    • 改进 en-US 区域设置字符串的语言表达 (#35124)
    • 修复 locale_en-US.ini 中的所有语法错误 (#35053)
    • 文档/修复 CONTRIBUTING.md 中的拼写和语法错误 (#35024)
    • 改进 locale_en-US.ini 中的英语语法和可读性 (#35017)

更新内容 (原始)

  • BREAKING
    • Return 201 Created for CreateVariable API responses (#34517)
    • Add label ‘state’ to metric ‘gitea_users’ (#34326)
  • SECURITY
    • Upgrade security public key (#34956)
  • FEATURES
    • Stream repo zip/tar.gz/bundle achives by default (#35487)
    • Use configurable remote name for git commands (#35172)
    • Send email on Workflow Run Success/Failure (#34982)
    • Refactor OpenIDConnect to support SSH/FullName sync (#34978)
    • Refactor repo contents API and add “contents-ext” API (#34822)
    • Add support for 3D/CAD file formats preview (#34794)
    • Improve instance wide ssh commit signing (#34341)
    • Edit file workflow for creating a fork and proposing changes (#34240)
    • Follow file symlinks in the UI to their target (#28835)
    • Allow renaming/moving binary/LFS files in the UI (#34350)
  • PERFORMANCE
    • Improve the performance when detecting the file editable (#34653)
  • ENHANCEMENTS
    • Enable more markdown paste features in textarea editor (#35494)
    • Don’t store repo archives on gitea dump (#35467)
    • Always return the relevant status information, even if no status exists. (#35335)
    • Add start time on perf trace because it seems some steps haven’t been recorded. (#35282)
    • Remove deprecated auth sources (#35272)
    • When sorting issues by nearest due date, issues without due date should be sorted ascending (#35267)
    • Disable field count validation of CSV viewer (#35228)
    • Add has_code to repository REST API (#35214)
    • Display pull request in merged commit view (#35202)
    • Support Basic Authentication for archive downloads (#35087)
    • Add hover background to table rows in user and repo admin page (#35072)
    • Partially refresh notifications list (#35010)
    • Also display “recently pushed branch” alert on PR view (#35001)
    • Refactor time tracker UI (#34983)
    • Improve CLI commands (#34973)
    • Improve project & label color picker and image scroll (#34971)
    • Improve NuGet API Parity (#21291) (#34940)
    • Support getting last commit message using contents-ext API (#34904)
    • Adds title on branch commit counts (#34869)
    • Add “Cancel workflow run” button to Actions list page (#34817)
    • Improve img lazy loading (#34804)
    • Forks repository list page follow other repositories page (#34784)
    • Add ff_only parameter to POST /repos/{owner}/{repo}/merge-upstream (#34770)
    • Rework delete org and rename org UI (#34762)
    • Improve nuget/rubygems package registries (#34741)
    • Add repo file tree item link behavior (#34730)
    • Add issue delete notifier (#34592)
    • Improve Actions list (#34530)
    • Add a default tab on repo header when migrating (#34503)
    • Add post-installation redirect based on admin account status (#34493)
    • Trigger ‘unlabeled’ event when label is Deleted from PR (#34316)
    • Support annotated tags when using create release API (#31840)
    • Use lfs label for lfs file rather than a long description (#34363)
    • Add “View workflow file” to Actions list page (#34538)
    • Move organization’s visibility change to danger zone. (#34814)
  • BUGFIXES
    • Fix different behavior in status check pattern matching with double stars (#35474)
    • Fix overflow in notifications list (#35446)
    • Fix package link setting can only list limited repositories (#35394)
    • Extend comment treepath length (#35389)
    • Fix font-size in inline code comment preview (#35209)
    • Move git config/remote to gitrepo package and add global lock to resolve possible conflict when updating repository git config file (#35151)
    • Change some columns from text to longtext and fix column wrong type caused by xorm (#35141)
    • Redirect to a presigned URL of HEAD for HEAD requests (#35088)
    • Fix git commit committer parsing and add some tests (#35007)
    • Fix OCI manifest parser (#34797)
    • Refactor FindOrgOptions to use enum instead of bool, fix membership visibility (#34629)
    • Fix notification count positioning for variable-width elements (#34597)
    • Keeping consistent between UI and API about combined commit status state and fix some bugs (#34562)
    • Fix possible panic (#34508)
    • Fix autofocus behavior (#34397)
    • Fix Actions API (#35204)
    • Fix ListWorkflowRuns OpenAPI response model. (#35026)
    • Small fix in Pull Requests page (#34612)
    • Fix http auth header parsing (#34936)
    • Fix modal + form abuse (#34921)
    • Fix PR toggle WIP (#34920)
    • Fix log fmt (#34810)
    • Replace stopwatch toggle with explicit start/stop actions (#34818)
    • Fix some package registry problems (#34759)
    • Fix RPM package download routing & missing package version count (#34909)
    • Fix repo search input height (#34330)
    • Fix “The sidebar of the repository file list does not have a fixed height #34298” (#34321)
    • Fix minor typos in two files #HSFDPMUW (#34944)
    • Fix actions skipped commit status indicator (#34507)
    • Fix job status aggregation logic (#35000)
    • Fix broken OneDev migration caused by various REST API changes in OneDev 7.8.0 and later (#35216)
    • Fix typo in oauth2_full_name_claim_name string (#35199)
    • Fix typo in locale_en-US.ini (#35196)
  • API
    • Exposing TimeEstimate field in the API (#35475)
    • UpdateBranch API supports renaming a branch (#35374)
    • Add owner and parent fields clarification to docs (#35023)
    • Improve OAuth2 provider (correct Issuer, respect ENABLED) (#34966)
    • Add a login/login-name/username disambiguation to affected endpoint parameters and response/request models (#34901)
    • Do not mutate incoming options to SearchRepositoryByName (#34553)
    • Do not mutate incoming options to RenderUserSearch and SearchUsers (#34544)
    • Export repo’s manual merge settings (#34502)
    • Add date range filtering to commit retrieval endpoints (#34497)
    • Add endpoint deleting workflow run (#34337)
    • Add workflow_run api + webhook (#33964)
  • REFACTOR
    • Move updateref and removeref to gitrepo and remove unnecessary open repository (#35511)
    • Remove unused param doer (#34545)
    • Split GetLatestCommitStatus as two functions (#34535)
    • Use gitrepo.SetDefaultBranch when set default branch of wiki repository (#33911)
    • Refactor editor (#34780)
    • Refactor packages (#34777)
    • Refactor container package (#34877)
    • Refactor “change file” API (#34855)
    • Rename pull request GetGitRefName to GetGitHeadRefName to prepare introducing GetGitMergeRefName (#35093)
    • Move git command to git/gitcmd (#35483)
    • Use db.WithTx/WithTx2 instead of TxContext when possible (#35428)
    • Support Node.js 22.6 with type stripping (#35427)
    • Migrate tools and configs to typescript, require node.js >= 22.18.0 (#35421)
    • Check user and repo for redirects when using git via SSH transport (#35416)
    • Remove the duplicated function GetTags (#35375)
    • Refactor to use reflect.TypeFor (#35370)
    • Deleting branch could delete broken branch which has database record but git branch is missing (#35360)
    • Exit with success when already up to date (#35312)
    • Split admin config settings templates to make it maintain easier (#35294)
    • A small refactor to use context in the service layer (#35179)
    • Refactor and update mail templates (#35150)
    • Use db.WithTx/WithTx2 instead of TxContext when possible (#35130)
    • Align issue-title-buttons with list-header (#35018)
    • Add Notifications section in User Settings (#35008)
    • Tweak placement of diff file menu (#34999)
    • Refactor mail template and support preview (#34990)
    • Rerun job only when run is done (#34970)
    • Merge index.js (#34963)
    • Refactor “delete-button” to “link-action” (#34962)
    • Refactor webhook and fix feishu/lark secret (#34961)
    • Exclude devtest.ts from tailwindcss (#34935)
    • Refactor head navbar icons (#34922)
    • Improve html escape (#34911)
    • Improve tags list page (#34898)
    • Improve labels-list rendering (#34846)
    • Remove unused variable HUGO_VERSION (#34840)
    • Correct migration tab name (#34826)
    • Refactor template helper (#34819)
    • Use shallowRef instead of ref in .vue files where possible (#34813)
    • Use standalone function to update repository cols (#34811)
    • Refactor wiki (#34805)
    • Remove unnecessary duplicate code (#34733)
    • Refactor embedded assets and drop unnecessary dependencies (#34692)
    • Update x/crypto package and make builtin SSH use default parameters (#34667)
    • Add --color-logo, matching the logo’s primary color (#34639)
    • Add openssh-keygen to rootless image (#34625)
    • Replace update repository function in some places (#34566)
    • Change “rejected” to “changes requested” in 3rd party PR review notification (#34481)
    • Remove legacy template helper functions (#34426)
    • Use run-name and evaluate workflow variables (#34301)
    • Move HasWiki to repository service package (#33912)
    • Move some functions from package git to gitrepo (#33910)
  • TESTING
    • Add webhook test for push event (#34442)
    • Add a webhook push test for dev branch (#34421)
    • Add migrations tests (#34456) (#34498)
  • STYLE
    • Enforce explanation for necessary nolints and fix bugs (#34883)
    • Fix remaining issues after gopls modernize formatting (#34771)
    • Update gofumpt, add go.mod ignore directive (#35434)
    • Enforce nolint scope (#34851)
    • Enable gocritic equalFold and fix issues (#34952)
    • Run gopls modernize on codebase (#34751)
    • Upgrade gopls to v0.19.0, add make fix (#34772)
  • BUILD
    • Use github.com/mholt/archives replace github.com/mholt/archiver (#35390)
    • Update JS and PY dependencies (#35444)
    • Upgrade devcontainer go version to 1.24.6 (#35298)
    • Upgrade golang to 1.25.1 and add descriptions for the swagger structs’ fields (#35418)
    • Update JS and PY deps (#35191)
    • Update JS and PY dependencies (#34391)
    • Update go tool dependencies (#34845)
    • Update uint8-to-base64, remove type stub (#34844)
    • Switch to @resvg/resvg-wasm for generate-images (#35415)
    • Switch to pnpm (#35274)
    • Update chroma to v2.20.0 (#35220)
    • Migrate to urfave v3 (#34510)
    • Update JS deps, regenerate SVGs (#34640)
    • Upgrade dependencies (#35384)
    • Bump @github/relative-time-element to v4.4.8 (#34413)
    • Update JS dependencies (#34951)
    • Upgrade orgmode to v1.8.0 (#34721)
    • Raise minimum Node.js version to 20, test on 24 (#34713)
    • Update JS deps (#34701)
    • Upgrade htmx to 2.0.6 (#34887)
    • Update eslint to v9 (#35485)
    • Update js dependencies (#35429)
    • Clean up npm dependencies (#35508)
    • Clean up npm dependencies (#35484)
    • Bump setup-node to v5 (#35448)
  • MISC
    • Add gitignore rules to exclude LLM instruction files (#35076)
    • Gitignore: Visual Studio settings folder (#34375)
    • Improve language in en-US locale strings (#35124)
    • Fixed all grammatical errors in locale_en-US.ini (#35053)
    • Docs/fix typo and grammar in CONTRIBUTING.md (#35024)
    • Improve english grammar and readability in locale_en-US.ini (#35017)

下载链接