-
Notifications
You must be signed in to change notification settings - Fork 87
Description
We have a app
query parameter that is accepted in the /git-pull
endpoint that influences the redirection path to unless urlpath
is also set. A default value for this query parameter can be set via NBGITPULLER_APP
.
I'm considering if we should remove it or attempt to deprecate it etc to reduce the complexity.
Background
@manics wrote
[...] there's an undocumented environment variable
NBGITPULLER_APP
nbgitpuller/nbgitpuller/handlers.py
Line 149 in fdd54bd
app_env = os.getenv('NBGITPULLER_APP', default='notebook')
Do you know it's significance?
I replied
@manics it seem to have been added by me four years ago in #41 😮
I did some git history inspection:
- Ability to launch into JupyterLab #41 added NBGITPULLER_APP, a default value for an
app
parameter acceptingnotebook
andlab
.- Documentation about it updated in Update README.md #48
- Documentation on constructing the url removed in favor of using a link generator in Add new link generator instructions #62
Overall, it seems that it does the single thing of "if set to lab", the web handler for
/git-pull
endpoint will default to prepending/lab/tree
to a post git-pull redirection path. It won't affectgitpuller
the CLI though.I conclude that the https://jupyterhub.github.io/nbgitpuller/link only crafts links using
urlpath
directly though, and theNBGITPULLER_APP
is a default value for aapp
query parameter, which only has an influence ifurlpath
isn't set.I'd love to see this env var and the entire
app
query parameter removed to reduce complexity, but breaking existing links isn't fun. @yuvipanda do you have a suggestion with regards to something to do with the logic about having anapp
parameter and/or the NBGITPULLER_APP env which is theapp
parameters default value?