diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml new file mode 100644 index 0000000..8047d78 --- /dev/null +++ b/.github/workflows/code-review.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1b1202f --- /dev/null +++ b/.github/workflows/test.yml @@ -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 diff --git a/.woodpecker.yml b/.woodpecker.yml deleted file mode 100644 index e84bc55..0000000 --- a/.woodpecker.yml +++ /dev/null @@ -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 diff --git a/test.py b/test.py new file mode 100644 index 0000000..ea80048 --- /dev/null +++ b/test.py @@ -0,0 +1,8 @@ +from gitea import Gitea + +g = Gitea( + "https://git.teahaven.kr", + "735a1106653ce9a63ca80667f32e93221427fecc", +) + +