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
GitDumper
should also checkout the main
branches
#148
Comments
I think the better solution is to figure out what the remote HEAD is and use that as the default branch. But please do note that while HEAD usually points to master or main (in GitHub's case), having a default branch is not required (per git-scm documentation). Use |
Per this post, can use this to get the default git branch.
|
The reason we don’t want to introduce |
@zcqian certainly, within python code, you don't really need |
That’s what I’m thinking for now. We will invoke
raise if none of the above applies Edit: changed how things work, now only taking into account the configured repo URL, not what's actually configured in the local git repository. In the long run I don’t like scraping the standard output of git, or using GitPython (we use this in some places, it is also probably scraping the output, given that it depends on the git command). We should look into solutions like libgit2. |
Fixed via #150 |
When adding a new plugin to
pending.biothings.io
, the URL to the GitHub repo will be passed tohttp://localhost:19080/dataplugin/register_url
,which in the end calls the
AssistantManager.register_url()
method (assistant.py#L699).The
AssistantManager
instance looks like to add a message (including the URL to register) to its corresponding MongoDB collection, and finally aGitDumper
instance will receive the URL and then check the repo out. By default,GitDumper
will only checkmaster
branches, but recently GitHub has changed its default branch name frommaster
tomain
. Therefore ourGitDumper
cannot checkout the latest GitHub repo-based plugins.The root cause in the code seems to be dumper.py#L1072:
The text was updated successfully, but these errors were encountered: