Skip to content

octo/migrate-pullreqs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

migrate-pullreqs

migrate-pullreqs is a utility that changes the base branch of a repository's pull requests in bulk.

Background

Like many other projects, collectd used the name master for the default development branch. We made the decision to use main instead going forward. Creating a new branch and changing the default is easy, but there were over 100 open pull requests referencing master as their base branch, i.e. the branch they wanted to get merged into.

This tool was written to change the base branch of all these pull requests efficiently.

Usage

  • Get a Github OAuth access token
    • Open the settings menu (your icon in the upper right-hand corner → Settings)
    • Developer Settings → Personal access tokens → Generate new token
    • Add a note that lets you identify the use of this token, e.g. "Migrate pull requests from master to main".
    • Under "Select scopes", check "public_repo – Access public repositories"
    • Copy the token
  • Optional: Implement command line flags for this tool and send a PR ;-)
  • Alternative: Update the constants at the beginning of the main.go file.
    • Repository owner and repository name
    • Source and destination branch name
    • OAuth access token
  • Compile, run, profit!

License

ISC License

Author

Florian Forster <ff at octo.it>

About

Utility to migrate Github pull requests from one base branch to another.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages