mos icon indicating copy to clipboard operation
mos copied to clipboard

[idea] Common Git Hooks

Open at15 opened this issue 9 years ago • 4 comments

idea issuer: infamous @at15

Related issues: gitTq tongqu/tongqu-web/issues/19

Description

Currently, a lot of projects need to enforce commit message and code style, so instead of writing shell scripts for each project, it would be a better idea to have a set of configurable Git Hooks. Though it could be part of Ayi, Ayi still got a bunch of crap to deal with now.

i.e.

  • [ ] Remove die in PHP code before push
  • [ ] Remove f**k before commit
  • [ ] Abort commit if FIXME and TODO are presented

Required skills

  • shell/python, I prefer python over shell
  • intermediate understanding of git

at15 avatar Dec 30 '16 21:12 at15

感觉都是现成的, 组装一个套路写个一键安装脚本 (雾) 就可以了?

arrowrowe avatar Dec 31 '16 08:12 arrowrowe

Temporarily, we maintain a dyweb/php-git-hooks since original php-git-hooks does not support custom commit-msg error message. I only change the message directly now. Also, I think we can write a tool or implement the custom message and other features for php-git-hooks.

JasonQSY avatar Jan 21 '17 07:01 JasonQSY

just for curiosity, why php?...

arrowrowe avatar Jan 21 '17 07:01 arrowrowe

@arrowrowe Just because we need it on tongqu-web (5.0) .... For other projects, no idea.

JasonQSY avatar Jan 21 '17 07:01 JasonQSY