Skip to content

Commit ffcf769

Browse files
Copilothyp3ri0n-ng
andcommitted
Fix CI/CD workflow to properly detect LICENSE and Poetry builds
Co-authored-by: hyp3ri0n-ng <3106718+hyp3ri0n-ng@users.noreply.github.com>
1 parent cc6c410 commit ffcf769

File tree

1 file changed

+35
-3
lines changed

1 file changed

+35
-3
lines changed

.github/workflows/auto-complete-cicd-review.yml

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,25 @@ uto-amazonq-review.properties.json
328328
uto-amazonq-review.properties.json
329329
for doc in README.md CONTRIBUTING.md LICENSE.md CHANGELOG.md CODE_OF_CONDUCT.md SECURITY.md; do
330330
uto-amazonq-review.properties.json
331-
if [ -f "$doc" ]; then
331+
# Check for both LICENSE and LICENSE.md
332+
uto-amazonq-review.properties.json
333+
if [ "$doc" = "LICENSE.md" ]; then
334+
uto-amazonq-review.properties.json
335+
if [ -f "LICENSE.md" ] || [ -f "LICENSE" ]; then
336+
uto-amazonq-review.properties.json
337+
license_file=$([ -f "LICENSE.md" ] && echo "LICENSE.md" || echo "LICENSE")
338+
uto-amazonq-review.properties.json
339+
word_count=$(wc -w < "$license_file" 2>/dev/null || echo 0)
340+
uto-amazonq-review.properties.json
341+
echo "✅ LICENSE ($word_count words)" >> /tmp/review-results/documentation.md
342+
uto-amazonq-review.properties.json
343+
else
344+
uto-amazonq-review.properties.json
345+
echo "❌ LICENSE (missing)" >> /tmp/review-results/documentation.md
346+
uto-amazonq-review.properties.json
347+
fi
348+
uto-amazonq-review.properties.json
349+
elif [ -f "$doc" ]; then
332350
uto-amazonq-review.properties.json
333351
word_count=$(wc -w < "$doc" 2>/dev/null || echo 0)
334352
uto-amazonq-review.properties.json
@@ -476,11 +494,25 @@ uto-amazonq-review.properties.json
476494
uto-amazonq-review.properties.json
477495

478496
uto-amazonq-review.properties.json
479-
# Python
497+
# Python - Poetry
498+
uto-amazonq-review.properties.json
499+
if [ -f "pyproject.toml" ] && grep -q 'tool.poetry' pyproject.toml; then
500+
uto-amazonq-review.properties.json
501+
pip install poetry || true
502+
uto-amazonq-review.properties.json
503+
poetry install && echo "BUILD_SUCCESS=true" >> $GITHUB_OUTPUT
480504
uto-amazonq-review.properties.json
481-
if [ -f "requirements.txt" ]; then
505+
# Python - requirements.txt
506+
uto-amazonq-review.properties.json
507+
elif [ -f "requirements.txt" ]; then
482508
uto-amazonq-review.properties.json
483509
pip install -r requirements.txt && echo "BUILD_SUCCESS=true" >> $GITHUB_OUTPUT
510+
uto-amazonq-review.properties.json
511+
# Python - setup.py
512+
uto-amazonq-review.properties.json
513+
elif [ -f "setup.py" ]; then
514+
uto-amazonq-review.properties.json
515+
pip install -e . && echo "BUILD_SUCCESS=true" >> $GITHUB_OUTPUT
484516
uto-amazonq-review.properties.json
485517
fi
486518
uto-amazonq-review.properties.json

0 commit comments

Comments
 (0)