From 9ba6348b9c4e85fc8ca42bb0409bc3e84f8081ed Mon Sep 17 00:00:00 2001 From: Myeongseon Choi Date: Fri, 13 Dec 2024 11:11:06 +0900 Subject: [PATCH 1/3] remove woodpecker ci --- .woodpecker.yml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 .woodpecker.yml 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 -- 2.49.1 From 6ec68928828d1b696dda838041a0effdcbfb793c Mon Sep 17 00:00:00 2001 From: Myeongseon Choi Date: Fri, 13 Dec 2024 11:11:20 +0900 Subject: [PATCH 2/3] add workflow --- .github/workflows/code-review.yml | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/code-review.yml 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 -- 2.49.1 From a2e20d21d58a946bb17a723411958a5413a99996 Mon Sep 17 00:00:00 2001 From: Myeongseon Choi Date: Tue, 31 Dec 2024 00:46:25 +0900 Subject: [PATCH 3/3] add test python --- .github/workflows/test.yml | 21 +++++++++++++++++++++ test.py | 8 ++++++++ 2 files changed, 29 insertions(+) create mode 100644 .github/workflows/test.yml create mode 100644 test.py 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/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", +) + + -- 2.49.1