Skip to content

Commit c405a7c

Browse files
authored
Merge pull request #68 from HyperionGray/copilot/complete-ci-cd-review-again
Fix CI/CD workflow false negatives for LICENSE detection and Poetry builds
2 parents 9e26512 + 7b7d3dd commit c405a7c

File tree

1 file changed

+51
-3
lines changed

1 file changed

+51
-3
lines changed

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

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,27 @@ jobs:
163163
# Check for essential files
164164
echo "### Essential Documentation Files:" >> /tmp/review-results/documentation.md
165165
for doc in README.md CONTRIBUTING.md LICENSE.md CHANGELOG.md CODE_OF_CONDUCT.md SECURITY.md; do
166-
if [ -f "$doc" ]; then
166+
uto-amazonq-review.properties.json
167+
# Check for both LICENSE and LICENSE.md
168+
uto-amazonq-review.properties.json
169+
if [ "$doc" = "LICENSE.md" ]; then
170+
uto-amazonq-review.properties.json
171+
if [ -f "LICENSE.md" ] || [ -f "LICENSE" ]; then
172+
uto-amazonq-review.properties.json
173+
license_file=$([ -f "LICENSE.md" ] && echo "LICENSE.md" || echo "LICENSE")
174+
uto-amazonq-review.properties.json
175+
word_count=$(wc -w < "$license_file" 2>/dev/null || echo 0)
176+
uto-amazonq-review.properties.json
177+
echo "✅ LICENSE ($word_count words)" >> /tmp/review-results/documentation.md
178+
uto-amazonq-review.properties.json
179+
else
180+
uto-amazonq-review.properties.json
181+
echo "❌ LICENSE (missing)" >> /tmp/review-results/documentation.md
182+
uto-amazonq-review.properties.json
183+
fi
184+
uto-amazonq-review.properties.json
185+
elif [ -f "$doc" ]; then
186+
uto-amazonq-review.properties.json
167187
word_count=$(wc -w < "$doc" 2>/dev/null || echo 0)
168188
echo "✅ $doc ($word_count words)" >> /tmp/review-results/documentation.md
169189
else
@@ -237,9 +257,37 @@ jobs:
237257
fi
238258
fi
239259
240-
# Python
241-
if [ -f "requirements.txt" ]; then
260+
uto-amazonq-review.properties.json
261+
# Python - Try in order of precedence: Poetry > requirements.txt > setup.py
262+
uto-amazonq-review.properties.json
263+
# This ensures modern Python projects using Poetry are built correctly
264+
uto-amazonq-review.properties.json
265+
# Python - Poetry
266+
uto-amazonq-review.properties.json
267+
if [ -f "pyproject.toml" ] && grep -q 'tool.poetry' pyproject.toml; then
268+
uto-amazonq-review.properties.json
269+
if pip install poetry; then
270+
uto-amazonq-review.properties.json
271+
poetry install && echo "BUILD_SUCCESS=true" >> $GITHUB_OUTPUT
272+
uto-amazonq-review.properties.json
273+
else
274+
uto-amazonq-review.properties.json
275+
echo "⚠️ Poetry installation failed, skipping Poetry build"
276+
uto-amazonq-review.properties.json
277+
fi
278+
uto-amazonq-review.properties.json
279+
# Python - requirements.txt
280+
uto-amazonq-review.properties.json
281+
elif [ -f "requirements.txt" ]; then
282+
uto-amazonq-review.properties.json
242283
pip install -r requirements.txt && echo "BUILD_SUCCESS=true" >> $GITHUB_OUTPUT
284+
uto-amazonq-review.properties.json
285+
# Python - setup.py
286+
uto-amazonq-review.properties.json
287+
elif [ -f "setup.py" ]; then
288+
uto-amazonq-review.properties.json
289+
pip install -e . && echo "BUILD_SUCCESS=true" >> $GITHUB_OUTPUT
290+
uto-amazonq-review.properties.json
243291
fi
244292

245293
# Go

0 commit comments

Comments
 (0)