-
Notifications
You must be signed in to change notification settings - Fork 1
feat: batch block update #1190
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?
feat: batch block update #1190
Conversation
|
Summary of ChangesHello @vgpopov, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a powerful new set of shell scripts aimed at significantly enhancing the automation of common development tasks across multiple Git repositories. The primary objective is to provide a robust command-line tool for managing repository cloning and updates, applying consistent changes (like dependency bumps or code refactors), and automating the creation of commits and pull requests. This toolset is designed to improve efficiency and consistency when working with a large number of interconnected projects. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
|
|
||
| For installation: | ||
| ```sh | ||
| curl |
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.
?
| resolve_script_dir() { | ||
| local source="${BASH_SOURCE[0]}" | ||
| while [ -h "$source" ]; do | ||
| local dir | ||
| dir="$(cd -P "$(dirname "$source")" && pwd)" | ||
| source="$(readlink "$source")" | ||
| [[ "$source" != /* ]] && source="$dir/$source" | ||
| done | ||
| cd -P "$(dirname "$source")" && pwd | ||
| } | ||
|
|
||
| SCRIPT_DIR="$(resolve_script_dir)" |
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.
Never saw this magic wand before. :)
Could you explain what is the difference of your solution to simple one-liner?
SCRIPT_DIR="$(cd -P "$(dirname "$source")" && pwd)"
Or, if you want path without symlinks, then
SCRIPT_DIR="$(realpath "$(dirname "$source")")"
BTW: regular cd in bash has no '-P' option. It seems to be an option of cd command embedded into dash which is used as default bash alternative on Macs.
| help [command] Show general help or help for a command | ||
| start Clone/update repos (see: main.sh help clone) | ||
| finish Restore stashed changes from clone updates | ||
| changes-prepare Prepare changes (see: main.sh help manage) | ||
| changes-apply Apply changes and open PRs (see: main.sh help manage) | ||
| replace Search & replace (see: main.sh help replace) | ||
| update-deps Update package versions across repos interactively | ||
| install [--dest DIR] Install commands to a bin directory (symlinks by default) |
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.
None of help commands worked on my side.
Also, it looks strange to look help for start command with help clone as message suggests.
| *) | ||
| msg_error "Unknown option: $1" | ||
| usage | ||
| exit 1 | ||
| ;; |
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.
This makes script to exit if I try to use it in 'command only' mode (without --* options.
I know two ways of fixing this:
Use getopts embedded into bash:
while getopts ":dh" opt; do
case $opt in
d)
DEST_DIR="${OPTARG}"
;;
h)
help
exit
;;
\:)
error 64 "Option -${OPTARG} requires an argument"
;;
\?)
help
exit 64
;;
esac
done
shift $(($OPTIND - 1))
and using separate getopt command
args="$(getopt -l dest,help $0 -- "$@")"
set -- $args
while :; do
// your code from above with shifts
--)
shift; break;
;;
esac
done
| PACKAGES_ARG="" # values for -p/--package (can be repeated or comma/space/newline separated) | ||
|
|
||
| # Parse flags | ||
| while [[ $# -gt 0 ]]; do |
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.
| while [[ $# -gt 0 ]]; do | |
| if [ "$CMD" == "help" ]; then | |
| while [[ $# -gt 0 ]]; do | |
| ... | |
| fi |
|
Wrong changesets format: |
No description provided.