-
Notifications
You must be signed in to change notification settings - Fork 999
Change submodule and master-based-workflow setup #381
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
base: master
Are you sure you want to change the base?
Change submodule and master-based-workflow setup #381
Conversation
The submodule /exercise directory does not have a repository. So git commands executed in /exercise would effect the parent git-katas repo. Added the make-exercise-repo utility to the setup.sh to create an empty repo in /exercise. Which encapsulates it.
The submodule /exercise directory does not have a repository. So git commands executed in /exercise would effect the parent git-katas repo. Added the make-exercise-repo utility to the setup.sh to create an empty repo in /exercise. Which encapsulates it.
WalkthroughThe setup scripts in two directories have been updated to replace manual directory creation and navigation steps with a single call to a Changes
Estimated code review effort1 (~2 minutes) Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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: 0
🧹 Nitpick comments (4)
submodules/setup.sh (2)
7-11
: Redundant cleanup –exercise/
is removed twice
make-exercise-repo
already performsrm -rf exercise/
.
Keeping the standalonerm -rf exercise
introduces needless I/O and makes the intent less clear.-# First cleanup if there is an old exercise folder -rm -rf exercise - -# Create exercise folder & go there -make-exercise-repo +# Create exercise folder & go there (make-exercise-repo handles cleanup itself) +make-exercise-repo
1-5
: Harden the script with strict-mode flagsConsider adding the usual bash safety flags right after the shebang:
set -euo pipefail
This causes the script to abort on the first error, on unset variables, and on pipe failures—especially useful in teaching katas where users may modify the script.
master-based-workflow/setup.sh (2)
4-7
: Duplicaterm -rf exercise
call
make-exercise-repo
already deletes any pre-existingexercise/
folder.
Removing the extra call keeps the setup concise and avoids unnecessary disk work.-rm -rf exercise - -make-exercise-repo +make-exercise-repo # function already wipes old exercise repo
1-3
: Enable strict mode for safer executionAdd bash strict-mode flags to fail fast on errors and undefined variables:
set -euo pipefail
This is particularly helpful in workflow-oriented scripts where an unnoticed failure can derail the subsequent learner steps.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
master-based-workflow/setup.sh
(1 hunks)submodules/setup.sh
(1 hunks)
🧬 Code Graph Analysis (2)
submodules/setup.sh (1)
utils/make-exercise-repo.sh (1)
make-exercise-repo
(2-12)
master-based-workflow/setup.sh (1)
utils/make-exercise-repo.sh (1)
make-exercise-repo
(2-12)
🧰 Additional context used
🧬 Code Graph Analysis (2)
submodules/setup.sh (1)
utils/make-exercise-repo.sh (1)
make-exercise-repo
(2-12)
master-based-workflow/setup.sh (1)
utils/make-exercise-repo.sh (1)
make-exercise-repo
(2-12)
The submodule and master-based-workflow /exercise directories do not have a repository. So git commands executed in /exercise would effect the parent git-katas repo.
Replaced mkdir with the make-exercise-repo utility in the setup.sh files. This creates an empty repo in /exercise and protects the parent repo.
Summary by CodeRabbit