Compare commits

..

3 Commits

2 changed files with 29 additions and 9 deletions
+2 -2
View File
@@ -33,8 +33,8 @@ jobs:
- name: AI Code Review
uses: https://gitea.jsc.idv.tw/jiantw83/code-review@v${{ needs.version.outputs.version }}
with:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_BASE_URL: https://openrouter.ai/api/v1
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
GEMINI_BASE_URL: https://generativelanguage.googleapis.com/v1beta
permissions:
contents: write
pull-requests: write
+27 -7
View File
@@ -28,7 +28,7 @@
2.`.gitea/workflows` 資料夾中建立 `ai-review.yaml'
3.`ai-review.yaml` 中填入以下內容(選擇一個使用)
### 1. OpenAIOpenRouter
### 1. OpenAI
```yaml
name: AI
on:
@@ -42,9 +42,29 @@ jobs:
- name: AI Code Review
uses: https://gitea.jsc.idv.tw/jiantw83/code-review@${{ vars.ACTION_CODE_REVIEW_VERSION }}
with:
# Github (h3285@evertrust.com.tw)
# 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
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_BASE_URL: https://api.openai.com/v1
permissions:
contents: write
pull-requests: write
issues: write
```
### 2. OpenRouter
```yaml
name: AI
on:
pull_request:
types: [opened, synchronize]
jobs:
code-review:
name: 'Code Review'
runs-on: ubuntu
steps:
- name: AI Code Review
uses: https://gitea.jsc.idv.tw/jiantw83/code-review@${{ vars.ACTION_CODE_REVIEW_VERSION }}
with:
OPENAI_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
OPENAI_BASE_URL: https://openrouter.ai/api/v1
permissions:
contents: write
@@ -52,7 +72,7 @@ jobs:
issues: write
```
### 2. Anthropic Claude
### 3. Anthropic Claude
```yaml
name: AI
on:
@@ -74,7 +94,7 @@ jobs:
issues: write
```
### 3. Google Gemini
### 4. Google Gemini
```yaml
name: AI
on:
@@ -96,7 +116,7 @@ jobs:
issues: write
```
### 4. Amazon Q
### 5. Amazon Q
```yaml
name: AI
on:
@@ -118,7 +138,7 @@ jobs:
issues: write
```
### 5. SonarQube
### 6. SonarQube
```yaml
name: AI
on: