jupyterhub / jupyterhub/nbgitpuller

Execution of gitpuller in shell throws KeyError: 'branch' version tag 0.10.0

Open
#184 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
237
Forks
86
PR merge metrics
No merged PRs in 30d

Description

### Bug description
execute gitpuller from bash/shell like this: `gitpuller https://github.com/jupyterhub/nbgitpuller.git` fails.

#### Expected behaviour
Execution shall work with or without specifying a branch value on the command line
see application of that eg. here https://zero-to-jupyterhub.readthedocs.io/en/latest/jupyterhub/customizing/user-environment.html?highlight=gitpuller#using-multiple-profiles-to-let-users-select-their-environment

#### Actual behaviour
`File "/opt/conda/lib/python3.9/site-packages/nbgitpuller/pull.py", line 73, in __init__ self.branch_name = kwargs.pop("branch") KeyError: 'branch'`

### Source of Bug
Since in 0.10.0 the argument "branch" is removed by commit https://github.com/jupyterhub/nbgitpuller/commit/12f25dd45d09d140038a9f9c4b66d7b7cb3ea715#diff-50b85d13b73c3cf1fbf0047f5786d5e8ddba9f959b617c0354d15c399ab47539

https://github.com/jupyterhub/nbgitpuller/blob/3280fdde5d9abc64e4b6271375bd03e94886103d/nbgitpuller/pull.py#L73

### set up
JupyterHub 1.3.0 20210609150206 on microk8s 1.21 with ubuntu 20.04
jupyter base notebook image

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.