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

Rename nbgitpuller repo's master branch to main #189

Conversation

consideRatio
Copy link
Member

@consideRatio consideRatio commented Jun 24, 2021

Part of work in jupyterhub/team-compass#412 to rename our repo's master branches to main.

Actions to take, in order:

  • approve this PR
  • rename the master branch to main in GitHub (this should automatically update all PRs)
  • merge this PR
  • check the publish workflow publishes the expected outputs if relevant
  • If readthedocs.org is used, set main as the default branch explicitly: admin -> advanced -> default branch
$ git grep master

CHANGELOG.md:- UI: Branch input placeholder no longer suggests master branch [#180](https://github.com/jupyterhub/nbgitpuller/pull/180) ([@sean-morris](https://github.com/sean-morris))
CHANGELOG.md:- Tell users about `main` vs `master` branches [#170](https://github.com/jupyterhub/nbgitpuller/pull/170) ([@yuvipanda](https://github.com/yuvipanda))

Comment: Changelog is fine!



binder/link_generator.ipynb:    "- **Default Values**: to avoid having to enter the same values in the widget's text fields on a repetitive basis, add the string values to the function's parameters. For example, the `branch` parameter defaults to `master`."
binder/link_generator.ipynb:      "text/plain": "'https://my.hub.com/hub/lti/launch?next=%2Fuser-redirect%2Fgit-pull?repo%3D%26branch%3Dmaster%26urlpath%3Dlab%252Ftree%252F.%252F%253Fautodecode'"
binder/link_generator.ipynb:    "def make_launch_link(is_assignment_link=True, is_jupyterlab=True, is_lti11=True, branch='master', hub_url='https://my.hub.com', repo_url='', urlpath=''):\n",

Comment: If the link generator references the master branch or not is irrelevant to the nbgitpuller project's use of a main or master branch I think.



docs/conf.py:github_doc_root = "https://github.com/rtfd/recommonmark/tree/master/doc/"

Comment: Just a link.



docs/conf.py:root_doc = master_doc = "index"

Comment: root_doc is now an option to master_doc supported by a modern version of sphinx, so setting both is a compatibility strategy.



docs/contributing.md:for it as well. A mix of [reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html)

Comment: Just a link.



docs/link.rst:                 <input name="branch" id="branch" type="text" class="form-control" value="master" aria-label="Branch Name" aria-describedby="branch-prepend-label">
docs/link.rst:                    Use <code>main</code> instead of <code>master</code> for
docs/link.rst:                 <input name="content-branch" id="content-branch" type="text" class="form-control" value="master" aria-label="Branch Name" aria-describedby="content-branch-prepend-label">

Comment: these make sense.



docs/topic/repo-best-practices.md:gitignore](https://github.com/github/gitignore/blob/master/Python.gitignore)

Comment: Just a link.



docs/topic/url-options.rst:Branch in the git repo to pull from. Defaults to ``master``.

Comment: correct documentation.



nbgitpuller/pull.py:        # Merge master into local!
tests/test_api.py:            'branch': 'master',
tests/test_api.py:        assert '--branch master' in s
tests/test_api.py:            'branch': 'master',
tests/test_api.py:            'branch': 'master',
tests/test_gitpuller.py:        self.git('push', 'origin', 'master')
tests/test_gitpuller.py:    def __init__(self, remote, path='puller', branch="master", *args, **kwargs):
tests/test_gitpuller.py:            assert puller.git('name-rev', '--name-only', 'HEAD') == 'master'
tests/test_gitpuller.py:    branch = "master"
tests/test_gitpuller.py:            assert puller.gp.branch_exists("master")
tests/test_gitpuller.py:            assert puller.gp.resolve_default_branch() == "master"
tests/test_gitpuller.py:            pusher.git('push', 'origin', 'master')
tests/test_gitpuller.py:            pusher.git('push', 'origin', 'master')
tests/test_gitpuller.py:            pusher.git('push', '--force', 'origin', '%s:master' % orig_head)

Comment: nbgitpuller acts against master rather than main by default still, this PR only changes nbgitpuller's own code base location, so the entries above is okay.

@consideRatio
Copy link
Member Author

@manics @choldgraf I went ahead and pinged you for a review hoping to get help making sure this doesn't get stale. It touches a few files and I hope to not have to rebase this and forget about the changes making a merge in the future harder and harder as time goes.

@yuvipanda yuvipanda merged commit 4d40c2d into jupyterhub:main Jul 14, 2021
@yuvipanda
Copy link
Contributor

@consideRatio thanks for working on this. I followed the checklist and I think everything is done. I'm not sure how the publish workflow might be affected by this rename, so I've left it unchecked. We use gh-pages for documentation so that seems fine...

@choldgraf
Copy link
Member

Thanks all for working on this :-)

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

Successfully merging this pull request may close these issues.

3 participants