jupyterhub / jupyterhub/nbgitpuller

Changing default branch makes all tests fail

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

Description

### Bug description

If you have changed the default branch name on your computer, as `git init` now suggests, all nbgitpuller tests fail.

### How to reproduce

```bash
# The following fails:
git config --global init.defaultBranch main
python -m pytest tests/test_gitpuller.py

# This works again:
git config --global init.defaultBranch master
python -m pytest tests/test_gitpuller.py
```

I think this is because `repohelpers.py` hardcodes the master branch name, but when creating test repos doesn't specify a name. I'll look into it next week, it should not be too hard.

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.