Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
joyeecheung opened this issue Feb 28, 2018 · 6 comments
Closed

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

joyeecheung opened this issue Feb 28, 2018 · 6 comments
Labels
new tool New tool that could be added to node-core-utils

Comments

@joyeecheung
Copy link
Member

joyeecheung commented Feb 28, 2018

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
@joyeecheung joyeecheung added the new tool New tool that could be added to node-core-utils label Feb 28, 2018
@gibfahn
Copy link
Member

gibfahn commented Feb 28, 2018

cc/ @nodejs/lts @nodejs/release

@jasnell
Copy link
Member

jasnell commented Feb 28, 2018

Nice

@gibfahn
Copy link
Member

gibfahn commented Feb 28, 2018

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.

@BridgeAR
Copy link
Member

BridgeAR commented Apr 9, 2018

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.

@github-actions
Copy link
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.

@github-actions github-actions bot added the stale label Aug 17, 2020
@codebytere
Copy link
Member

This has been implemented.

@targos targos removed the stale label Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new tool New tool that could be added to node-core-utils
Projects
None yet
Development

No branches or pull requests

6 participants