Samvera Community Wiki
Effectiveness of Tool: github-default-branch - Samvera Branch Renaming Working Group
Setup
Create a test repo with a master branch, issues, PRs - See samvera-labs/branch-renaming-wg for a script to do this.
Within the test repo, create a wiki page that references a branch in master.
Within the test repo, add branch settings under Settings → Branches
Create a Fork of the test repo.
Clone the test repo to your local machine.
Clone the Fork to your local machine.
Create a second repo with a pin in the Gemfile to a master sha in the repo having the branch renamed
Tool: gitHub-default-branch
Reference:
Usage:
install with
npm install -g github-default-branchrun with
github-default-branch --pat <github_access_token> --repo <github_username>/branch-renaming-testOnce complete, all local clones will need to run the following to update their
masterbranch to be connected toorigin/mainFrom the directory for the local clone…git checkout master git pull git branch -m mainNOTE:
git fetchis not sufficient. You need to usegit pullfor this to work.
Checklist:
Additional areas not tested
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:
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> --verboseChecklist:
Locations text "master" still exists (mostly 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
Closed PRs (not in github search)