-
Notifications
You must be signed in to change notification settings - Fork 1
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
git-action 적용 #162
git-action 적용 #162
Changes from 4 commits
fe9e0bc
330ddc0
a66f2ad
9ee8075
6d8d0c2
78df6b4
b58e96f
90104e5
8273961
0a75660
0ff411c
1f0b435
ff08948
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: learnsmate-service | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
on: | ||
pull_request: | ||
types: [ opened, reopened, synchronize ] | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'corretto' | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x ./gradlew | ||
shell: bash | ||
############################################################## | ||
# 이후 이 부분은 envsubst가 추가될 예정 | ||
############################################################## | ||
|
||
|
||
- name: Build with Gradle | ||
run: ./gradlew clean build -x test | ||
shell: bash | ||
|
||
- name: Get current time | ||
uses: 1466587594/get-current-time@v2 | ||
id: current-time | ||
with: | ||
format: YYYY-MM-DDTHH-mm-ss | ||
utcOffset: "+09:00" | ||
|
||
- name: Show Current Time | ||
run: echo "CurrentTime=${{steps.current-time.outputs.formattedTime}}" | ||
shell: bash | ||
|
||
- name: ChatGPT codeReviewer | ||
uses: anc95/ChatGPT-CodeReview@main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
|
||
# Optional | ||
LANGUAGE: Korean | ||
OPENAI_API_ENDPOINT: https://api.openai.com/v1 | ||
MODEL: gpt-4o # https://platform.openai.com/docs/models | ||
PROMPT: 코드 변경 내용을 검토하고 오류 또는 개선점을 찾아서 한글로 작성해주세요. | ||
top_p: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-top_p | ||
temperature: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-temperature | ||
max_tokens: 10000 | ||
MAX_PATCH_LENGTH: 10000 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code Review:
Potential Improvements:
Overall, conduct thorough testing, especially after incorporating |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ bin/ | |
!**/src/test/**/bin/ | ||
|
||
### IntelliJ IDEA ### | ||
*.yml | ||
application-test.yml | ||
.idea | ||
*.json | ||
*.iws | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code Review
Final Patch with Suggested Changes@@ -27,7 +27,7 @@ bin/
!**/src/test/**/bin/
### IntelliJ IDEA ###
-*.yml
+!application-test.yml
.idea/
*.json
*.iws Always ensure to thoroughly test your version control setup after making such changes to prevent unexpected issues in your development workflow. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
spring: | ||
profiles: | ||
active: test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code snippet appears to be a YAML configuration file that sets the active profiles for a Spring application. Here is a brief code review and some suggestions:
Overall, the code appears simple and straightforward. Watching for the mentioned points could help maintain the effectiveness and security of your application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review Summary:
Bugs/Risks:
Suggested Improvements:
Comments Clarity: While comments exist, it would be beneficial to provide more descriptive comments for each step or section to aid in code readability and understanding.
Security Concerns: Ensure that sensitive information like API keys stored in secrets (e.g.,
GITHUB_TOKEN
,OPENAI_API_KEY
) is appropriately handled and secured following best practices.Consistent Syntax: Ensure consistent use of syntax styles throughout the codebase for better maintainability.
Testing: Consider adding testing steps, especially after the build process, to ensure the integrity of the build artifact.
Failure Handling: Implement error handling and appropriate response mechanisms, such as notifications or logging, for failed steps to improve debugging and maintenance.
Documentation: Add a high-level overview comment at the beginning of the file explaining the purpose of this workflow.
Version Control: Regularly review and update dependencies, such as GitHub Actions and external tools like
setup-java
oractions/checkout
, to avoid compatibility issues.Given these suggestions, you can enhance the code's robustness, stability, and maintainability while promoting a safer and more efficient workflow.