Skip to content

ING 리스트 항목에 날짜 추가 #40

ING 리스트 항목에 날짜 추가

ING 리스트 항목에 날짜 추가 #40

name: AI Code Review & Auto-Documentation
on:
push:
branches:
- main
- master
paths:
- '**.py'
- '**.md'
permissions:
contents: write
jobs:
ai-review:
# 무한 루프 방지: AI가 커밋한 내용은 트리거하지 않음
if: "!contains(github.event.head_commit.message, '[AI Review]')"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2 # 변경 사항 감지를 위해 이전 커밋 필요
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install google-genai
- name: Run AI Reviewer Script
env:
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
run: |
python .github/scripts/code_review.py
- name: Commit and Push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# 변경 사항이 있을 때만 커밋
if [[ -n $(git status -s) ]]; then
git add .
git commit -m "[AI Review] Auto-generated comments and docs [skip ci]"
git push
else
echo "No changes to commit."
fi