From 8f1322445482786b4f1a050829596fcdf87549ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=B9=BF?= Date: Mon, 4 Nov 2024 18:34:06 +0800 Subject: [PATCH] Create llm-code-review.yml --- .github/workflows/llm-code-review.yml | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/llm-code-review.yml diff --git a/.github/workflows/llm-code-review.yml b/.github/workflows/llm-code-review.yml new file mode 100644 index 000000000..ff68219b4 --- /dev/null +++ b/.github/workflows/llm-code-review.yml @@ -0,0 +1,28 @@ +name: LLM Code Review + +permissions: + contents: read + pull-requests: write + +on: + pull_request: + types: [opened, reopened, synchronize] + +jobs: + llm-code-review: + runs-on: ubuntu-latest + steps: + - uses: fit2cloud/LLM-CodeReview-Action@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OPENAI_API_KEY: ${{ secrets.ALIYUN_LLM_API_KEY }} + LANGUAGE: English + OPENAI_API_ENDPOINT: https://dashscope.aliyuncs.com/compatible-mode/v1 + MODEL: qwen2-1.5b-instruct + PROMPT: "Please check the following code differences for any irregularities, potential issues, or optimization suggestions, and provide your answers in English." + top_p: 1 + temperature: 1 + # max_tokens: 10000 + MAX_PATCH_LENGTH: 10000 + IGNORE_PATTERNS: "/node_modules,*.md,/dist,/.github" + FILE_PATTERNS: "*.java,*.go,*.py,*.vue,*.ts,*.js,*.css,*.scss,*.html"