Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 45 additions & 3 deletions .github/workflows/auto-complete-cicd-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,25 @@ uto-amazonq-review.properties.json
uto-amazonq-review.properties.json
for doc in README.md CONTRIBUTING.md LICENSE.md CHANGELOG.md CODE_OF_CONDUCT.md SECURITY.md; do
uto-amazonq-review.properties.json
if [ -f "$doc" ]; then
# Check for both LICENSE and LICENSE.md
uto-amazonq-review.properties.json
if [ "$doc" = "LICENSE.md" ]; then
uto-amazonq-review.properties.json
if [ -f "LICENSE.md" ] || [ -f "LICENSE" ]; then
uto-amazonq-review.properties.json
license_file=$([ -f "LICENSE.md" ] && echo "LICENSE.md" || echo "LICENSE")
uto-amazonq-review.properties.json
word_count=$(wc -w < "$license_file" 2>/dev/null || echo 0)
uto-amazonq-review.properties.json
echo "✅ LICENSE ($word_count words)" >> /tmp/review-results/documentation.md
uto-amazonq-review.properties.json
else
uto-amazonq-review.properties.json
echo "❌ LICENSE (missing)" >> /tmp/review-results/documentation.md
uto-amazonq-review.properties.json
fi
uto-amazonq-review.properties.json
elif [ -f "$doc" ]; then
uto-amazonq-review.properties.json
word_count=$(wc -w < "$doc" 2>/dev/null || echo 0)
uto-amazonq-review.properties.json
Expand Down Expand Up @@ -476,11 +494,35 @@ uto-amazonq-review.properties.json
uto-amazonq-review.properties.json

uto-amazonq-review.properties.json
# Python
# Python - Try in order of precedence: Poetry > requirements.txt > setup.py
uto-amazonq-review.properties.json
# This ensures modern Python projects using Poetry are built correctly
uto-amazonq-review.properties.json
# Python - Poetry
uto-amazonq-review.properties.json
if [ -f "requirements.txt" ]; then
if [ -f "pyproject.toml" ] && grep -q 'tool.poetry' pyproject.toml; then
uto-amazonq-review.properties.json
if pip install poetry; then
uto-amazonq-review.properties.json
poetry install && echo "BUILD_SUCCESS=true" >> $GITHUB_OUTPUT
Comment on lines +503 to +507

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fall back when Poetry install fails

In the build step, once pyproject.toml contains tool.poetry, this branch always executes; if pip install poetry fails (e.g., transient PyPI/network issues or a constrained runner), the script only logs a warning and never reaches the requirements.txt or setup.py branches because the outer if already matched. Repos that ship both Poetry metadata and a requirements.txt fallback will now be reported as BUILD_SUCCESS=false even though the requirements-based build could still succeed, which is a regression compared to the prior behavior.

Useful? React with 👍 / 👎.

uto-amazonq-review.properties.json
else
uto-amazonq-review.properties.json
echo "⚠️ Poetry installation failed, skipping Poetry build"
uto-amazonq-review.properties.json
fi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Poetry failure prevents fallback to alternative build methods

Low Severity

When pyproject.toml with tool.poetry is detected but Poetry installation fails (line 505), the code prints a warning and exits the block, but the elif structure means requirements.txt and setup.py fallbacks are never attempted. For repositories that have both Poetry configuration and requirements.txt as backup, if pip install poetry fails due to environment constraints, BUILD_SUCCESS remains false even though the fallback could have worked. This could cause the same type of false negatives the PR aims to fix.

Additional Locations (1)

Fix in Cursor Fix in Web

uto-amazonq-review.properties.json
# Python - requirements.txt
uto-amazonq-review.properties.json
elif [ -f "requirements.txt" ]; then
uto-amazonq-review.properties.json
pip install -r requirements.txt && echo "BUILD_SUCCESS=true" >> $GITHUB_OUTPUT
uto-amazonq-review.properties.json
# Python - setup.py
uto-amazonq-review.properties.json
elif [ -f "setup.py" ]; then
uto-amazonq-review.properties.json
pip install -e . && echo "BUILD_SUCCESS=true" >> $GITHUB_OUTPUT
uto-amazonq-review.properties.json
fi
uto-amazonq-review.properties.json
Expand Down