Automatic installation of GitHub CLI, Git and Git LFS#34
Automatic installation of GitHub CLI, Git and Git LFS#34user21t wants to merge 10 commits intoProjectBorealis:mainfrom
Conversation
Add automated installation of GitHub CLI (if not available), Microsoft's Git and Git LFS in regards to the operating system (Windows, Mac OS)
Add "requests" and "urllib3" package to handle GitHub CLI download
mastercoms
left a comment
There was a problem hiding this comment.
Looks good for the most part, the upgraded download logic looks nice!
| except FileNotFoundError: | ||
| return False | ||
|
|
||
| def install_gh_cli(): |
There was a problem hiding this comment.
GitHub CLI is expected to be in .github/git/gh.exe, please see pbgh.py. Though, I suppose we need to do some work to fix support for GitHub CLI while using repos on GitLab, since it uses GitLab CLI automatically in that case. So maybe forcing GitHub CLI is good there.
| verboselogs = "*" | ||
| crcmod = "*" | ||
| tinyaes = "*" | ||
| requests = "*" |
There was a problem hiding this comment.
We use urllib.request in other places, so if we are including the requests package, we should probably avoid importing urllib.request throughout.
|
|
||
| default_config_name = "PBSync.xml" | ||
|
|
||
| retry_strategy = Retry( |
There was a problem hiding this comment.
Maybe make a new pbhttp module in pbpy?
Add separate module for handling HTTP requests
|
@mastercoms I see you have fixed the problem by yourself, haven't you? I mean implementing your own download logic in updated repository. |
|
It isn't implemented yet, I have just moved logic around. I was planning to integrate your changes into the refactored logic soon. |
|
Hello. Are my commits still needed? |
|
Hi, I plan to integrate your changes very soon. Just need to get around to working on this project again. Right now my time has been spent developing things in the engine. |
|
I know it's kinda late, but I must admit I used Claude's LLM to create this pull request, so you can close it without explanation and add your own handmade changes. |
I have added requests and urllib3 packages in the first place to handle downloading files from Internet via Python script. Then I have rewritten code in pbsync/main.py to allow PBSync for automatic installation of GitHub CLI, Microsoft's Git and Git LFS. For more information see ticket #7.
First, the program checks whether GitHub CLI isn't already installed. If yes, then it proceeds forward. Otherwise, it starts downloading installation file for GH CLI. When downloading fails once, the program will repeat the process 5 times at most until passing. If download and installation process is successful, then Git and Git LFS are installed via GitHub CLI and terminal commands.
Workflow is improved, because we don't download separately by a browser. We can also repeat the version check/install process. Since we are repeating GitHub CLI download process, we don't have to terminate it because of temporary problems like no Internet connection.