"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tools/abandon_old_reviews.sh" between
openstack-congress-10.0.0.tar.gz and openstack-congress-11.0.0.tar.gz

About: OpenStack Congress provides policy as a service across any collection of cloud services in order to offer governance and compliance for dynamic infrastructures.
The "Ussuri" series (latest release).

abandon_old_reviews.sh  (openstack-congress-10.0.0):abandon_old_reviews.sh  (openstack-congress-11.0.0)
skipping to change at line 16 skipping to change at line 16
# #
# http://www.apache.org/licenses/LICENSE-2.0 # http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
# #
# before you run this modify your .ssh/config to create a # before you run this modify your .ssh/config to create a
# review.openstack.org entry: # review.opendev.org entry:
# #
# Host review.openstack.org # Host review.opendev.org
# User <yourgerritusername> # User <yourgerritusername>
# Port 29418 # Port 29418
# #
# Note: due to gerrit bug somewhere, this double posts messages. :( # Note: due to gerrit bug somewhere, this double posts messages. :(
# first purge the all reviews that are more than 4w old and blocked by a core -2 # first purge the all reviews that are more than 4w old and blocked by a core -2
set -o errexit set -o errexit
function abandon_review { function abandon_review {
local gitid=$1 local gitid=$1
shift shift
local msg=$@ local msg=$@
echo "Abandoning $gitid" echo "Abandoning $gitid"
# echo ssh review.openstack.org gerrit review $gitid --abandon --message \"$ # echo ssh review.opendev.org gerrit review $gitid --abandon --message \"$ms
msg\" g\"
ssh review.openstack.org -p 29418 gerrit review $gitid --abandon --message \ ssh review.opendev.org -p 29418 gerrit review $gitid --abandon --message \"$
"$msg\" msg\"
} }
PROJECTS="(project:openstack/congress OR project:openstack/python-openstackclien t)" PROJECTS="(project:openstack/congress OR project:openstack/python-openstackclien t)"
blocked_reviews=$(ssh review.openstack.org -p 29418 "gerrit query --current-patc h-set --format json $PROJECTS status:open age:4w label:Code-Review<=-2" | jq .cu rrentPatchSet.revision | grep -v null | sed 's/"//g') blocked_reviews=$(ssh review.opendev.org -p 29418 "gerrit query --current-patch- set --format json $PROJECTS status:open age:4w label:Code-Review<=-2" | jq .curr entPatchSet.revision | grep -v null | sed 's/"//g')
blocked_msg=$(cat <<EOF blocked_msg=$(cat <<EOF
This review is > 4 weeks without comment and currently blocked by a This review is > 4 weeks without comment and currently blocked by a
core reviewer with a -2. We are abandoning this for now. core reviewer with a -2. We are abandoning this for now.
Feel free to reactivate the review by pressing the restore button and Feel free to reactivate the review by pressing the restore button and
contacting the reviewer with the -2 on this review to ensure you contacting the reviewer with the -2 on this review to ensure you
address their concerns. address their concerns.
EOF EOF
) )
# For testing, put in a git rev of something you own and uncomment # For testing, put in a git rev of something you own and uncomment
# blocked_reviews="b6c4218ae4d75b86c33fa3d37c27bc23b46b6f0f" # blocked_reviews="b6c4218ae4d75b86c33fa3d37c27bc23b46b6f0f"
for review in $blocked_reviews; do for review in $blocked_reviews; do
# echo ssh review.openstack.org gerrit review $review --abandon --message \" $msg\" # echo ssh review.opendev.org gerrit review $review --abandon --message \"$m sg\"
echo "Blocked review $review" echo "Blocked review $review"
abandon_review $review $blocked_msg abandon_review $review $blocked_msg
done done
# then purge all the reviews that are > 4w with no changes and Jenkins has -1ed # then purge all the reviews that are > 4w with no changes and Jenkins has -1ed
failing_reviews=$(ssh review.openstack.org -p 29418 "gerrit query --current-pat ch-set --format json $PROJECTS status:open age:4w NOT label:Verified>=1,jenkins" | jq .currentPatchSet.revision | grep -v null | sed 's/"//g') failing_reviews=$(ssh review.opendev.org -p 29418 "gerrit query --current-patch -set --format json $PROJECTS status:open age:4w NOT label:Verified>=1,jenkins" | jq .currentPatchSet.revision | grep -v null | sed 's/"//g')
failing_msg=$(cat <<EOF failing_msg=$(cat <<EOF
This review is > 4 weeks without comment, and failed Jenkins the last This review is > 4 weeks without comment, and failed Jenkins the last
time it was checked. We are abandoning this for now. time it was checked. We are abandoning this for now.
Feel free to reactivate the review by pressing the restore button and Feel free to reactivate the review by pressing the restore button and
leaving a 'recheck' comment to get fresh test results. leaving a 'recheck' comment to get fresh test results.
EOF EOF
 End of changes. 6 change blocks. 
9 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)