File tree Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : " Code Review Workflow"
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - develop
7
+
8
+ jobs :
9
+ code-review :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - name : " Fetch pull request information"
14
+ id : pr-info
15
+ uses : actions/github-script@v3
16
+ with :
17
+ github-token : ${{ secrets.GH_TOKEN }}
18
+ script : |
19
+ const pr = context.payload.pull_request;
20
+ console.log(` Pull request information: ${JSON.stringify(pr)}`);
21
+
22
+ - name : " Run OpenAI code review"
23
+ id : code-review
24
+ uses : openai/action-chat-gpt@v1
25
+ with :
26
+ prompt : " Please provide a code review of the following Pull Request: ${{ steps.pr-info.outputs.pull_request }}"
27
+ model : text-davinci-002
28
+ api_key : ${{ secrets.OPENAI_API_KEY }}
Original file line number Diff line number Diff line change @@ -2,10 +2,12 @@ name: "SonarCloud"
2
2
3
3
on :
4
4
push :
5
- branches : ["main"]
5
+ branches :
6
+ - main
6
7
7
8
pull_request :
8
- branches : ["main"]
9
+ branches :
10
+ - main
9
11
10
12
workflow_dispatch :
11
13
You can’t perform that action at this time.
0 commit comments