Cudatext: "Addon manager/ install from github" cannot install if main git branch isnot 'master'

Created on 22 Nov 2020  路  2Comments  路  Source: Alexey-T/CudaText

eg. https://github.com/halfbrained/cuda_extended_selection

code in addon manager is adding 'master' branch name. to URL.
any idea how to get real branch name? eg 'main'
@halfbrained @kvichans @dinkumoil @jairo-martinez

Most helpful comment

According to GitHub's repository API it is possible to query the branch list of a repository with the URL https://api.github.com/repos/{user}/{repo}/branches.

For the repo you mentioned above the URL would be: https://api.github.com/repos/halfbrained/cuda_extended_selection/branches

All 2 comments

I was doing some testing, but I suppose at the end you will need to fetch the repository to get the list of remote branch, something like this:

cd <TemporalFolder>
git init
git remote add origin [email protected]:halfbrained/cuda_extended_selection.git
git fetch
git remote -r

Currently the Addon Manager validate first the file /master/install.inf but as you say master branch is not present, you need to get first the list of branches and then you can continue the validation of install.inf file.

According to GitHub's repository API it is possible to query the branch list of a repository with the URL https://api.github.com/repos/{user}/{repo}/branches.

For the repo you mentioned above the URL would be: https://api.github.com/repos/halfbrained/cuda_extended_selection/branches

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Alexey-T picture Alexey-T  路  7Comments

jczanfona picture jczanfona  路  5Comments

JairoMartinezA picture JairoMartinezA  路  7Comments

JairoMartinezA picture JairoMartinezA  路  5Comments

Alexey-T picture Alexey-T  路  4Comments