From 0546c8f5600229d8f7fa202fcff4f9568b3f8115 Mon Sep 17 00:00:00 2001 From: suwonthugger <127329855+suwonthugger@users.noreply.github.com> Date: Thu, 17 Oct 2024 02:07:08 +0900 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20github=20action=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20(#206)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/auto-assign.yml | 25 +++++++++++++++++++++++++ .github/workflows/gpt-review.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .github/workflows/auto-assign.yml create mode 100644 .github/workflows/gpt-review.yml diff --git a/.github/workflows/auto-assign.yml b/.github/workflows/auto-assign.yml new file mode 100644 index 00000000..a02a57ac --- /dev/null +++ b/.github/workflows/auto-assign.yml @@ -0,0 +1,25 @@ +name: Auto Assign PR Author + +on: + pull_request: + types: [opened] + +jobs: + auto-assign: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install GitHub CLI + run: | + sudo apt-get update + sudo apt-get install -y gh + + - name: Auto-assign PR author + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh auth setup-git + gh pr edit ${{ github.event.pull_request.number }} --add-assignee ${{ github.event.pull_request.user.login }} diff --git a/.github/workflows/gpt-review.yml b/.github/workflows/gpt-review.yml new file mode 100644 index 00000000..b2b66116 --- /dev/null +++ b/.github/workflows/gpt-review.yml @@ -0,0 +1,27 @@ +name: Code Review + +permissions: + contents: read + pull-requests: write + +on: + pull_request: + types: [opened, reopened, synchronize] + +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 + # OPENAI_API_ENDPOINT: https://api.openai.com/v1 + MODEL: GPT-4o # https://platform.openai.com/docs/models + # 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. From 1e0dc9c07d979658ef43bc8dd0553ddd4216a638 Mon Sep 17 00:00:00 2001 From: suwonthugger <127329855+suwonthugger@users.noreply.github.com> Date: Thu, 17 Oct 2024 02:12:05 +0900 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20workflow=20=EB=AA=A8=EB=8D=B8?= =?UTF-8?q?=EB=AA=85=20=EC=88=98=EC=A0=95=20(#206)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gpt-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gpt-review.yml b/.github/workflows/gpt-review.yml index b2b66116..385397de 100644 --- a/.github/workflows/gpt-review.yml +++ b/.github/workflows/gpt-review.yml @@ -20,7 +20,7 @@ jobs: # Optional LANGUAGE: Korean # OPENAI_API_ENDPOINT: https://api.openai.com/v1 - MODEL: GPT-4o # https://platform.openai.com/docs/models + MODEL: gpt-4o # https://platform.openai.com/docs/models # 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 From 007c6c6e7ee05c4867656da24faa26346d277f7a Mon Sep 17 00:00:00 2001 From: suwonthugger <127329855+suwonthugger@users.noreply.github.com> Date: Thu, 17 Oct 2024 02:15:07 +0900 Subject: [PATCH 3/4] =?UTF-8?q?feat:=20CODEOWNERS=20=EC=B6=94=EA=B0=80=20(?= =?UTF-8?q?#206)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..de0ddfcc --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @seueooo @KIMGEONHWI @Ivoryeee @suwonthugger From afcc07647b74833b6509d46542cec5a4701d605d Mon Sep 17 00:00:00 2001 From: suwonthugger <127329855+suwonthugger@users.noreply.github.com> Date: Thu, 17 Oct 2024 02:21:19 +0900 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20workflow=20gpt=20=EB=B2=84=EC=A0=84?= =?UTF-8?q?=20=EB=AA=85=EC=8B=9C=20=EC=82=AD=EC=A0=9C=20(#206)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gpt-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gpt-review.yml b/.github/workflows/gpt-review.yml index 385397de..fe084f50 100644 --- a/.github/workflows/gpt-review.yml +++ b/.github/workflows/gpt-review.yml @@ -20,7 +20,7 @@ jobs: # Optional LANGUAGE: Korean # OPENAI_API_ENDPOINT: https://api.openai.com/v1 - MODEL: gpt-4o # https://platform.openai.com/docs/models + # MODEL: # https://platform.openai.com/docs/models # 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