Skip to content

Commit e659a2a

Browse files
author
Jakub Jirous
committed
[github] code review using open api - fetch
[github] code review using open api - fetch [github] code review using open api - fetch [github] code review using open api - develop only [github] using node version 16 [github] using node version 16
1 parent 3af6cc2 commit e659a2a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/code_review.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,22 @@ name: "Code Review Workflow"
33
on:
44
pull_request:
55
types: [opened, synchronize, reopened]
6+
branches:
7+
- develop
68

79
jobs:
810
code-review:
911
runs-on: ubuntu-latest
1012

1113
steps:
14+
- name: "Checkout code"
15+
uses: actions/checkout@v3
16+
17+
- name: "Run Node.js script"
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 16
21+
1222
- name: "Fetch pull request information"
1323
id: pr-info
1424
uses: actions/github-script@v3
@@ -17,11 +27,3 @@ jobs:
1727
script: |
1828
const pr = context.payload.pull_request;
1929
console.log(` Pull request information: ${JSON.stringify(pr)}`);
20-
21-
- name: "Run OpenAI code review"
22-
id: code-review
23-
uses: openai/action-chat-gpt@v1
24-
with:
25-
prompt: "Please provide a code review of the following Pull Request: ${{ steps.pr-info.outputs.pull_request }}"
26-
model: text-davinci-002
27-
api_key: ${{ secrets.OPENAI_API_KEY }}

0 commit comments

Comments
 (0)