-
Notifications
You must be signed in to change notification settings - Fork 0
refactor(script): complete migration from gsutil to gcloud storage #58
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: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR refactors the bucket ACL update script to complete the migration from gsutil to gcloud storage commands.
- Replaces gsutil commands with equivalent gcloud storage commands for listing and updating ACLs.
- Refactors bucket list formatting and file cleanup syntax, and updates the DRY_RUN conditional check for improved consistency.
Comments suppressed due to low confidence (1)
scripts/set-bucket-acls.sh:25
- Adding a brief comment explaining the DRY_RUN check could improve clarity for future maintainers.
if [[ "$DRY_RUN" -ne 0 ]]; then
| BUCKETS="put-here-the-first-bucket put-here-the-second-bucket" | ||
|
|
||
| echo -n "" >"${NOT_PROCESSED_BUCKETS_FILE}" | ||
| for BUCKET in ${BUCKETS}; do | ||
| : >"$NOT_PROCESSED_BUCKETS_FILE" | ||
|
|
||
| for BUCKET in $BUCKETS; do |
Copilot
AI
Jun 18, 2025
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.
[nitpick] Consider handling bucket names safely by either quoting the variable or using an array if bucket names might include spaces.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
/improve |
PR Code Suggestions ✨Latest suggestions up to 564c0ae
Previous suggestionsSuggestions up to commit 564c0ae
|
PR Type
Enhancement
Description
• Replace gsutil commands with gcloud storage equivalents
• Update ACL setting syntax to use predefined-acl flags
• Improve shell scripting with modern bash practices
• Streamline bucket listing and error handling logic
Changes walkthrough 📝
set-bucket-acls.sh
Migrate gsutil to gcloud storage commandsscripts/set-bucket-acls.sh
• Replace
gsutil ls -dwithgcloud storage lsfor bucket checking•
Update ACL commands from
gsutil acl settogcloud storage objectsupdate --predefined-acl• Improve shell scripting with modern quoting
and syntax patterns
• Simplify bucket list formatting and file
initialization