mcpField
T
typo3-core-contributions

typo3-core-contributions

github.com/netresearch开发138 次安装2 天前更新
代码仓库

关于 typo3-core-contributions

面向 TYPO3 核心贡献者的技能,涵盖问题分析、代码修改、测试、Gerrit 审查和 CI。它还区分核心 Gerrit 流程与 t3o sites 的 GitLab 流程。

主要功能

  1. 01TYPO3 贡献流程指导
  2. 02Gerrit 补丁提交与审查
  3. 03提交格式和 Change-Id 指引
  4. 04CI 日志与测试排查
  5. 05独立的 t3o GitLab 流程

适用场景

  1. 01准备 TYPO3 核心补丁
  2. 02变基并更新 Gerrit 审查
  3. 03诊断 TYPO3 CI 作业失败

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/netresearch/typo3-core-contributions-skill --skill typo3-core-contributions

安装后在 Claude Code 中输入/typo3-core-contributions确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

references/
account-setup.md
commit-message-format.md
commit-msg-hook.md
ddev-setup-workflow.md
forge-api.md
gerrit-review-patterns.md
gerrit-workflow.md
modern-typo3-patterns.md
proving-a-test.md
t3o-gitlab-workflow.md
troubleshooting.md
scripts/
create-commit-message.py
create-forge-issue.sh
query-forge-metadata.sh
setup-typo3-coredev.sh
t3o-gitlab.py
validate-commit-message.py
verify-prerequisites.sh

详细介绍

TYPO3 核心贡献

何时使用 — 根据主机路由

review.typo3.org(Gerrit)、forge.typo3.org(Redmine)、git.typo3.org/typo3/CI/cms(CI 日志)都属于核心:Forge 问题、补丁、评审、提交格式、挑选提交、变基——以下内容均适用。git.typo3.org/services/t3o-sites/** 是 t3o 站点的普通 GitLab:没有 Gerrit,refs/for/main 毫无意义。请先阅读 references/t3o-gitlab-workflow.md。

前置条件

运行 ${CLAUDE_SKILL_DIR}/scripts/verify-prerequisites.sh:TYPO3.org 账号、Gerrit SSH(ssh -p 29418 <user>@review.typo3.org)、与 Gerrit 匹配的 Git 邮箱。

工作流

  1. 设置:${CLAUDE_SKILL_DIR}/scripts/setup-typo3-coredev.sh
  2. 分支:git checkout -b feature/<issue>-description
  3. 分析:先确定根本原因、复现方式和受影响的版本
  4. 开发:修复 + 测试,使用 typo3-conformance-skill 验证。证明每项测试在没有修复时都会失败 — references/proving-a-test.md
  5. 提交:使用下方格式,添加 Resolves: #<issue> + Releases:
  6. 推送:git push origin HEAD:refs/for/main%wip — 普通推送不代表 WIP;评审者会投票,而修改提交会使他们的投票失效
  7. CI:等待所有作业完成,查看实际日志:git.typo3.org/typo3/CI/cms/-/jobs/<id>,在一次 amend+push 中修复所有失败
  8. 就绪:git push origin HEAD:refs/for/main%ready 或在 Gerrit UI 中选择“Start Review”
  9. 评审:amend,并保留 Change-Id。先获取评审者的补丁集:git fetch origin refs/changes/XX/NNNNN/N && git reset --soft FETCH_HEAD
  10. 更新:git commit --amend && git push origin HEAD:refs/for/main

提交格式

[TYPE] Subject (imperative mood, max 52 chars)

How and why (not what). Wrap at 72 chars.

Resolves: #12345
Releases: main, 13.4, 12.4

[BUGFIX] [FEATURE](仅限 main)[TASK] [DOCS] [SECURITY];破坏性变更:[!!!],且仅限 Releases: main。每个提交都必须包含 Resolves:,不能使用 Related:。

CI 调试

阅读所有失败作业的日志,切勿猜测;在一个补丁集中修复所有问题。本地运行:

./Build/Scripts/runTests.sh -s unit && ./Build/Scripts/runTests.sh -s functional
./Build/Scripts/cglFixMyCommit.sh && ./Build/Scripts/runTests.sh -s phpstan

关键操作

任务命令
推送到 Gerritgit push origin HEAD:refs/for/main%wip
标记为就绪git push origin HEAD:refs/for/main%ready
变基git fetch origin && git rebase origin/main
挑选补丁git fetch origin refs/changes/XX/NNNNN/N && git cherry-pick FETCH_HEAD
安装钩子cp Build/git-hooks/commit-msg .git/hooks/ && chmod +x .git/hooks/commit-msg
修复邮箱不匹配GIT_COMMITTER_EMAIL="registered@email" git commit --amend --no-edit
Forge API${CLAUDE_SKILL_DIR}/scripts/create-forge-issue.sh、references/forge-api.md
t3o GitLabpython3 ${CLAUDE_SKILL_DIR}/scripts/t3o-gitlab.py access|issue|note|mr create|mr update|mr show|pipeline status|pipeline wait|link|probe

参考资料

主题文件
账号设置references/account-setup.md
提交格式references/commit-message-format.md
Gerrit 工作流references/gerrit-workflow.md
评审模式references/gerrit-review-patterns.md
现代模式references/modern-typo3-patterns.md
DDEV 设置references/ddev-setup-workflow.md
Forge APIreferences/forge-api.md
git.typo3.org 上的 t3o 站点references/t3o-gitlab-workflow.md
提交钩子references/commit-msg-hook.md
证明测试references/proving-a-test.md
故障排除references/troubleshooting.md

评论

支持 Markdown