impl_code_review #1
32
.github/workflows/code-review.yml
vendored
Normal file
32
.github/workflows/code-review.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Code Review
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
review:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install requests py-gitea
|
||||
|
||||
- name: Run Code Review
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
CLAUDE_API_KEY: ${{ secrets.CLAUDE_API_KEY }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
run: python .github/scripts/code_review.py
|
||||
21
.github/workflows/test.yml
vendored
Normal file
21
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Test action
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
review:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- name: Run Code Review
|
||||
run: python .github/scripts/test.py
|
||||
@@ -1,12 +0,0 @@
|
||||
steps:
|
||||
print_branch:
|
||||
image: alpine:latest
|
||||
secrets:
|
||||
- OPENAI_API
|
||||
commands:
|
||||
- |
|
||||
echo "Current branch: ${CI_COMMIT_BRANCH}"
|
||||
echo "OPENAI_API: ${OPENAI_API}"
|
||||
when:
|
||||
event: [push, pull_request]
|
||||
branch: main
|
||||
Reference in New Issue
Block a user