Skip to content

Migrating Plugins repository PRs to Packages

Ian Hickson edited this page Aug 6, 2023 · 9 revisions

This is now obsolete.

As described in https://flutter.dev/go/flutter-plugins-repo-migration, the flutter/plugins repository is being merged into flutter/packages. Since there is no automatic way to move PRs to another repository, open PRs in flutter/plugins need to be re-created in flutter/packages. There are several possible ways to do this, but the following is our suggested process.

  1. Update the local branch corresponding to your PR (in your local clone of flutter/plugins) to the last version of flutter/plugins. For example, if your upstream remote is called upstream (as recommend in the setup instructions), and your PR's branch is my-branch:

    git fetch upstream
    git checkout my-branch
    git merge 557d3284ac9dda32a1106bb75be8a23bdccd2f96

    Resolve any conflicts as usual, so that you have a set of changes that apply cleanly to the final state of flutter/plugins (which is what 557d3284ac9dda32a1106bb75be8a23bdccd2f96 corresponds to).

  2. Create a diff file corresponding to your changes:

    git diff 557d3284ac9dda32a1106bb75be8a23bdccd2f96 > /tmp/my-branch.patch
  3. Ensure that your clone of flutter/packages is up to date (or if you don't have one yet, set one up):

    git fetch upstream
  4. Create a new branch from the hash where flutter/plugins was first imported into flutter/packages, to ensure that the code matches the base of the patch file you created above. Then make sure your branch is in a clean state with no local changes yet:

    git checkout -b my-branch 2e1673307ff7454aff40b47024eaed49a9e77e81
    git status
  5. Apply and commit the changes from your patch file. Make sure you are at the root of your flutter/plugins clone when running these commands:

    git apply /tmp/my-branch.patch
    git add .
    git commit -m "Recreating PR from flutter/plugins"
  6. Push the branch and create a PR as normal. In the PR description, please mention that it was created from a previous PR, and link to the flutter/plugins PR, so that reviewers can easily get to any previous discussion or review.

    • If you aren't following these steps very shortly after the repository merge, consider syncing it to the latest version of main using your normal PR workflow.
    • If you move a PR that had active review comments that you haven't addressed yet, please mark the PR as a Draft until you've updated it, so that reviewers know that it's not ready for another look yet.

The Flutter team will make sure that the right reviewers are transferred over from the original PR (using the link you provided in the PR description) during weekly triage, but you are also welcome to add a comment after creating the PR pinging the original reviewers using @-mentions to let them know that the PR has been migrated.

Flutter Wiki

Process

Framework repo

The Flutter CLI Tool

Engine repo

Packages repo

Engineering Productivity

User documentation

Clone this wiki locally