skip-ai-rewview condition
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
mitch 2026-07-08 16:55:35 -07:00
parent 5cb61bcd6c
commit 0a0a410031

View File

@ -5,11 +5,62 @@ steps:
# commands:
# - echo "Woodpecker is working!"
# PHP構文チェック
# PHP構文チェックmerge前
php-lint:
image: php:8.3-cli
commands:
- find . -name "*.php" -print0 | xargs -0 -n1 php -l
when:
event:
- pull_request
# AI コードレビューskip-ai-review ラベル付き PR はスキップ)
ai-review:
image: ghcr.io/slb350/drep:latest
environment:
GITEA_TOKEN:
from_secret: gitea_token
DREP_LLM_API_KEY:
from_secret: drep_llm_api_key
OPENAI_API_KEY:
from_secret: drep_llm_api_key
DREP_LLM_ENDPOINT: https://openrouter.ai/api/v1
DREP_LLM_MODEL: nvidia/nemotron-3-ultra-550b-a55b:free
commands:
- |
case ",${CI_COMMIT_PULL_REQUEST_LABELS}," in
*",skip-ai-review,"*)
echo "skip-ai-review label detected — skipping AI review"
exit 0
;;
esac
cat > /tmp/config.yaml <<EOF
gitea:
url: https://gitea.mitchecp.com
token: ${GITEA_TOKEN}
repositories:
- ${CI_REPO_OWNER}/*
llm:
enabled: true
endpoint: ${DREP_LLM_ENDPOINT}
api_key: ${DREP_LLM_API_KEY}
model: ${DREP_LLM_MODEL}
temperature: 0.2
timeout: 120
max_tokens: 4096
database_url: sqlite:////tmp/drep.db
documentation:
enabled: true
markdown_checks: false
EOF
export DREP_CONFIG=/tmp/config.yaml
echo "Running drep review for ${CI_REPO} PR #${CI_COMMIT_PULL_REQUEST}"
drep review "${CI_REPO}" "${CI_COMMIT_PULL_REQUEST}"
when:
event:
- pull_request
# 本番デプロイ
deploy: