跳转到主要内容

验证提交消息的格式是否符合维基媒体Gerrit标准

项目描述

commit-message-validator 是一个工具,用于验证git提交消息是否符合 维基媒体提交消息指南

请参阅 <https://www.mediawiki.org/wiki/commit-message-validator> 以获取更多详细信息。

使用方法

作为本地预提交插件使用

commit-message-validator 可以作为 pre-commit git 钩子系统的插件。将以下内容添加到您的 .pre-commit-config.yaml

-  repo: https://gitlab.wikimedia.org/repos/ci-tools/commit-message-validator
   rev: # Fill in a tag / sha here (like v2.0.0)
   hooks:
   -  id: commit-message-validator

然后安装预提交钩子

pre-commit install --hook-type commit-msg

与 gitlab.wikimedia.org 的 CI/CD 一起使用

此存储库提供了 GitLab CI/CD 模板,用于合并请求中的提交消息检查。将以下内容添加到您的 .gitlab-ci.yml

include:
  - project: repos/ci-tools/commit-message-validator
    file: /templates/lint-merge-request.yml

贡献

有关向 commit-message-validator 贡献的指南,请参阅 CONTRIBUTING.rst

错误报告

请在此处报告错误和功能请求:https://phabricator.wikimedia.org/tag/commit-message-validator/

许可证

本软件基于 GPL-2.0-or-later 许可。有关完整许可信息,请参阅 COPYING

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。

源代码分发

commit_message_validator-2.1.0.tar.gz (27.5 kB 查看哈希值)

上传时间 源代码

构建分发

commit_message_validator-2.1.0-py3-none-any.whl (26.2 kB 查看哈希值)

上传时间 Python 3

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面