You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for module in $(git diff --name-only | grep -E '^packages/(@aws-cdk|aws-cdk-lib)/.*' | sed -E 's|^packages/(@aws-cdk\|aws-cdk-lib)/([^/]+).*|\2|' | sort -u); do
61
-
echo "=== Processing module: $module ==="
62
-
moduleName=$(basename $module)
63
-
echo "Module name: $moduleName"
60
+
for module in $(git diff --name-only | grep -E '^packages/(@aws-cdk|aws-cdk-lib)/.*' | sed -E 's|^packages/(@aws-cdk\|aws-cdk-lib)/([^/]+).*|\2|' | sort -u); do
61
+
echo "=== Processing module: $module ==="
62
+
moduleName=$(basename $module)
63
+
echo "Module name: $moduleName"
64
64
65
-
# Reset to clean state
66
-
echo "Resetting to clean state..."
67
-
git reset --hard HEAD
68
-
git clean -fd
65
+
# Reset to clean state
66
+
echo "Resetting to clean state..."
67
+
git reset --hard HEAD
68
+
git clean -fd
69
69
70
-
# Determine the correct path for the module
71
-
echo "Determining module path..."
72
-
if [[ -d "packages/aws-cdk-lib/$module" ]]; then
73
-
modulePath="packages/aws-cdk-lib/$module"
74
-
echo "Found module in aws-cdk-lib: $modulePath"
75
-
elif [[ -d "packages/@aws-cdk/$module" ]]; then
76
-
modulePath="packages/@aws-cdk/$module"
77
-
echo "Found module in @aws-cdk: $modulePath"
78
-
else
79
-
echo "ERROR: Cannot find module directory for $module"
80
-
continue
81
-
fi
70
+
# Determine the correct path for the module
71
+
echo "Determining module path..."
72
+
if [[ -d "packages/aws-cdk-lib/$module" ]]; then
73
+
modulePath="packages/aws-cdk-lib/$module"
74
+
echo "Found module in aws-cdk-lib: $modulePath"
75
+
elif [[ -d "packages/@aws-cdk/$module" ]]; then
76
+
modulePath="packages/@aws-cdk/$module"
77
+
echo "Found module in @aws-cdk: $modulePath"
78
+
else
79
+
echo "ERROR: Cannot find module directory for $module"
80
+
continue
81
+
fi
82
82
83
-
# Check for existing PR with the same name
84
-
prExists=$(gh pr list --state open --search "chore(${moduleName#aws-}): add new enum values for ${moduleName#aws-}" --json number,title -q '.[].number')
83
+
# Check for existing PR with the same name
84
+
prExists=$(gh pr list --state open --search "chore(${moduleName#aws-}): add new enum values for ${moduleName#aws-}" --json number,title -q '.[].number')
85
85
86
-
# If a PR exists, close it
87
-
if [[ -n "$prExists" ]]; then
88
-
echo "Found existing PR #$prExists for module ${moduleName#aws-}, closing it..."
89
-
gh pr close "$prExists" --confirm
90
-
else
91
-
echo "No existing PR found for ${moduleName#aws-}"
92
-
fi
86
+
# If a PR exists, close it
87
+
if [[ -n "$prExists" ]]; then
88
+
echo "Found existing PR #$prExists for module ${moduleName#aws-}, closing it..."
89
+
gh pr close "$prExists" --confirm
90
+
else
91
+
echo "No existing PR found for ${moduleName#aws-}"
0 commit comments