Skip to content

Commit 4050d85

Browse files
committed
403 에러 재시도 로직, Rate Limit 고려
1 parent adb6701 commit 4050d85

1 file changed

Lines changed: 84 additions & 4 deletions

File tree

.github/workflows/ai-review.yml

Lines changed: 84 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,90 @@ jobs:
1010
permissions:
1111
contents: write
1212
steps:
13-
- uses: choam2426/AI-Algorithm-Mentor@v5
13+
- name: AI Review (Attempt 1)
14+
id: attempt1
15+
continue-on-error: true
16+
uses: choam2426/AI-Algorithm-Mentor@v5
1417
with:
1518
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16-
LLM_PROVIDER: google # openai, google, anthropic
17-
MODEL_NAME: gemini-3-pro-preview # 모델명 (선택사항)
19+
LLM_PROVIDER: google
20+
MODEL_NAME: gemini-3-pro-preview
1821
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
19-
REVIEW_LANGUAGE: korean # korean, english, etc..
22+
REVIEW_LANGUAGE: korean
23+
24+
- name: Wait before retry (10초)
25+
if: steps.attempt1.outcome == 'failure'
26+
run: |
27+
echo "재시도 대기 중... (10초)"
28+
sleep 10
29+
30+
- name: AI Review (Attempt 2)
31+
id: attempt2
32+
if: steps.attempt1.outcome == 'failure'
33+
continue-on-error: true
34+
uses: choam2426/AI-Algorithm-Mentor@v5
35+
with:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
LLM_PROVIDER: google
38+
MODEL_NAME: gemini-3-pro-preview
39+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
40+
REVIEW_LANGUAGE: korean
41+
42+
- name: Wait before retry (15초)
43+
if: steps.attempt2.outcome == 'failure'
44+
run: |
45+
echo "재시도 대기 중... (15초)"
46+
sleep 15
47+
48+
- name: AI Review (Attempt 3)
49+
id: attempt3
50+
if: steps.attempt2.outcome == 'failure'
51+
continue-on-error: true
52+
uses: choam2426/AI-Algorithm-Mentor@v5
53+
with:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
LLM_PROVIDER: google
56+
MODEL_NAME: gemini-3-pro-preview
57+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
58+
REVIEW_LANGUAGE: korean
59+
60+
- name: Wait before retry (20초)
61+
if: steps.attempt3.outcome == 'failure'
62+
run: |
63+
echo "재시도 대기 중... (20초)"
64+
sleep 20
65+
66+
- name: AI Review (Attempt 4)
67+
id: attempt4
68+
if: steps.attempt3.outcome == 'failure'
69+
continue-on-error: true
70+
uses: choam2426/AI-Algorithm-Mentor@v5
71+
with:
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
LLM_PROVIDER: google
74+
MODEL_NAME: gemini-3-pro-preview
75+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
76+
REVIEW_LANGUAGE: korean
77+
78+
- name: Wait before retry (30초)
79+
if: steps.attempt4.outcome == 'failure'
80+
run: |
81+
echo "재시도 대기 중... (30초)"
82+
sleep 30
83+
84+
- name: AI Review (Attempt 5)
85+
id: attempt5
86+
if: steps.attempt4.outcome == 'failure'
87+
uses: choam2426/AI-Algorithm-Mentor@v5
88+
with:
89+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90+
LLM_PROVIDER: google
91+
MODEL_NAME: gemini-3-pro-preview
92+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
93+
REVIEW_LANGUAGE: korean
94+
95+
- name: Check if all attempts failed
96+
if: steps.attempt5.outcome == 'failure'
97+
run: |
98+
echo "::error::모든 AI 리뷰 시도가 실패했습니다 (5회 시도)"
99+
exit 1

0 commit comments

Comments
 (0)