Skip to content

Commit 50fc81f

Browse files
authored
Merge pull request #1 from LiteObject/feature/refactor_code
Add GitHub Actions workflow for PR code review and update solution file
2 parents 0379482 + c2fa264 commit 50fc81f

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

.github/workflows/code-review.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PR Code Review with Ollama
2+
3+
# Trigger the workflow when a pull request is opened or updated
4+
on:
5+
pull_request_target:
6+
branches:
7+
- main
8+
9+
jobs:
10+
code-review:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
issues: write
14+
env:
15+
MODEL_NAME: "llama3.2:latest"
16+
steps:
17+
# Checkout the repository code
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.event.pull_request.head.ref }}
22+
23+
- name: Fetch pull request branch
24+
run: git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-branch
25+
26+
- name: Generate diff
27+
run: |
28+
git diff ${{ github.event.pull_request.base.sha }} pr-branch > change.diff
29+
echo "Diff generated successfully."
30+
echo "Diff content:" $(cat change.diff)

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# code-review-with-local-llm
1+
# Code Review with Local LLM

src/MyWebApi/MyWebApi.sln

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ VisualStudioVersion = 17.13.35913.81 d17.13
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyWebApi", "MyWebApi\MyWebApi.csproj", "{D9EBF305-BFB5-41F5-AC8E-BBFC9A004462}"
77
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8EC462FD-D22E-90A8-E5CE-7E832BA40C5D}"
9+
ProjectSection(SolutionItems) = preProject
10+
..\..\.github\workflows\ci.yml = ..\..\.github\workflows\ci.yml
11+
..\..\.github\workflows\code-review.yml = ..\..\.github\workflows\code-review.yml
12+
..\..\README.md = ..\..\README.md
13+
EndProjectSection
14+
EndProject
815
Global
916
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1017
Debug|Any CPU = Debug|Any CPU

0 commit comments

Comments
 (0)