Skip to content
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

Binder link generation bug on jupyterhub.github.io/nbgitpuller/link #137

Closed
jreades opened this issue Jul 1, 2020 · 3 comments · Fixed by #138
Closed

Binder link generation bug on jupyterhub.github.io/nbgitpuller/link #137

jreades opened this issue Jul 1, 2020 · 3 comments · Fixed by #138
Labels

Comments

@jreades
Copy link

jreades commented Jul 1, 2020

Bug description

On the Binder tab for https://jupyterhub.github.io/nbgitpuller/link setting a branch on the Git Environment Repo also sets the same branch on the Git Content Repo in the generated URL even when this is not intended (i.e. branch for Content Repo is left as master).

Expected behaviour

Using the following parameters:

  • BinderHub URL: https://mybinder.org
  • Git Environment Repo: https://github.com/kingsgeocomp/code-camp-env
  • Branch: notebook-v1.0
  • Git Content Repo: https://github.com/kingsgeocomp/code-camp
  • File to open: N/A
  • Application ot Open: Classic Jupyter Notebook

I would expect the autogenerated link to be:
https://mybinder.org/v2/gh/kingsgeocomp/code-camp-env/notebook-v1.0?urlpath=git-pull%3Frepo%3Dhttps%253A%252F%252Fgithub.com%252Fkingsgeocomp%252Fcode-camp%26urlpath%3Dtree%252Fcode-camp%252F%26branch%3Dmaster

I can edit the link manually (as I have done here) and obtain the correct behaviour.

Additionally, some quick checking suggests that:

  1. Specifying a branch on the Git Content Repo but not the Environment Repo does not update the Binder link with the branch information for the content. The URL remains unchanged.
  2. Having different branches specified for the Environment and Content repos results in the Binder link having the Environment Repo branch specified for both repos.

The fact that the links can be manually corrected to do the 'right' thing suggests to me that it's a 'simple' JavaScript issue on the link page (I've not touched JS since about version 1.1 so I'm not keen to start now). I don't have any other platforms on which to test to see if it's somehow specific to Chrome on OSX.

Actual behaviour

The link that was actually generated was:
https://mybinder.org/v2/gh/kingsgeocomp/code-camp-env/notebook-v1.0?urlpath=git-pull%3Frepo%3Dhttps%253A%252F%252Fgithub.com%252Fkingsgeocomp%252Fcode-camp%26urlpath%3Dtree%252Fcode-camp%252F%26branch%3Dnotebook-v1.0

How to reproduce

  1. Go to https://jupyterhub.github.io/nbgitpuller/link
  2. Click on 'Binder'
  3. Set the parameters as above.
  4. Copy+Paste Link

Your personal set up

  • OS: OSX
  • Version: 10.14.6 Mojave
  • Browser uised: Chrome Version 81.0.4044.138 (Official Build) (64-bit)
@jreades jreades added the bug label Jul 1, 2020
@welcome
Copy link

welcome bot commented Jul 1, 2020

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@GeorgianaElena
Copy link
Member

Thanks a lot for reporting the bug @jreades! ❤️

I've opened #138 to fix this. There is a link in the PR description where you can test the changes if you want to check it out.

@jreades
Copy link
Author

jreades commented Jul 1, 2020

Awesome, looks good to me. Thank you for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants