You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd be nice if I could do get-metadata (or get-metadata @) if I'm on a fork branch with an open PR.
Could do something like:
# Get the remote url of the upstream branch (if it exists).
remote=$(git remote get-url $(git rev-parse --abbrev-ref --symbolic-full-name @{u} | cut -d / -f 1))
branch=$(git symbolic-ref --short HEAD)# Or branch parameter passed.# Convert to https:// syntax if it's ssh syntax (git@github.com)# Work out what PR has that as a base branch# Pass PR number through to the rest of get-metadata.
#106 kinda needs this as well, although that one is for landing PRs that are not necessarily opened by the people landing them. I am thinking a git node config command to associate remote/branch settings so the configuration persists and we don't have to pass the parameter all the time. The prototype in https://asciinema.org/a/6i3gFDSAr7L6fYPSEaMrW0asO uses manually edited fields in ~/.ncurc at the moment but it would attempt to override settings from <project_dir>/.ncu/config
Also it would be convenient if I can git node pr --open from the current branch, which open the PR and associate the branches for you, a bit like git cl upload of chromium/v8. That doesn't seem very difficult once #106 works out.
I am thinking a git node config command to associate remote/branch settings so the configuration persists and we don't have to pass the parameter all the time.
Config option makes sense, although I think working it out from the remote branch that the local one is tracking is a good fallback.
git node pr --open from the current branch, which open the PR and associate the branches for you, a bit like git cl upload of chromium/v8.
What do you mean by associating the branches for you? I can see that you could automate the "raise PR from fork/mybranch against upstream/master with this comment".
@gibfahn It means the .ncu folder somehow stores the relationship between pr ids and it's remote branch + base branch, no matter the relationship comes from
Worked out as OP suggests (using Github API?) Maybe git node pr --guess && get-metadata, and let get-metadata grab the PR after looking into .ncu if no PR ID is supplied
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.
Activity
joyeecheung commentedon Nov 21, 2017
#106 kinda needs this as well, although that one is for landing PRs that are not necessarily opened by the people landing them. I am thinking a
git node configcommand to associate remote/branch settings so the configuration persists and we don't have to pass the parameter all the time. The prototype in https://asciinema.org/a/6i3gFDSAr7L6fYPSEaMrW0asO uses manually edited fields in~/.ncurcat the moment but it would attempt to override settings from<project_dir>/.ncu/configjoyeecheung commentedon Nov 21, 2017
Also it would be convenient if I can
git node pr --openfrom the current branch, which open the PR and associate the branches for you, a bit likegit cl uploadof chromium/v8. That doesn't seem very difficult once #106 works out.gibfahn commentedon Nov 21, 2017
Config option makes sense, although I think working it out from the remote branch that the local one is tracking is a good fallback.
What do you mean by associating the branches for you? I can see that you could automate the "raise PR from fork/mybranch against upstream/master with this comment".
joyeecheung commentedon Nov 21, 2017
@gibfahn It means the
.ncufolder somehow stores the relationship between pr ids and it's remote branch + base branch, no matter the relationship comes fromgit node pr --guess && get-metadata, and letget-metadatagrab the PR after looking into.ncuif no PR ID is suppliedgit node pr --set <prid> <branch> [base branch](just some imaginary commands)git node pr --open [base branch](opens the PR for you so it will know the PR ID and save it to.ncu)joyeecheung commentedon Nov 21, 2017
Aside: it would be great if
git node pr --openalso kicks of the CI automatically (after receiving a yes from the prompt)evanlucas commentedon Nov 21, 2017
@joyeecheung I had previously worked on something to kick off a CI run at https://github.com/evanlucas/nodejs-ci-ctl
joyeecheung commentedon Nov 22, 2017
@evanlucas Awesome, I will see if I can integrate that into the git commands
github-actions commentedon Aug 18, 2020
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.