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

Viewed 95

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 Answers

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

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

Docs for reference

Related