帮助您按照提交约定编写提交的python程序

commit-helper的Python项目详细描述


提交帮助程序

Build StatusMaintainabilitycodebeat badgeCodacy Badge

它是做什么的?

commit助手正是按照它的名字来做的:通过将commit消息裁剪成commit约定来帮助您创建和维护commit策略。

我为什么要用这个?

保持承诺策略听起来很容易,但实际上我们都知道它不是这样的。

有时,我们,开发人员,在编程时去full loco并在提交时出错。没关系,每个人都会犯错。但是,如果这些错误可以避免呢?

屏幕截图

初始提交

正常提交

提交而不生成配置文件

共同撰写的提交

快速提交

调试和调试

一体式提交

帮助

在约定中获得写作帮助

安装

为了安装一个旧版本,请检查previous releases。要安装最新(PIP)版本,只需执行以下命令:

$ pip3 install commit-helper

更新当前版本

如果您的计算机中已经安装了我们的一个pip版本,并且要更新到最新版本,请使用以下命令:

$ pip3 install --upgrade commit-helper

使用和配置

这个程序有一个可以利用的cli。正在运行commit --help 将显示提交的用法和选项。所有这些都是可选的 为了不失去你宝贵的时间。

 $ commit -h
usage: commit [-h][-t TAG][-m MESSAGE][-ct CONTEXT][-ca CO_AUTHOR][-nf][-c {angular,karma,tagged,symphony,message}][-d]

A commit formatter tool to help you follow commit conventions.

optional arguments:
  -h, --help            show this help message and exit
  -t TAG, --tag TAG     Pass your commit tag directly
  -m MESSAGE, --message MESSAGE
                        Pass your commit message directly
  -ct CONTEXT, --context CONTEXT
                        Pass your commit context directly
  -ca CO_AUTHOR, --co-author CO_AUTHOR
                        Make your friend an co-author to the commit
  -nf, --no-file        Disables the creation of a commiter.yml or commit-helper.yml file
  -c {angular,karma,tagged,symphony,message}, --convention {angular,karma,tagged,symphony,message}
                        Selects a convention to be used for the commit.
                        Required if there's no commiter.yml or commit-helper.yml file.
  -d, --debug           Toggles debug option

因此,如果要编写共同编写的提交,应使用:

$ commit --co-author "foo bar doritous <foobar@douritos.com>"

或者如果您是第一次在项目中使用此功能:

$ commit --convention tagged

为了更顺利地工作,在工作目录中有一个名为committer.yml或commit helper.yml的文件。在此文件中,必须通过要使用的提交约定,如下例:

convention:angular   # tag(context):commit message# orconvention:karma   # tag(context):commit message# orconvention:tagged # TAG:commit message# orconvention:symphony# [Tag] commit message# and if you're feeling adventurousconvention:none# Commit message

如果您或您的组织已具有上面未列出的提交约定,则可以在committer.yml或commit-helper.yml文件中对其进行如下配置:

convention:custom# considering a commit message like '{add} (stuff) ~> in file foo.br'commit_pattern:'{tag}(context)~>message'# tag, message and context are reserved words that will be replaced in your commit messagecontext:true# this is a must have field! If your pattern doesn't have one, assign false to it

支持的约定:

  • 角度
  • 业力
  • 标记
  • 交响乐
  • 原子
  • 仅消息(无约定)
  • 您可以创建一个自定义的:)

故障排除

如果在安装commit helper之后,commitcommit-helper命令在命令行中不可用,请检查$HOME/.local/bin是否在您的路径上。如果没有,请运行以下命令将其添加到.bashrc文件中:

$ echo"export PATH=$HOME/.local/bin:$PATH" >> .bashrc

项目维护人员

NameUsername
André de Sousa Costa Filho@andre-filho

我们的合作者

NameUsername
Arthur José Benedito de Oliveira Assis@arthur0496
Matheus Richard Torres Gomes de Melo@MatheusRich

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Android首选项相同getPreference()值的不同数据   字符串如何在Java中连接两个列表中的单词   安卓 Java Socket编程:检测客户端和服务器是否连接   使用JTextField的java无法将值转换为int   在java中,如何在不通过超级构造函数设置的情况下将消息设置为自定义异常类   用于标识属性值的java正则表达式模式   Android中的java不可见谷歌地图   java正确取消启动ExecutorService的JavaFX任务   在非活动java类中使用安卓的融合位置提供程序,并在主活动类中获取经度和纬度   spring为什么我的大摇大摆不能用springboot在java中工作?   java JSF(2.2)ViewScope在Weblogic 12.2.1.2和JDK 8上使用Spring 4.3.7(在Mac OS和Docker Oracle Linux环境上)   java如何用一个按钮提高计时器速度   java如何检查字符是否是元音?   注册表引用了不存在的Java运行时环境安装或运行时已损坏错误   来自ResultSet java的mysql getDateTime   maven LanguageTool Java API是否具有“无用”依赖关系?   twitter api身份验证的java Trycatch问题   java在Apache Struts 1.1中是否可以显式白名单?   安卓致命异常:主java。lang.RuntimeException:被问及未知片段