migrate-pullreqs

command module
v0.0.0-...-f0f84b1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2020 License: ISC Imports: 7 Imported by: 0

README

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>

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL