-
Notifications
You must be signed in to change notification settings - Fork 7
65 lines (56 loc) · 2.09 KB
/
Copy pathstemcode-review.yml
File metadata and controls
65 lines (56 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: stemcode-review
# on:
# pull_request_target:
# types:
# - opened
# - reopened
# - review_requested
# - synchronize
# - ready_for_review
concurrency:
group: stemcode-review-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: false
permissions:
contents: read
issues: write
pull-requests: write
env:
GH_TOKEN: ${{ github.token }}
STEMCODE_API_KEY: ${{ secrets.STEMCODE_API_KEY }}
STEMCODE_BASE_URL: ${{ vars.STEMCODE_BASE_URL }}
STEMCODE_MODEL: ${{ vars.STEMCODE_MODEL || 'gpt-5.4' }}
STEMCODE_PROVIDER: ${{ vars.STEMCODE_PROVIDER || 'openai' }}
STEMCODE_THINKING: ${{ vars.STEMCODE_THINKING || 'off' }}
jobs:
review:
name: stemcode review
runs-on: ubuntu-24.04
environment: production-release
if: ${{ github.event_name != 'pull_request_target' || github.event.pull_request.draft == false }}
steps:
- name: Checkout trusted code
uses: actions/checkout@v5
with:
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.base.sha || github.sha }}
fetch-depth: 0
- name: Install stemcode
run: |
curl -fsSL https://raw.githubusercontent.com/rizwan3d/StemCode/master/scripts/install.sh | bash
- name: Review pull request
if: ${{ github.event_name == 'pull_request_target' }}
env:
stemcode_REVIEW_MODE: pr
stemcode_PR_NUMBER: ${{ github.event.pull_request.number }}
stemcode_BASE_SHA: ${{ github.event.pull_request.base.sha }}
stemcode_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
stemcode_HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }}
stemcode_HEAD_REPO_URL: ${{ github.event.pull_request.head.repo.clone_url }}
run: bash .github/stemcode-github-review.sh
- name: Upload review artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: stemcode-review
path: artifacts/stemcode-review
if-no-files-found: ignore
retention-days: 14