Skip to content

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

Merged
joyeecheung merged 3 commits into
nodejs:masterfrom
aks-:add-url-land-support
Mar 23, 2018
Merged

joyeecheung merged 3 commits into
nodejs:masterfrom
aks-:add-url-land-support

Conversation

@aks-

@aks- aks- commented Mar 16, 2018 •

Copy link
Copy Markdown
Member

Fixes: #213

@codecov

codecov Bot commented Mar 16, 2018 •

Copy link
Copy Markdown

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.

Comment thread components/git/land.js Outdated

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

@joyeecheung joyeecheung Mar 16, 2018 •

Copy link
Copy Markdown
Member

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
Copy Markdown
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

Comment thread components/git/epilogue.js Outdated
$ 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
Copy Markdown
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

@priyank-p priyank-p left a comment

Copy link
Copy Markdown
Contributor

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-

aks- commented Mar 20, 2018 •

Copy link
Copy Markdown
Member Author

@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

@gibfahn gibfahn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM with suggestion

$ 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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?

Comment thread docs/git-node.md Outdated
$ 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
Copy Markdown
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?

@aks- aks- Mar 22, 2018 •

Copy link
Copy Markdown
Member Author

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-

aks- commented Mar 23, 2018

Copy link
Copy Markdown
Member Author

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

@gibfahn

gibfahn commented Mar 23, 2018

Copy link
Copy Markdown
Member

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