Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/improve comment #2

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
cfcbe93
Add sample code for review testing
utsmannn Jan 25, 2025
5c8adc6
Refactor: Update code review workflow to use absolute path for custom…
utsmannn Jan 25, 2025
d01d4ba
Feat: Expand code review trigger to include ready_for_review, enhanci…
utsmannn Jan 25, 2025
4559cd7
Feat: Add PR status check before code review, enhance workflow, inclu…
utsmannn Jan 25, 2025
9ab8fa9
Refactor: Adjust code review trigger, extending to push events and re…
utsmannn Jan 25, 2025
700d4f9
Refactor: Streamline code review trigger logic to use PR number for c…
utsmannn Jan 25, 2025
20826ce
Refactor: Updated code review action to use a relative path for bette…
utsmannn Jan 25, 2025
6279bc4
Refactor: Simplify the code review process by removing push trigger a…
utsmannn Jan 25, 2025
af7d7bf
Debug: Added file listing and `review.py` content display for code re…
utsmannn Jan 25, 2025
755d888
Debug: Modified workflow to list all files in the repository, not jus…
utsmannn Jan 25, 2025
3934c48
Refactor: Modified code review workflow to checkout code into action …
utsmannn Jan 25, 2025
33fdd5f
Refactor: Streamlined code review workflow by removing redundant path…
utsmannn Jan 25, 2025
1486690
Debug: Enhanced code review workflow with directory listing, current …
utsmannn Jan 25, 2025
24c51c3
Refactor: Migrated code review action to root, consolidating action.y…
utsmannn Jan 25, 2025
71baf3b
Refactor: Adjusted code review action execution path to `src/review.p…
utsmannn Jan 25, 2025
05ba6c1
Refactor: Enhanced code review by using structured JSON for review ou…
utsmannn Jan 25, 2025
69d8572
Refactor: Improved PR number extraction logic in `review.py` to direc…
utsmannn Jan 25, 2025
a8dc30a
Fix: Corrected `post_comment` to use `create_review_comment` with a C…
utsmannn Jan 25, 2025
9d88b15
Refactor: Updated code review to use `create_review` with structured …
utsmannn Jan 25, 2025
9aac4a9
Refactor: Modify `post_comment` to accept a list of comments, streaml…
utsmannn Jan 25, 2025
c8f3af5
Refactor: Enhanced `post_comment` to handle multiple comments with of…
utsmannn Jan 25, 2025
55eef85
Refactor: Update response handling in `review.py` to directly return …
utsmannn Jan 25, 2025
5899031
Feat: Added `model-name` input to code review workflow, enabling sele…
utsmannn Jan 25, 2025
2a7145d
Fix: Corrected `post_comment` line adjustment offset from +4 to +3, a…
utsmannn Jan 25, 2025
4f4d8b1
Refactor: Modified JSON parsing to directly use model response, remov…
utsmannn Jan 25, 2025
15eb3e8
Refactor: Enhanced Gemini interaction with detailed schema definition…
utsmannn Jan 25, 2025
0ff6d01
Feat: Enhanced diff processing to support overall and per-commit diff…
utsmannn Jan 25, 2025
e7dbc52
Feat: Added GitPython, gitdb, and smmap dependencies for enhanced git…
utsmannn Jan 25, 2025
48594b3
Refactor: Improve diff retrieval to use GitHub API, enhancing efficie…
utsmannn Jan 25, 2025
127f7bc
Refactor: Improve line matching in diff processing by normalizing whi…
utsmannn Jan 25, 2025
1b47247
Refactor: Enhance line matching in diff processing by normalizing whi…
utsmannn Jan 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Empty file.
36 changes: 0 additions & 36 deletions .github/actions/code-reviewer/requirements.txt

This file was deleted.

130 changes: 0 additions & 130 deletions .github/actions/code-reviewer/review.py

This file was deleted.

24 changes: 10 additions & 14 deletions .github/workflows/code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Run Customized Review
uses: ./.github/actions/code-reviewer
- name: List files
run: |
pwd
echo "Direktori Action:"
ls -la .
echo "Isi review.py:"

- name: Run Code Review
uses: ./
with:
gemini-api-key: ${{ secrets.GEMINI_API_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
model-name: 'gemini-1.5-pro-latest'
custom-instructions: |
**Language-Specific Checks:**
- PEP8 compliance
- Type hint enforcement
- Proper async/await usage
- Pytest coverage >80%

**Project-Specific Rules:**
- Validate configuration against schema
- Check for hardcoded secrets
- Verify logging consistency
model-name: gemini-2.0-flash-exp
2 changes: 1 addition & 1 deletion .github/actions/code-reviewer/action.yml → action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ runs:
GITHUB_TOKEN: ${{ inputs.github-token }}
INPUT_MODEL-NAME: ${{ inputs.model-name }}
INPUT_CUSTOM-INSTRUCTIONS: ${{ inputs.custom-instructions }}
run: python review.py
run: python src/review.py
shell: bash
File renamed without changes.
Loading
Loading