Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Include Page
Working Documents (navigation) - Samvera Branch Renaming Working Group
Working Documents (navigation) - Samvera Branch Renaming Working Group

...

  • install with 

    Code Block
    languagenone
    npm install -g github-default-branch


  • run with

    Code Block
    languagenone
    github-default-branch --pat <github_access_token> --repo <github_username>/branch-renaming-test


  • Once complete, all local clones will need to run the following to update their master branch to be connected to origin/main

    From the directory for the local clone…

    Code Block
    languagenone
    git checkout master
    git pull
    git -m master main

    NOTE: git fetch is not sufficient.  You need to use git pull for this to work.

...

  • automated builds and deployments that reference master branch
    • building images that aren't from tags but from branches
    • Jenkins
    • Ansible
  • other tooling that references master branch
    • git aliases
    • local shell scripts
    • maintenance scripts for github API
    • git reflow or other 3rd party tools
  • Integrations
    • Github hooks, coveralls, code climate, hound, circleci
    • mirroring with other sources (e.g. gitlab mirroring github)
    • notifications to tools (e.g. slack integration)
  • documentation (eg. raw.github.com URLs)
    • wikis
    • READMEs
    • samvera.github.io
    • samvera.org
    • github pages for the project
    • Contributing
  • references to master in code
    • Gemfile pins
    • To possible JSON documents in Github repos
  • forks
    • Within "usual" contributors
    • Other "users"
      • In particular, Browse Everything has utility outside of Samvera's adopters

Case Study: samvera-circleci-orb:

https://github.com/samvera-labs/samvera-circleci-orb/issues/45

Ran:

Code Block
languagenone
github-default-branch --repo samvera-labs/samvera-circleci-orb --pat <token> --verbose --dry-run
github-default-branch --repo samvera-labs/samvera-circleci-orb --pat <token> --verbose


Checklist:

  •  renames master to main
    •  branch dropdown defaults to main
    •  master is not in the branch dropdown
  •  Settings → Branches
    •  main is the default branch
    •  branch rules were copied over to main
    •  master branch is not in the branch dropdown under Default branch
    •  master branch is not listed in the Branch protection rules area
  •  updates issues
    •  changes reference to a sha in master to the same sha in main (N/A)
    •   changes links to code in master branch to the same code in main (NOTE: Even though the link text and URL were not changed, GitHub forwards all 404 to the default branch which is main.) (See https://github.com/samvera-labs/samvera-circleci-orb/issues/29)
  •  updates PRs
    •  updates 'commit into' branch to main for all PRs (NOTE:
    •   updates links to code in master branch to the same code in main (NOTE: Even though the link text and URL were not changed, GitHub forwards all 404 to the default branch which is main.) (N/A)
  •  wiki updated
    •   updates links to code in master branch to the same code in main (NOTE: Even though the link text and URL were not changed, GitHub forwards all 404 to the default branch which is main.) (N/A)
  •  local git repo (N/A)
    •  updates to local master tracking origin/master to local main tracking origin/main
    •  updates branches based on origin/master to origin/main
    •  updates branches based on local master to local main
    •  in second repo, updates pin to master sha in the repo having the branch renamed
  •  working with Forks
    •  TBD (One exists but no noticeable changes as expected)
  •  README and other documents (N/A - Already done in https://github.com/samvera-labs/samvera-circleci-orb/commit/dda15dde353dc8303382507ab5601757bd3651b8)
  •  Integrations:
    •  CircleCI (Ran fine with no changes on a rebased branch)

Other locations text "master" still exists (found via github search):

  • Comments on PRs about repointing to main from tool running
  • Links to code outside this repository
  • Issues and PRs related to the renaming