<div dir="ltr">Yep, out of the box Gerrit commit hooks cannot block new patches from being uploaded.  An alternative would be to immediately set the vote on the patchset to Code-Review to -2 if the commit message doesn't match what you want.  The hook script for something like that can be found here: <a href="https://gerrit.googlesource.com/gerrit/+/master/contrib/check-valid-commit.py">https://gerrit.googlesource.com/gerrit/+/master/contrib/check-valid-commit.py</a><div><br></div><div>-Khai</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 24, 2015 at 12:27 PM, Darragh Bailey <span dir="ltr"><<a href="mailto:daragh.bailey@gmail.com" target="_blank">daragh.bailey@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I believe the its-* plugins for gerrit could handle this for you, recently someone mentioned on the repo mailing list that you can even exclude branches from the requirement.</p>
<p dir="ltr">I'd suggest asking there directly if you haven't already.</p><span class="HOEnZb"><font color="#888888">
<p dir="ltr">Darragh</p></font></span><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On 23 Mar 2015 22:17, "Jeremy Stanley" <<a href="mailto:fungi@yuggoth.org" target="_blank">fungi@yuggoth.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2015-03-23 12:00:26 +0530 (+0530), Vinay Mahuli wrote:<br>
> I need info on where to make this change in a similar way how<br>
> Change-Id is checked/validated.<br>
<br>
"Require Change-Id in commit message" is a project-specific setting<br>
built into Gerrit by default.<br>
<br>
<URL: <a href="https://gerrit-review.googlesource.com/Documentation/project-configuration.html#_require_change_id" target="_blank">https://gerrit-review.googlesource.com/Documentation/project-configuration.html#_require_change_id</a> ><br>
<br>
Something similar may be possible by writing a Gerrit plug-in or a<br>
hook script, but it will almost certainly use a different mechanism<br>
as it won't be implemented directly in the Gerrit codebase as a<br>
built-in feature.<br>
--<br>
Jeremy Stanley<br>
<br>
_______________________________________________<br>
OpenStack-Infra mailing list<br>
<a href="mailto:OpenStack-Infra@lists.openstack.org" target="_blank">OpenStack-Infra@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra</a><br>
</blockquote></div>
</div></div><br>_______________________________________________<br>
OpenStack-Infra mailing list<br>
<a href="mailto:OpenStack-Infra@lists.openstack.org">OpenStack-Infra@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra</a><br>
<br></blockquote></div><br></div>