Skip to content

Linterツールの設定変更&CIテストを通す #286

Linterツールの設定変更&CIテストを通す

Linterツールの設定変更&CIテストを通す #286

Workflow file for this run

# kics-scan disable=555ab8f9-2001-455e-a077-f2d0f41e2fb9
---
name: Code Review
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
permissions:
contents: read
pull-requests: write
jobs:
review:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check if current commit is a merge commit
id: check_merge
run:
|
# PARENTS_COUNT を計算
PARENTS_COUNT=$(git rev-list --parents -n 1 "${{ github.sha }}" | wc -w)
# 親が1つであれば (コミットID + 親1つ) = 2単語
# 親が2つなら (コミットID + 親2つ) = 3単語 以上となるので、
# 3以上ならマージコミットとみなす
if [ "${PARENTS_COUNT}" -ge 3 ]; then
echo "is_merge=true" >> "${GITHUB_OUTPUT}"
else
echo "is_merge=false" >> "${GITHUB_OUTPUT}"
fi
- name: Skip on merge commit
if: steps.check_merge.outputs.is_merge == 'true'
run:
|
echo "This is a merge commit. Skipping this job."
exit 0
- uses: anc95/ChatGPT-CodeReview@main
if:
steps.check_merge.outputs.is_merge == 'false' &&
contains(github.event.pull_request.labels.*.name, 'プリーズレビュー')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
LANGUAGE: Japanese
OPENAI_API_ENDPOINT: https://api.openai.com/v1
MODEL: o1-mini
PROMPT:
>
Request: perform PR review mcfuntion code for Minecraft 1.21.1
Role:Respond as code reviewer for Minecraft distribution world “The Unusual SkyBlock”.
Regulation: keep brief to point, 50-300 words or less, Markdown format.
Rule:
. Avoid halcyonation provide reliable information.
. do not copy answers, use original content.
. review code in Minecraft 1.21.1
Review Refine:
. check quality readability code
. Evaluate impact proposed changes on existing functionality
. identify performance concerns
. identify potential impact on gameplay aware of changes affect gameplay
Reference:
- Repository: [The Unusual SkyBlock](https://github.com/TUSB/TheUnusualSkyBlock)
- Documentation.
- [GitHub Wiki](https://github.com/TUSB/TheUnusualSkyBlock/wiki/Top)
- [Seesaawiki](https://seesaawiki.jp/theunusualskyblock/)
Run Scenario: respond as code reviewer.
top_p: 1
temperature: 1
MAX_PATCH_LENGTH: 10000
IGNORE_PATTERNS: ./*,*.md