|
1 | | -name: Автоматическое ревью PR с Mistral AI |
| 1 | +# name: Автоматическое ревью PR с Mistral AI |
2 | 2 |
|
3 | | -on: |
4 | | - pull_request: |
5 | | - types: [opened, synchronize] |
6 | | - branches: |
7 | | - - main |
| 3 | +# on: |
| 4 | +# pull_request: |
| 5 | +# types: [opened, synchronize] |
| 6 | +# branches: |
| 7 | +# - main |
8 | 8 |
|
9 | | -jobs: |
10 | | - code_review: |
11 | | - runs-on: ubuntu-latest |
12 | | - name: Mistral AI Code Review |
13 | | - permissions: |
14 | | - contents: read |
15 | | - pull-requests: write |
16 | | - steps: |
17 | | - - name: Debug Trigger Event |
18 | | - run: | |
19 | | - echo "Event name: ${{ github.event_name }}" |
20 | | - echo "Event action: ${{ github.event.action }}" |
21 | | - echo "PR number: ${{ github.event.pull_request.number }}" |
22 | | - echo "Base branch: ${{ github.event.pull_request.base.ref }}" |
23 | | - echo "Head branch: ${{ github.event.pull_request.head.ref }}" |
24 | | - echo "Base SHA: ${{ github.event.pull_request.base.sha }}" |
25 | | - echo "Head SHA: ${{ github.event.pull_request.head.sha }}" |
| 9 | +# jobs: |
| 10 | +# code_review: |
| 11 | +# runs-on: ubuntu-latest |
| 12 | +# name: Mistral AI Code Review |
| 13 | +# permissions: |
| 14 | +# contents: read |
| 15 | +# pull-requests: write |
| 16 | +# steps: |
| 17 | +# - name: Debug Trigger Event |
| 18 | +# run: | |
| 19 | +# echo "Event name: ${{ github.event_name }}" |
| 20 | +# echo "Event action: ${{ github.event.action }}" |
| 21 | +# echo "PR number: ${{ github.event.pull_request.number }}" |
| 22 | +# echo "Base branch: ${{ github.event.pull_request.base.ref }}" |
| 23 | +# echo "Head branch: ${{ github.event.pull_request.head.ref }}" |
| 24 | +# echo "Base SHA: ${{ github.event.pull_request.base.sha }}" |
| 25 | +# echo "Head SHA: ${{ github.event.pull_request.head.sha }}" |
26 | 26 |
|
27 | | - - name: Checkout Repository |
28 | | - uses: actions/checkout@v3 |
29 | | - with: |
30 | | - fetch-depth: 0 # Получаем полную историю для сравнения изменений |
| 27 | +# - name: Checkout Repository |
| 28 | +# uses: actions/checkout@v3 |
| 29 | +# with: |
| 30 | +# fetch-depth: 0 # Получаем полную историю для сравнения изменений |
31 | 31 |
|
32 | | - - name: Install Python |
33 | | - uses: actions/setup-python@v4 |
34 | | - with: |
35 | | - python-version: '3.10' |
| 32 | +# - name: Install Python |
| 33 | +# uses: actions/setup-python@v4 |
| 34 | +# with: |
| 35 | +# python-version: '3.10' |
36 | 36 |
|
37 | | - - name: Install dependencies |
38 | | - run: | |
39 | | - python -m pip install --upgrade pip |
40 | | - pip install requests mistralai==0.4.2 |
| 37 | +# - name: Install dependencies |
| 38 | +# run: | |
| 39 | +# python -m pip install --upgrade pip |
| 40 | +# pip install requests mistralai==0.4.2 |
41 | 41 |
|
42 | | - - name: Check for MISTRAL_API_KEY |
43 | | - run: | |
44 | | - if [ -z "${{ secrets.MISTRAL_API_KEY }}" ]; then |
45 | | - echo "⚠️ MISTRAL_API_KEY is not set or empty" |
46 | | - exit 1 |
47 | | - else |
48 | | - echo "✅ MISTRAL_API_KEY is set" |
49 | | - fi |
| 42 | +# - name: Check for MISTRAL_API_KEY |
| 43 | +# run: | |
| 44 | +# if [ -z "${{ secrets.MISTRAL_API_KEY }}" ]; then |
| 45 | +# echo "⚠️ MISTRAL_API_KEY is not set or empty" |
| 46 | +# exit 1 |
| 47 | +# else |
| 48 | +# echo "✅ MISTRAL_API_KEY is set" |
| 49 | +# fi |
50 | 50 |
|
51 | | - - name: Mistral AI Code Review |
52 | | - run: python .github/workflows/review_code.py |
53 | | - env: |
54 | | - MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }} |
55 | | - PR_NUMBER: ${{ github.event.pull_request.number }} |
56 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
57 | | - BASE_SHA: ${{ github.event.pull_request.base.sha }} |
58 | | - HEAD_SHA: ${{ github.event.pull_request.head.sha }} |
59 | | - GITHUB_REPOSITORY: ${{ github.repository }} |
| 51 | +# - name: Mistral AI Code Review |
| 52 | +# run: python .github/workflows/review_code.py |
| 53 | +# env: |
| 54 | +# MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }} |
| 55 | +# PR_NUMBER: ${{ github.event.pull_request.number }} |
| 56 | +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 57 | +# BASE_SHA: ${{ github.event.pull_request.base.sha }} |
| 58 | +# HEAD_SHA: ${{ github.event.pull_request.head.sha }} |
| 59 | +# GITHUB_REPOSITORY: ${{ github.repository }} |
0 commit comments