Commit Graph

17 Commits

Author SHA1 Message Date
Monty Taylor 5468f49254 Remove unused gerrit puppet things
We ain't using em.

Change-Id: I4ce9188a6b6a7e6a670e61bb17ab07e890faebcf
2020-04-19 10:59:25 -05:00
Khai Do 63dac37550 Remove puppet for jeepyb's trivial rebase script
Change I37337b9d07ace4 disabled the use of jeepyb's trivial rebase
script however the puppet for it still exists.  There's really no need
to keep the option around in the puppet manifest so this change just
removes it.

Change-Id: I101e385823a110a74b3060ad11e3e528d5048d9f
2016-07-20 10:16:27 -07:00
K Jonathan Harker 09db1f4ce6 Clean up some variable references
Change-Id: Id8b9f3acb742f8ebedb3818e283082432b83359c
2014-04-30 15:27:47 -07:00
Monty Taylor f589f2e352 Actually disable trivial_rebase_hook
The test in the erb file was bogus.

Change-Id: I9790f9f7bb25f105d9875a34f0451ef373f61dca
2014-04-28 16:58:20 -07:00
Jeremy Stanley 926a4d1f6c Update patchset-created hook for Gerrit welcome
* .../templates/gerrit_patchset-created.erb: The SSH user and key
for the welcome-message hook script are now options instead of
positional parameters. Also, the user is a short name not a full
E-mail address.

Change-Id: Ibcb70068db89ec75a4b284340206718fd9d10e96
2014-03-18 02:32:08 +00:00
Tom Fifield 003f6cb477 Enable Welcome Message to post review comments
After extensive fixing from Jeremey and the Infrastructure
team, welcome message now detects newbies correctly.

The code has been run for a week in dry-run mode, and has
been verified to produce no false positives.

This patch removes the dry run option from the hook, to enable
welcome message to post welcoming messages on reviews from first-
time contributors.

Change-Id: I5dd072d36480294eefc23aa6376ae0a686621b08
2014-03-13 10:00:39 +11:00
Khai Do c80681bd9a disable the jeepyb trivial rebase hook on review-dev.o.o
This change is for the pending gerrit upgrade.  Gerrit 2.8 has built-in trivial rebase
detection[1].  This change disables the jeepyb trivial rebase hook on review-dev.o.o so
so we can use and test gerrit's built-in rebase detector instead.

[1] https://gerrit-review.googlesource.com/Documentation/config-labels.html#label_copyAllScoresOnTrivialRebase
and https://gerrit-review.googlesource.com/Documentation/config-labels.html#label_copyAllScoresIfNoCodeChange

Closes-Bug: #1273959
Partial-Bug: #1082781

Change-Id: Ia14d8ee86b9d59b6f79ee873231bb0d13b7f43d2
2014-02-12 22:44:51 -08:00
James E. Blair f32bc549aa Enable verbose output for welcome message
Change-Id: If59203932ebe0e6be34f08b3e2012638a8c3b7e6
2014-02-10 10:01:02 -08:00
Jeremy Stanley f20639a2be Install and use the Gerrit welcome-message keypair
Change-Id: I7c23112664e43713f8dfc4bd0e4b9aec46b71500
2014-01-31 22:04:15 +00:00
Tom Fifield f9007de5e9 Fix CLI args for welcome-message
The welcome-message script uses SSH arguments that are the same
as expire-old-reviews, not trivial-rebase. This patch updates
the hook script to use the correct CLI arguments.

Change-Id: Ib771e2a8cf4b770878dd24c72efd80344e62f754
2014-01-22 10:22:20 -07:00
Tom Fifield 8c32906076 Add welcome_message.py to patchset-created trigger
This patch adds the welcome message script to the patchset-created
trigger in gerrit. In theory it should post a lovely message to
any committer making a patchset for the first time.

However, it has not been tested, and review-dev is not available.
So, this patch uses the --dry-run option of welcome_message.py
so that it will hopefully post useful information to the log, but
won't cause catastrophic failures.

Change-Id: I4f04fcd2bd43f680f0d5032fc613194be8dd2586
2013-12-20 13:38:17 +08:00
Jeremy Stanley bb6518f4c7 Move docimpact from created hook to merged
* .../files/gerrit/change-merged: Call the docimpact script from
this hook.

* .../templates/gerrit_patchset-created.erb: Stop calling the
docimpact script from this hook.

Change-Id: I9a2d6e33ec35eb94ae14f7d2b17ead52bb9a2019
2013-10-14 16:21:23 +00:00
Clark Boylan b343db2b05 Change SecurityImpact destination address.
Change the destination address for SecurityImpact email notifications to
openstack-security@lists.openstack.org. This is being done at the
request of bdpayne.

Change-Id: If548c9ad74bb5e4f53f42ac737150a32ff54006e
Reviewed-on: https://review.openstack.org/27304
Reviewed-by: bdpayne <bdpayne@acm.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Spencer Krum <krum.spencer@gmail.com>
Reviewed-by: Elizabeth Krumbach <lyz@princessleia.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-04-23 17:20:45 +00:00
Monty Taylor 52db16762b Consume jeepyb.
Instead of keeping many of these files directly in the tree, use them
from the out-of-tree jeepyb project, which makes them easier to consume
for other people who are not us.

Change-Id: Id704f2e17dd80709ef63cbbf2c5475a08a835f91
Reviewed-on: https://review.openstack.org/16777
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2012-11-30 18:02:30 +00:00
Clark Boylan 65e61f5fb8 Add security impact email notifications.
Fixes bug #1070577

Make the notify_impact script generic so that it can handle different
types of notifications. Then add a SecurityImpact notification.

Change-Id: Id4bbf7db29e36dde783328e31685079e79d0b1e9
Reviewed-on: https://review.openstack.org/14856
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2012-11-16 18:13:21 +00:00
Jeremy Stanley 202614e155 Gerrit Whitespace Change Detection
Consider whitespace changes significant enough not to reapply code
reviews, but still comment if that's all which changed between
patchsets. This addresses bug 1057506.

* modules/openstack_project/files/gerrit/scripts/trivial_rebase.py
(GetPatchId): Add a flag called consider_whitespace, but defaulting to
False so as to preserve default behavior of the module. Add conditional
behavior to replace all spaces and tabs with percent signs before
calculating the patch-id hash.
(Main): Add a --whitespace command-line option to turn on whitespace
change checking. If enabled and if normal GetPatchId calls return a
match, re-run with consider_whitespace set to True and apply a comment
to the new patchset in Gerrit if the result is non-matching.

* modules/openstack_project/templates/gerrit_patchset-created.erb: Add
--whitespace to the trivial_rebase.py invocation, enabling whitespace
checking.

Change-Id: I89c479614a637717cf515a5d3f6d03b5f7830581
Reviewed-on: https://review.openstack.org/13775
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2012-10-01 03:10:36 +00:00
Jeremy Stanley 6b7d540833 Gerrit Trivial Rebase Detection
Adds trivial_rebase.py for bug 881184.

* modules/openstack_project/files/gerrit/scripts/trivial_rebase.py: A
modified version of the contrib/trivial_rebase.py included in upstream
Gerrit's git tree (we'll try to get individual patches submitted
upstream soon):

    git clone https://gerrit.googlesource.com/gerrit

* modules/openstack_project/files/gerrit/patchset-created: Moved to
modules/openstack_project/templates/gerrit_patchset-created.erb and
added an entry for the trivial_rebase.py script with variables for its
command-line options sourced from gerrit.pp and review{,_dev}.pp.

* modules/openstack_project/manifests/gerrit.pp: Changed the file
definition for /home/gerrit2/review_site/hooks/patchset-created to use a
template, adding the ssh_host_key and trivial_rebase_role_id variables
it requires. Added a file entry for trivial_rebase.py as well, since
we're putting it in modules/openstack_project instead of modules/gerrit
where the existing scripts reside (we'll eventually want to move all of
modules/gerrit/files/scripts out of there at some point, but not now).

* modules/openstack_project/manifests/review_dev.pp: Override the
trivial_rebase_role_id variable to trivial-rebase@review-dev.o.o on
review-dev.

* modules/openstack_project/manifests/review.pp: Override the
trivial_rebase_role_id variable to trivial-rebase@review.o.o on review.

Change-Id: I941f15525c72b84708ae1de6832834eb53ab6863
Reviewed-on: https://review.openstack.org/12373
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2012-09-10 16:20:09 +00:00