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

allow git-node land to work with full PR url (#213) #219

Merged
merged 3 commits into from
Mar 23, 2018

Conversation

aks-
Copy link
Member

@aks- aks- commented Mar 16, 2018

Fixes: #213

@codecov
Copy link

codecov bot commented Mar 16, 2018

Codecov Report

Merging #219 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #219   +/-   ##
======================================
  Coverage    92.1%   92.1%           
======================================
  Files          18      18           
  Lines         659     659           
======================================
  Hits          607     607           
  Misses         52      52

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 704547d...e309178. Read the comment docs.

@@ -59,7 +61,7 @@ const CONTINUE = 'continue';
const ABORT = 'abort';

function handler(argv) {
if (argv.prid && Number.isInteger(argv.prid)) {
if (argv.prid && (Number.isInteger(argv.prid) || isUrl(argv.prid))) {
Copy link
Member

@joyeecheung joyeecheung Mar 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't really need this module, do we? We can simply use a regexp to validate & capture the id: argv.prid.match(/github.com\/[^\/]+\/[^\/]+\/pull\/(\d+)/)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joyeecheung makes sense, also helps having less direct dependencies as they are 👍. making changes in few

@@ -11,6 +11,7 @@ $ ncu-config set branch master # Assuming you are landing commits on master
$ git checkout master
$ git node land --abort # Abort a landing session, just in case
$ git node land $PRID # Start a new landing session
$ git node land $URL # Start a new landing session
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put something down in the comment indicating this is an alternative way to land a PR, not a necessary step? Something like

git node land $URL             # Or, start a new landing session using the PR URL

Copy link
Contributor

@priyank-p priyank-p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with @joyeecheung's comment addressed.

@aks-
Copy link
Member Author

aks- commented Mar 20, 2018

@joyeecheung updated. i think it should be ready to land now

@aks- aks- force-pushed the add-url-land-support branch from b1fe9f0 to 6073324 Compare March 20, 2018 11:11
Copy link
Member

@gibfahn gibfahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with suggestion

@@ -11,6 +11,7 @@ $ ncu-config set branch master # Assuming you are landing commits on master
$ git checkout master
$ git node land --abort # Abort a landing session, just in case
$ git node land $PRID # Start a new landing session
$ git node land $URL # Start a new landing session using the PR URL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a suggestion, but it might make more sense to merge this into the line above, and just say that $PRID can be the PR number or the PR URL.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gibfahn hm, i don't think it makes big difference, i think it's fine to have them on separate line? i'm okay with changing it though. just let me know...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also don't think it makes a big difference, which is why it was just a suggestion. If you think it's fine as is, then that's fine by me.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, then ready to land i guess?

docs/git-node.md Outdated
@@ -32,6 +32,7 @@ $ ncu-config set branch master # Assuming you are landing commits on master
$ git checkout master
$ git node land --abort # Abort a landing session, just in case
$ git node land $PRID # Start a new landing session
$ git node land $URL # Start a new landing session
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update this line as well?

Copy link
Member Author

@aks- aks- Mar 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joyeecheung done, thanks for catching that

@aks- aks- force-pushed the add-url-land-support branch from 6073324 to e309178 Compare March 22, 2018 15:28
@aks-
Copy link
Member Author

aks- commented Mar 23, 2018

@joyeecheung @gibfahn changes applied. can you please check now?

@gibfahn
Copy link
Member

gibfahn commented Mar 23, 2018

I already approved, if @joyeecheung approves then it can be landed.

@joyeecheung joyeecheung merged commit 598a3a2 into nodejs:master Mar 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants