Created
April 20, 2021 00:59
-
-
Save askb/2bcb62c1b9e613314bb8229124464c22 to your computer and use it in GitHub Desktop.
script checks for most recent/latest commit in all branches/refs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# SPDX-License-Identifier: EPL-1.0 | |
############################################################################## | |
# Copyright (c) 2017 The Linux Foundation and others. | |
# | |
# All rights reserved. This program and the accompanying materials | |
# are made available under the terms of the Eclipse Public License v1.0 | |
# which accompanies this distribution, and is available at | |
# http://www.eclipse.org/legal/epl-v10.html | |
############################################################################### | |
# This script checks for most recent/latest commit in all branches/refs. | |
echo "---> projects-archival-candidate.sh" | |
git clone --quiet ssh://[email protected]:29418/releng/builder > /dev/null; | |
for p in $(ssh -p 29418 [email protected] gerrit ls-projects --state active); | |
do | |
[[ "$p" =~ .*releng.* ]] && continue | |
[[ "$p" =~ .*integration.* ]] && continue | |
[[ "$p" =~ .*All-Projects.* ]] && continue | |
[[ "$p" =~ .*All-Users.* ]] && continue for d in $(find builder/jjb -type d); | |
do | |
if [[ "$p" == ""${d#builder/jjb/}"" ]]; then | |
echo "### $p:"; | |
git clone --quiet ssh://[email protected]:29418/"$p" > /dev/null; | |
cd "$p"; | |
git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))' | |
cd .. | |
break | |
fi | |
continue | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment