From 74487d00191cd06f5bddf47fea8fdca539eed460 Mon Sep 17 00:00:00 2001 From: KleinerCodeDrago Date: Wed, 21 Feb 2024 09:03:13 +0100 Subject: [PATCH 1/3] Add code review workflow --- .github/workflows/cr.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/cr.yml diff --git a/.github/workflows/cr.yml b/.github/workflows/cr.yml new file mode 100644 index 0000000..ec90d0a --- /dev/null +++ b/.github/workflows/cr.yml @@ -0,0 +1,19 @@ +name: Code Review + +permissions: + contents: read + pull-requests: write + +on: + pull_request: + types: [opened, reopened, synchronize] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: anc95/ChatGPT-CodeReview@main + env: + GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + PROMPT: "You are an software engeneer who should check this pull request. You are currently typing in the comment field:" \ No newline at end of file From 1c7155fe36ce1d50089e284b88d0f184100b982a Mon Sep 17 00:00:00 2001 From: KleinerCodeDrago Date: Wed, 21 Feb 2024 09:11:36 +0100 Subject: [PATCH 2/3] Fix typo in prompt message --- .github/workflows/cr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cr.yml b/.github/workflows/cr.yml index ec90d0a..649e63f 100644 --- a/.github/workflows/cr.yml +++ b/.github/workflows/cr.yml @@ -16,4 +16,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - PROMPT: "You are an software engeneer who should check this pull request. You are currently typing in the comment field:" \ No newline at end of file + PROMPT: "You are an software engineer who should check this pull request. You are currently typing in the comment field:" From ccc2f297a07f12dca4c85b342b252925ce2c6a17 Mon Sep 17 00:00:00 2001 From: KleinerCodeDrago Date: Wed, 21 Feb 2024 09:14:00 +0100 Subject: [PATCH 3/3] Update PROMPT message in cr.yml --- .github/workflows/cr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cr.yml b/.github/workflows/cr.yml index 649e63f..90e683a 100644 --- a/.github/workflows/cr.yml +++ b/.github/workflows/cr.yml @@ -16,4 +16,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - PROMPT: "You are an software engineer who should check this pull request. You are currently typing in the comment field:" + PROMPT: "You are a software engineer who should review this pull request. You are currently typing in the comment section:"