Forgejo v17.0 is available

本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。

Forgejo version 17.0 was released on 15 October 2026. Forgejo is a lightweight, community-developed, self-hosted platform for code collaboration. This article contains a selection of the changes that were introduced. A complete list of changes is available in the release notes. A dedicated test instance is available to try it out. Before upgrading, it is strongly recommended to make a full backup as explained in the upgrade guide and carefully read all breaking changes from the release notes. If in doubt, do not hesitate to ask for help in the chat room.

Forgejo 17.0 版本于 2026 年 10 月 15 日发布。Forgejo 是一个轻量级、由社区开发且可自托管的代码协作平台。本文精选了此次引入的部分变更。完整的变更列表可在发布说明中查看。官方提供了一个专门的测试实例供用户试用。在升级之前,强烈建议按照升级指南进行完整备份,并仔细阅读发布说明中所有破坏性变更。如有疑问,请随时在聊天室寻求帮助。

Breaking changes Absolute links in rendered documents In rendered documents, absolute links to resources inside a repository are now resolved with respect to the root of the repository. !12939 This is a breaking change from the previous behaviour when these links were rendered using the root of the instance. Absolute links in issue and pull request descriptions and comments remain rendered with respect to the instance’s root. !13993 This change increases the compatibility with other Git forges and thus, makes migrations to Forgejo even easier.

破坏性变更 渲染文档中的绝对链接 在渲染文档时,指向仓库内部资源的绝对链接现在将相对于仓库根目录进行解析。!12939 这与之前这些链接使用实例根目录进行渲染的行为相比属于破坏性变更。问题描述、合并请求描述及评论中的绝对链接仍将相对于实例根目录进行渲染。!13993 此项变更提高了与其他 Git 托管平台的兼容性,从而使迁移到 Forgejo 变得更加容易。

Action required Deprecation of action run webhook events Action run webhook events are replaced by the more capable and less problematic workflow run events. !14351 The action run events have been deprecated for removal in a future Forgejo version. Unfortunately, it is not possible to migrate existing webhooks to the new events automatically because some headers (X--Event, X--Event-Type) and the action key have changed, which might break existing receivers. Furthermore, completion notifications are only emitted after all jobs of a run have terminated. !12598 Please inspect existing webhooks and manually migrate them to the workflow run events after verifying that the webhook receivers can process them without issues.

需要采取的操作 弃用 Action 运行 Webhook 事件 Action 运行 Webhook 事件已被功能更强大且问题更少的 Workflow 运行事件所取代。!14351 Action 运行事件已被弃用,并将在未来的 Forgejo 版本中移除。遗憾的是,无法自动将现有的 Webhook 迁移到新事件,因为某些标头(X--Event, X--Event-Type)和 action 键已发生更改,这可能会导致现有接收端失效。此外,完成通知仅在运行的所有作业终止后才会发出。!12598 请检查现有的 Webhook,并在确认 Webhook 接收端能够无误处理后,手动将其迁移至 Workflow 运行事件。

New features Support for FUNDING.yml For repositories that contain a FUNDING.yml file, Forgejo shows a new “Donate” button which presents a list of donation options when clicked. Additionally, for users and organizations that have such file in their .profile repository, a similar button appears on their profile pages. This feature currently exists only in the web interface, but we are considering to implement an API surface for it. If you have a use cases for such API feature, please help shape it by sharing your feedback in the dedicated issue.

新功能 支持 FUNDING.yml 对于包含 FUNDING.yml 文件的仓库,Forgejo 会显示一个新的“捐赠”按钮,点击后会呈现捐赠选项列表。此外,对于在 .profile 仓库中拥有此类文件的用户和组织,其个人资料页面上也会出现类似的按钮。此功能目前仅存在于 Web 界面中,但我们正在考虑为其实现 API 接口。如果您有此类 API 功能的使用场景,请在专门的问题反馈页面分享您的意见,以帮助我们完善该功能。

Auto-completion for issues and pull requests When authoring an issue, pull request, or comment, Forgejo will offer auto-completion for issues and pull requests. !8088 To activate the auto-completion, type # for issues or pull requests, or ! for pull requests only. To refine the suggestions, either continue with a search term or an issue or pull request number.

问题和合并请求的自动补全 在撰写问题、合并请求或评论时,Forgejo 将提供问题和合并请求的自动补全功能。!8088 要激活自动补全,请输入 #(用于问题或合并请求)或 !(仅用于合并请求)。若要优化建议,请继续输入搜索词或问题/合并请求编号。

LFS support improvements Forgejo’s Git LFS support is being overhauled. While most changes are under the hood, a string of smaller improvements are visible to users. Those include navigation and overview improvements in the LFS settings, new views to discover the commits that refer to a given LFS file, and better handling of pointers.

LFS 支持改进 Forgejo 的 Git LFS 支持正在进行全面检修。虽然大部分更改是在底层进行的,但用户仍能看到一系列细微的改进。这些改进包括 LFS 设置中的导航和概览优化、用于发现引用特定 LFS 文件的提交的新视图,以及对指针更好的处理。

Invitations to organizations Forgejo can be configured so that when adding a user to an organization, they are not added to the organization instantly but instead receive an invitation that can be accepted or declined. This behavior can be enabled by setting [service].ADD_MEMBERS_BY_INVITATIONS = true in Forgejo’s app.ini. Authentication providers are still able to add users to organizations with no action on their part. The invitations are visible on the organization profile and are sent out by email. By default they expire after 14 days. Work is ongoing to make those invitations visible in the in-app notifications.

组织邀请 Forgejo 现在可以进行配置,使得在将用户添加到组织时,用户不会立即加入,而是收到一份可以接受或拒绝的邀请。此行为可以通过在 Forgejo 的 app.ini 中设置 [service].ADD_MEMBERS_BY_INVITATIONS = true 来启用。身份验证提供商仍然可以在无需用户操作的情况下将用户添加到组织。邀请信息可在组织资料页面查看,并会通过电子邮件发送。默认情况下,邀请在 14 天后过期。目前我们正在努力使这些邀请能够在应用内通知中显示。

Add/invite to multiple teams at once A user can now be added or invited to multiple teams in one go, without going through each needed team individually. !11848

一次性添加/邀请至多个团队 用户现在可以一次性被添加或邀请至多个团队,无需逐个处理每个团队。!11848

Copy comment Markdown Markdown contents of comments can now be easily copied via the ellipsis menu. !13083

复制评论 Markdown 现在可以通过省略号菜单轻松复制评论的 Markdown 内容。!13083

Forgejo Actions API improvements The Forgejo HTTP API received multiple enhancements related to Forgejo Actions: Entire workflow runs and individual jobs can now be rerun by sending requests to /repos/{owner}/{repo}/actions/runs/{run_id}/rerun and /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun respectively. !13924 The workflow runs or jobs must have completed. Otherwise, they cannot be rerun. However, individual completed jobs can be rerun while the workflow run is still being executed. The HTTP endpoints for obtaining job logs gained substring filters !12821 and the ability to only return the logs of a particular step with /jobs/{job_id}/logs?step=N. !12799 In addition to plain text, the logs can be requested as NDJSON with ?format=ndjson. !12820 /repos/{owner}/{repo}/actions/jobs/{job_id} enables users to get the details of a particular job. !12799

Forgejo Actions API 改进 Forgejo HTTP API 在 Forgejo Actions 方面获得了多项增强:现在可以通过分别向 /repos/{owner}/{repo}/actions/runs/{run_id}/rerun 和 /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun 发送请求来重新运行整个工作流或单个作业。!13924 工作流运行或作业必须已完成才能重新运行。不过,在工作流运行期间,已完成的单个作业可以被重新运行。用于获取作业日志的 HTTP 端点增加了子字符串过滤器 !12821,并支持通过 /jobs/{job_id}/logs?step=N 仅返回特定步骤的日志。!12799 除了纯文本外,还可以通过 ?format=ndjson 请求 NDJSON 格式的日志。!12820 /repos/{owner}/{repo}/actions/jobs/{job_id} 允许用户获取特定作业的详细信息。!12799

Forgejo Actions job summaries Forgejo now displays job summaries generated by Forgejo Runner 13.2 or newer. !14076 Job summaries are Markdown documents that belong to a particular Forgejo Actions job. They are displayed above the logs. All Markdown features supported by Forgejo can be used — including tables, Mermaid diagrams, and formulas written in KaTeX. Job summaries are assembled from one or more Markdown fragments that are written by a step to the file $FORGEJO_STEP_SUMMARY. $GITHUB_STEP_SUMMARY is supported, too, for compatibility with existing actions and easing the transition from GitHub.

Forgejo Actions 作业摘要 Forgejo 现在可以显示由 Forgejo Runner 13.2 或更高版本生成的作业摘要。!14076 作业摘要是属于特定 Forgejo Actions 作业的 Markdown 文档,显示在日志上方。Forgejo 支持的所有 Markdown 功能均可使用,包括表格、Mermaid 图表以及用 KaTeX 编写的公式。作业摘要由一个或多个 Markdown 片段组成,这些片段由步骤写入 $FORGEJO_STEP_SUMMARY 文件。为了兼容现有 Action 并简化从 GitHub 的迁移,系统也支持 $GITHUB_STEP_SUMMARY。

Allow pushing to AGit refs Maintainers and pull-requests creators can now directly push to the AGit refs:

Pull Request Creator

git checkout -b local-branch git push origin HEAD:refs/for/main/agit-topic

Maintainer/Reviewer can pull the code to a local branch

git fetch origin refs/pull/3/head:local-branch git switch local-branch

Maintainers and Pull Request creator need some further git config

git config push.default upstream git config branch.local-branch.merge refs/pull/3/head git config branch.local-branch.remote origin

NEW: Main

允许推送到 AGit 引用 维护者和合并请求创建者现在可以直接推送到 AGit 引用:

合并请求创建者

git checkout -b local-branch git push origin HEAD:refs/for/main/agit-topic

维护者/审查者可以将代码拉取到本地分支

git fetch origin refs/pull/3/head:local-branch git switch local-branch

维护者和合并请求创建者需要进一步的 git 配置

git config push.default upstream git config branch.local-branch.merge refs/pull/3/head git config branch.local-branch.remote origin

新增:Main