[tool] Do not add reviewer to patch for unmaintained
Unmainained branches are not maintained by project teams, thus, they don't need PTL or release liaison approval. So let's not spam them. These patches are usually the patches where we move an unmaintained branch to End of Life. As we don't release anything out of a branch in unmaintained state. Change-Id: Ifac8392296a738d462070bd2bbf9f97c597369b6 Signed-off-by: Előd Illés <elod.illes@est.tech>
This commit is contained in:
@@ -26,6 +26,15 @@ function usage {
|
||||
echo "Example: $0 ussuri-c-w-i # Adds reviewers for a specific topic"
|
||||
}
|
||||
|
||||
function get_series_from_path {
|
||||
local path=$1
|
||||
if [[ $path =~ ^deliverables/([^/]+)/.*yaml$ ]]; then
|
||||
series="${BASH_REMATCH[1]}"
|
||||
else
|
||||
series=""
|
||||
fi
|
||||
}
|
||||
|
||||
# Validate topic was provided
|
||||
if [ $# -gt 1 ]; then
|
||||
usage
|
||||
@@ -45,6 +54,8 @@ if [[ -z "$VIRTUAL_ENV" ]]; then
|
||||
source ./.tox/venv/bin/activate
|
||||
fi
|
||||
|
||||
UNMAINTAINED=$(list-eom-series)
|
||||
|
||||
# Make sure we have a gerrit user for authenticated commands
|
||||
GERRIT_ID=${GERRIT_USER}
|
||||
if [[ -z "$GERRIT_ID" ]]; then
|
||||
@@ -78,6 +89,10 @@ for review in $reviews; do
|
||||
|
||||
# Extract the owning teams for each deliverable in this patch
|
||||
for file in $deliverable_files; do
|
||||
get_series_from_path $file
|
||||
if [[ $UNMAINTAINED =~ $series ]]; then
|
||||
continue
|
||||
fi
|
||||
team=$(grep team $file | sed 's/team: //g')
|
||||
if [[ "$team" == "$last_team" ]]; then
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user