diff --git a/.github/workflows/auto-complete-cicd-review.yml b/.github/workflows/auto-complete-cicd-review.yml index 5949798..4b5f6f8 100644 --- a/.github/workflows/auto-complete-cicd-review.yml +++ b/.github/workflows/auto-complete-cicd-review.yml @@ -163,7 +163,27 @@ jobs: # Check for essential files echo "### Essential Documentation Files:" >> /tmp/review-results/documentation.md for doc in README.md CONTRIBUTING.md LICENSE.md CHANGELOG.md CODE_OF_CONDUCT.md SECURITY.md; do - if [ -f "$doc" ]; then +uto-amazonq-review.properties.json + # 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) echo "✅ $doc ($word_count words)" >> /tmp/review-results/documentation.md else @@ -237,9 +257,37 @@ jobs: fi fi - # Python - if [ -f "requirements.txt" ]; then +uto-amazonq-review.properties.json + # 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 "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 +uto-amazonq-review.properties.json + else +uto-amazonq-review.properties.json + echo "⚠️ Poetry installation failed, skipping Poetry build" +uto-amazonq-review.properties.json + fi +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 # Go