Skip to content

New tool: git node bp for backporting a PR #194

Closed

Description

@joyeecheung

Rough idea:

ncu-config set remote upstream
ncu-config set branch v8.x-staging
git node bp --to v8.x-staging <prid1> <prid2>
# Fetch upstream/master
# Bring local v8.x-staging up-to-date with upstream/v8.x-staging
# git checkout -b backport-<prid1>-<prid2>-to-v8.x-staging v8.x-staging
# Look for commits on upstream/master with PR-URL ending with the provided PR IDs
# Run git cherry-pick <sha> on each of these commit

# Resolve conflict for commit1 from prid1
git node bp --continue
# Runs git cherry-pick --continue and git cherry-pick commit2
git node bp --skip
# Runs git cherry-pick --abort and git cherry-pick commit3
# Resolve conflict for commit3 from prid2
git node bp --continue
# Picked all commits that need to be backported now

Activity

  1. added
    new toolNew tool that could be added to node-core-utils
    on Feb 28, 2018
  2. gibfahn commented on Feb 28, 2018

    @gibfahn
    Member

    cc/ @nodejs/lts @nodejs/release

  3. jasnell commented on Feb 28, 2018

    @jasnell
    Member

    Nice

  4. gibfahn commented on Feb 28, 2018

    @gibfahn
    Member

    This is a great idea.

    It would be nice if the backport --to field could be worked out from the backport-requested-to-v*.x labels on the PR.

  5. BridgeAR commented on Apr 9, 2018

    @BridgeAR
    Member

    I suggest to accept both input types:

    1. Always add individual commit IDs
    2. Add a range and check all commits in the range for not being semver-major and add one after the other of the non-semver-major commits in (and by verifying that the commit does not yet exist on the branch - that is probably not that easy).

    Especially the second version would allow for mass backporting in a easy fashion.

  6. github-actions commented on Aug 17, 2020

    @github-actions
    Contributor

    This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.

  7. codebytere commented on Aug 17, 2020

    @codebytere
    Member

    This has been implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    new toolNew tool that could be added to node-core-utils

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions