16 Commits

Author SHA1 Message Date
Slawek Kaplonski
e613ffab7d Make abandon_old_reviews script to be compatible with python 3
Change-Id: Ic845105050c2b32c4fe0943ae3bcc462a6f5ed51
2020-09-25 18:34:09 +02:00
Slawek Kaplonski
10bb7ecbb6 Update comments messages in abandon_old_reviews script
In comments given automatically by abandon_old_reviews.sh script
there was still Jenkins mentioned as CI tool.
We are using Zuul for very long time and "zuul" user is voting
now instead of "jenkins" so this patch updates those commit
messages to make this messages correct.

TrivialFix

Change-Id: Iad119108ea82b47ac2a66b9f6f8a8bb56b57e7b6
2019-12-04 10:38:14 +01:00
ZhongShengping
161e6b80f0 Replace git.openstack.org URLs with opendev.org URLs
Thorough replacement of git.openstack.org URLs with their opendev.org
counterparts.

Change-Id: Ifc446e00d7f69cb23411b3a50c8d880c719f1e73
2019-04-23 10:00:45 +08:00
Slawek Kaplonski
b0ffcf5f31 Update abandon_old_reviews script to check Zuul votes
Before this patch script was looking for patches which have
-1 vote from "jenkins". This was given in the past by zuul v2.
Now we have zuul v3 and there is "verified" vote give by "zuul"
instead so script needs to be updated also.

Change-Id: Ieba7a6d1babee99b14af45836c788741d23bc560
2018-08-30 10:18:48 +02:00
Slawek Kaplonski
2e91736df0 Modify abandon_old_reviews script
This script can now check and abandon old patches only from
specified project.
Project must be one of Neutron deliverables.
Project can be passed to script with parameter:
"--project <project_name>"

If no project is specified it will get old patches from all projects
which are part of neutron stadium.

Change-Id: I83b9a556d551db9f78b3d628df8648309e1dda1d
2018-08-27 10:56:35 +02:00
Jenkins
55be865d9a Merge "Add launchpad bug update support to abandon script" 2017-04-20 09:06:05 +00:00
Jenkins
e0eb0d6bfc Merge "Replaces yaml.load() with yaml.safe_load() in neutron" 2017-04-17 06:56:53 +00:00
Kevin Benton
514580692c Add launchpad bug update support to abandon script
Change-Id: If6db7c8f39665dfdef9b3936fd75e33bd9b76e03
2017-04-16 02:44:03 -07:00
gengchc2
edb6766294 Replaces yaml.load() with yaml.safe_load() in neutron
Yaml.load() return Python object may be dangerous if you receive
a YAML document from an untrusted source such as the Internet.
The function yaml.safe_load() limits this ability to simple Python
objects like integers or lists.

Reference:
https://security.openstack.org/guidelines/dg_avoid-dangerous-input-parsing-libraries.html

Change-Id: I026355f3e71b7fd3aeee2fe5c7920a1c6306ab02
2017-03-10 01:09:16 +00:00
Victor Morales
a14439549f Add bashate support
Bashate is a style checker program for bash scripts.  This addition
improves the quality of the current bash scripts and ensures that
any future change will follow the same standards.

Change-Id: Ia346f77632d4ac7beb288fa3aacea221d7969c87
2017-02-25 06:29:55 +00:00
Jenkins
05f722c0c2 Merge "Pull stadium projects from governance.o.o in utility script" 2016-07-09 00:41:22 +00:00
Sindhu Devale
0a7895996f Grammar error fixed
Change-Id: I1b90140dd150a2d23d30d39623047868d55b204b
2016-07-06 18:48:59 +00:00
Armando Migliaccio
acb6a950ed Pull stadium projects from governance.o.o in utility script
For housekeeping reasons we have abandon_old_reviews.sh that is
used to purge blocked reviews from Gerrit. The project query
should be extended to all stadium projects. To avoid hard coding,
fetch the list from governance.o.o, parse it and feed it to
the rest of the script.

Change-Id: Iad40d78b7a72a4435382406373bb9f15c0ffc4a7
2016-07-05 20:58:41 -07:00
Doug Wiegley
875175ae9c Add --dry-run mode to code review abandon tool
Usually I edit the script every time, to see what it would do
before the actual run. Add that mode via a flag.

Change-Id: I3ea50b905217947a43e4437b4925bb79c45a3d18
2016-01-13 16:07:12 -06:00
Maru Newby
e37dcd4c76 Remove check for bash usage
Arbitrarily restricting ourselves from using bash because developers on
platforms like netbsd don't want to install bash from ports doesn't
make sense.  Any non-trivial shell script is likely to use features
like arrays or string manipulation that are poorly supported (if at
all) by sh, and the continued bumping of the number of expected bash
scripts is an indication that the check is not serving its purpose
anyway.

Along with removing the check, all shebang references to /bin/bash
have been replaced with /usr/bin/env bash in an attempt to be more
compatible across different hosts.

Change-Id: Ief72dc380cc88af38959c330897e2c127e33c332
Closes-Bug: #1440824
2015-04-07 15:15:33 +00:00
Kyle Mestery
1eb6b12825 Add abandon script from nova
This adds the abandon_old_reviews.sh from the nova repository into
Neutron. This is handy for cleaning up the neutron review queues
by abandoning stale reviews stuck in the queue with a helpful
message.

Change-Id: I8920123217cb134c792dee35a5b06abde31be1d4
2015-01-27 18:53:42 +00:00