TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: GitCop – Automated Commit Message Validation for GitHub Pull Requests

55 点作者 Gazler超过 10 年前

12 条评论

akoeplinger超过 10 年前
Can the bot comment include an example of a good commit message?<p>Telling users that &quot;Commits must be in the following format: %{type}(%{scope}): %{description}&quot; requires them to mentally parse and figure out what this means. Giving an example along the lines of &quot;perf(backend): optimized db access&quot; would make this easier.
评论 #8587240 未加载
weavejester超过 10 年前
It&#x27;s a very nice idea, but the validation rules are extremely limited.<p>Perhaps I&#x27;m wrong, but all of the rule options on the site look like they could have been implemented via regular expressions. Given the technical expertise of your intended customers, why not allow them to set a list of rules in the format: [regex, error-message], e.g.<p><pre><code> &quot;^.{0,50}\n&quot; &quot;The subject should be 50 characters or under&quot; &quot;^.+\n(.{0,72}\n)*$&quot; &quot;The body should have lines of 72 characters or under&quot; &quot;^\p{Upper}&quot; &quot;The subject should be capitalized&quot;</code></pre>
评论 #8588890 未加载
eLobato超过 10 年前
This is quite cool, and actually something I&#x27;ll propose to use at some <a href="http://github.com/theforeman" rel="nofollow">http:&#x2F;&#x2F;github.com&#x2F;theforeman</a> repos.<p>I didn&#x27;t really understood the format rules, so if the author posted this, a help section would help. I try to enforce<p><pre><code> &#x27;%(type) #xxxx(: | -) %{description}&#x27; </code></pre> How would you do that? #xxxx is just an issue number, so it can be #23891, and after that I want a separator from the description, semi colon or hyphen are fine. Probably %{scope} can be used but I didn&#x27;t really understand it from the inline help, sorry!
评论 #8587223 未加载
Myrmornis超过 10 年前
After the PR is opened is too late to warn about commit messages. They can&#x27;t be changed without a destructive push to the remote, which is generally a no-no for a public branch, and when using github, closes the PR automatically. The correct place to do this is, I believe, in the `commit-msg` hook: <a href="http://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks" rel="nofollow">http:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Customizing-Git-Git-Hooks</a>
iandanforth超过 10 年前
Slightly off topic - are there any good plugins&#x2F;tools that remind you to commit frequently? I&#x27;d love something like this for sublime.
akoeplinger超过 10 年前
Have you thought about opening this up for more than just commit messages?<p>Many projects need to check a number of things on PRs, e.g. enforce coding style, bugfix has a corresponding test, user signed the CLA, owner of %{scope} is notified for review, etc. That would obviously need a way to tie into external&#x2F;custom tools as everybody validates these things differently.
评论 #8587433 未加载
tokenrove超过 10 年前
I like the idea, but for projects that aren&#x27;t open source, why not just mandate the use of a git commit-msg hook instead?
评论 #8587030 未加载
tjbiddle超过 10 年前
Looks clean, has plenty of features, and I love the pricing schema (Unlimited for open source projects - Always been a fan of this trend).<p>Great work!
评论 #8586527 未加载
thestonefox超过 10 年前
What an awesome service, I&#x27;m signing up my dev team for this right now! Worth the money!
评论 #8587101 未加载
dmooney1超过 10 年前
I&#x27;d love it if you could make this work with Atlassian Stash behind a firewall.
评论 #8589457 未加载
评论 #8587055 未加载
jimmyboyb超过 10 年前
I have been looking for something like this
warrenmcwin超过 10 年前
looks like Robocop has finally joined the Pull Police. nice job!