Skip to content

Automatic installation of GitHub CLI, Git and Git LFS#34

Closed
user21t wants to merge 10 commits intoProjectBorealis:mainfrom
user21t:main
Closed

Automatic installation of GitHub CLI, Git and Git LFS#34
user21t wants to merge 10 commits intoProjectBorealis:mainfrom
user21t:main

Conversation

@user21t
Copy link
Copy Markdown

@user21t user21t commented Nov 30, 2024

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.

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
@user21t user21t changed the title Automatic install of GitHub CLI, Git and Git LFS (see ticket #7) Automatic install of GitHub CLI, Git and Git LFS Nov 30, 2024
@user21t user21t changed the title Automatic install of GitHub CLI, Git and Git LFS Automatic installation of GitHub CLI, Git and Git LFS Nov 30, 2024
@user21t user21t marked this pull request as draft December 5, 2024 19:20
@user21t user21t marked this pull request as ready for review December 5, 2024 19:21
@user21t user21t marked this pull request as draft December 5, 2024 19:21
@user21t user21t marked this pull request as ready for review December 5, 2024 19:21
Copy link
Copy Markdown
Member

@mastercoms mastercoms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for the most part, the upgraded download logic looks nice!

Comment thread pbsync/__main__.py
except FileNotFoundError:
return False

def install_gh_cli():
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Pipfile
verboselogs = "*"
crcmod = "*"
tinyaes = "*"
requests = "*"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use urllib.request in other places, so if we are including the requests package, we should probably avoid importing urllib.request throughout.

Comment thread pbsync/__main__.py Outdated

default_config_name = "PBSync.xml"

retry_strategy = Retry(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe make a new pbhttp module in pbpy?

@user21t
Copy link
Copy Markdown
Author

user21t commented Dec 19, 2025

@mastercoms I see you have fixed the problem by yourself, haven't you? I mean implementing your own download logic in updated repository.

@mastercoms
Copy link
Copy Markdown
Member

It isn't implemented yet, I have just moved logic around. I was planning to integrate your changes into the refactored logic soon.

@user21t
Copy link
Copy Markdown
Author

user21t commented Mar 1, 2026

Hello. Are my commits still needed?

@mastercoms
Copy link
Copy Markdown
Member

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.

@user21t
Copy link
Copy Markdown
Author

user21t commented Apr 13, 2026

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.

@mastercoms mastercoms closed this Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants