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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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