diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d44f815..fb942f9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: CI on: pull_request: - branches: [main] + branches: [main, develop] jobs: build: @@ -17,13 +17,18 @@ jobs: with: node-version: '18.18.2' - - name: pnpm 설치중.. - run: npm install -g pnpm - - name: 종속성 설치중... - run: pnpm install + run: npm install working-directory: ./fe - name: 빌드 중.. - run: pnpm build + run: npm run build working-directory: ./fe + + # - name: 테스트 실행 중.. + # run: npm run test + # working-directory: ./fe + + # - name: 코드 린트 체크 중.. + # run: npm run lint + # working-directory: ./fe diff --git a/.github/workflows/cr.yml b/.github/workflows/cr.yml new file mode 100644 index 0000000..06504fd --- /dev/null +++ b/.github/workflows/cr.yml @@ -0,0 +1,28 @@ +name: Code Review + +permissions: + contents: read + pull-requests: write + +on: + pull_request: + types: [opened, reopened] + +jobs: + test: + # if: ${{ contains(github.event.*.labels.*.name, 'gpt review') }} # Optional; to run only when a label is attached + runs-on: ubuntu-latest + steps: + - uses: anc95/ChatGPT-CodeReview@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + # Optional + LANGUAGE: Korean # default: English + OPENAI_API_ENDPOINT: https://api.openai.com/v1 + MODEL: "gpt-4o-mini" # https://platform.openai.com/docs/models + PROMPT: "code review please" # https://platform.openai.com/docs/api-reference/chat/create#chat/create-prompt + top_p: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-top_p + temperature: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-temperature + max_tokens: 10000 + MAX_PATCH_LENGTH: 10000 # if the patch/diff length is large than MAX_PATCH_LENGTH, will be ignored and won't review. By default, with no MAX_PATCH_LENGTH set, there is also no limit for the patch/diff length.