jupyterhub / jupyterhub/nbgitpuller

Detect repo url from file / directory. Or allow to pull only part of a repo.

Open
#270 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
237
Forks
86
PR merge metrics
No merged PRs in 30d

Description

### Proposed change

I have some users who try to pull one file or a directory from a repo. This doesn't work and just gives ValueError: Problem accessing HEAD branch. It would be nice if the nbpuller could derive the repo url from the file or directory and pull the entire repo.

### Alternative options

It would be even better if it would just pull the file / directory requested, but I don't know how it would reconcile with further requests without a .git directory.

### Who would use this feature?

Users who are unfamiliar with git and try to use it like Google Drive.

### (Optional): Suggest a solution

I don't know if github provides an api to get the repo url from a file, but I suppose just deleting paths from right to left and adding .git then trying to clone it would be a brute force way.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.