how to get number of lines changed in a PR using gh cli command

673 Views Asked by At

I would like to find a number of lines changed for a PR using the gh cli command. Thank you for the help in advance.

1

There are 1 best solutions below

0
On

You can run gh pr view <pr number> --json additions,deletions which will return something like

{
  "additions": 0,
  "deletions": 0
}

Docs for reference