fix: address AI review findings for CI pipeline and duplicate detection
- Fix anti-pattern regex 2 to match quoted form '"$CI_STATE" != "success"' (was r'\$CI_STATE\s*!=\s*"success"', now r'"?\$CI_STATE"?\s*!=\s*"success"') - Update both anti-pattern messages to say 'extract ci_passed() to lib/' instead of implying it already exists as a shared helper in dev-poll.sh - Add explicit 'when: event: [push, pull_request]' trigger block to ci.yml - Add '-r' to xargs in shellcheck step to handle zero .sh files gracefully - Fix operator precedence bug in review-poll.sh:62: scope the OR clause with braces so CI_STATE=pending bypass only applies when WOODPECKER_REPO_ID=0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ee1af38390
commit
f541bcb073
3 changed files with 8 additions and 5 deletions
|
|
@ -59,7 +59,7 @@ while IFS= read -r line; do
|
|||
# Skip if CI is running/failed. Allow "success" or no CI configured (empty/pending with no pipelines)
|
||||
if [ "$CI_STATE" != "success" ]; then
|
||||
# Projects without CI (woodpecker_repo_id=0) treat empty/pending as pass
|
||||
if [ "${WOODPECKER_REPO_ID:-2}" = "0" ] && [ "$CI_STATE" = "" ] || [ "$CI_STATE" = "pending" ]; then
|
||||
if [ "${WOODPECKER_REPO_ID:-2}" = "0" ] && { [ "$CI_STATE" = "" ] || [ "$CI_STATE" = "pending" ]; }; then
|
||||
: # no CI configured, proceed to review
|
||||
else
|
||||
log " #${PR_NUM} CI=${CI_STATE}, skip"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue