-
Notifications
You must be signed in to change notification settings - Fork 1
Test #260
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
Test #260
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThis PR updates GitHub Actions workflows for improved code linting: the gobo_check workflow now processes files individually instead of bulk formatting, and a new gobo_lint workflow is introduced to trigger linting on .gml files via /lint comments. Minor formatting adjustments are made to GML scripts, nyan! Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/lint |
|
/lint |
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.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In @.github/workflows/gobo_check.yml:
- Around line 34-37: The formatter loop iterates unquoted over ${{
steps.changed-files.outputs.all_changed_files }} and lacks a file-exists check,
which breaks on filenames with spaces or special chars; update the loop that
calls ./gobo to iterate safely by splitting on newlines (or configure
tj-actions/changed-files with separator: '\n') and quote the file variable when
invoking ./gobo, and add a guard like an existence test (e.g., check the file
exists and is a regular file before calling ./gobo) so files that don't exist
are skipped; refer to the loop using the all_changed_files output and the ./gobo
invocation to find where to make these changes.
In @.github/workflows/gobo_lint.yml:
- Around line 50-55: The for-loop that iterates over
${steps.changed-files.outputs.all_changed_files} will split filenames with
spaces into separate tokens; update the iteration to handle newline-separated
filenames (e.g., read the output with a while read -r loop or set IFS and use
read -r to preserve spaces) or configure the changed-files action to emit
newline-separated output via separator: '\n' so that each "$file" passed to
./gobo and the -f existence check honors filenames with spaces; ensure you
reference the variable steps.changed-files.outputs.all_changed_files and keep
the existing ./gobo "$file" invocation.
- Around line 36-38: The workflow is using a non-existent output
steps.comment-branch.outputs.base_ref for base_sha; replace it with a real
source for the PR base SHA such as the GitHub event context (e.g., use base_sha:
${{ github.event.pull_request.base.sha }}), or fetch the base SHA via the GitHub
API if your trigger/context doesn't include it; update the with: block that
currently contains base_sha: ${{ steps.comment-branch.outputs.base_ref }} to use
the chosen valid source so the changed-files action gets a proper base commit.
🧹 Nitpick comments (1)
scripts/scr_arti_descr/scr_arti_descr.gml (1)
13-15: Minor formatting changes look okay, but there's a style inconsistency, nyan~These are just formatting tweaks from Gobo, meow! But I noticed that line 15 puts the closing brace on the same line (
mission_data += ".#";}), while the similar block at lines 20-22 uses proper multi-line formatting, nyan:// Line 15 style: mission_data += ".#";} // Lines 20-22 style: } else { mission_data += ".#"; }This might be Gobo's output, but it creates a tiny inconsistency in the file, meow~ 🐱 Not a big deal though, nyan!
| for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | ||
| echo "Formatting $file..." | ||
| ./gobo "$file" | ||
| done |
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.
🧩 Analysis chain
🏁 Script executed:
# First, let's look at the gobo_check.yml file to understand the context
cat -n .github/workflows/gobo_check.ymlRepository: EttyKitty/ChapterMaster
Length of output: 1554
🏁 Script executed:
# Check if gobo_lint.yml exists and how it handles file iteration
if [ -f .github/workflows/gobo_lint.yml ]; then
echo "=== gobo_lint.yml exists ==="
cat -n .github/workflows/gobo_lint.yml
else
echo "gobo_lint.yml not found"
fiRepository: EttyKitty/ChapterMaster
Length of output: 2433
🏁 Script executed:
# Search for .gml files with spaces in their names
echo "=== Checking for .gml files with spaces ==="
fd -e gml | grep ' ' || echo "No .gml files with spaces found, nyan~"
echo ""
echo "=== All .gml files in repo ==="
fd -e gml | head -20Repository: EttyKitty/ChapterMaster
Length of output: 863
🏁 Script executed:
# Check the tj-actions/changed-files action to understand output format
# Look at how it's used in the workflow
echo "=== Checking changed-files action usage ==="
grep -A 5 -B 5 "changed-files" .github/workflows/gobo_check.ymlRepository: EttyKitty/ChapterMaster
Length of output: 879
Add file existence check and handle filenames with special characters, nyan~
The loop uses unquoted variable expansion, and while no .gml files with spaces currently exist in the repo, this leaves the code vulnerable if filenames with spaces are added in the future, nyan! Also, unlike the gobo_lint.yml workflow which includes a file existence check, this formatter loop is missing that safeguard, nyan.
Suggested fix to match gobo_lint.yml pattern and handle edge cases, nyan~
- name: Run Formatter
if: steps.changed-files.outputs.any_changed == 'true'
run: |
+ IFS=$'\n'
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
+ if [ -f "$file" ]; then
echo "Formatting $file..."
./gobo "$file"
+ fi
doneAlternatively, configure tj-actions/changed-files with separator: '\n' to make the output newline-separated, nyan! ✨
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | |
| echo "Formatting $file..." | |
| ./gobo "$file" | |
| done | |
| IFS=$'\n' | |
| for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | |
| if [ -f "$file" ]; then | |
| echo "Formatting $file..." | |
| ./gobo "$file" | |
| fi | |
| done |
🤖 Prompt for AI Agents
In @.github/workflows/gobo_check.yml around lines 34 - 37, The formatter loop
iterates unquoted over ${{ steps.changed-files.outputs.all_changed_files }} and
lacks a file-exists check, which breaks on filenames with spaces or special
chars; update the loop that calls ./gobo to iterate safely by splitting on
newlines (or configure tj-actions/changed-files with separator: '\n') and quote
the file variable when invoking ./gobo, and add a guard like an existence test
(e.g., check the file exists and is a regular file before calling ./gobo) so
files that don't exist are skipped; refer to the loop using the
all_changed_files output and the ./gobo invocation to find where to make these
changes.
| for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | ||
| if [ -f "$file" ]; then | ||
| echo "Linting $file..." | ||
| ./gobo "$file" | ||
| fi | ||
| done |
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.
Same filename-with-spaces issue here too, nyan~!
Just like in gobo_check.yml, if a .gml file has spaces in its name, this loop will break it into separate tokens, meow! Good job adding the file existence check though - that's purrfect! 🐱
🐱 Suggested fix, nyan~
- name: Run Linter
if: steps.changed-files.outputs.any_changed == 'true'
run: |
+ IFS=$'\n'
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [ -f "$file" ]; then
echo "Linting $file..."
./gobo "$file"
fi
doneOr configure the changed-files action with separator: '\n', nyan! ✨
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | |
| if [ -f "$file" ]; then | |
| echo "Linting $file..." | |
| ./gobo "$file" | |
| fi | |
| done | |
| IFS=$'\n' | |
| for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | |
| if [ -f "$file" ]; then | |
| echo "Linting $file..." | |
| ./gobo "$file" | |
| fi | |
| done |
🤖 Prompt for AI Agents
In @.github/workflows/gobo_lint.yml around lines 50 - 55, The for-loop that
iterates over ${steps.changed-files.outputs.all_changed_files} will split
filenames with spaces into separate tokens; update the iteration to handle
newline-separated filenames (e.g., read the output with a while read -r loop or
set IFS and use read -r to preserve spaces) or configure the changed-files
action to emit newline-separated output via separator: '\n' so that each "$file"
passed to ./gobo and the -f existence check honors filenames with spaces; ensure
you reference the variable steps.changed-files.outputs.all_changed_files and
keep the existing ./gobo "$file" invocation.
|
/lint |
1 similar comment
|
/lint |
Purpose and Description
Testing done
Related things and/or additional context
Summary by CodeRabbit
Chores
Style
✏️ Tip: You can customize this high-level summary in your review settings.