Add additions and deletions in pr view raw as well

This commit is contained in:
Gowtham Munukutla 2021-03-05 13:41:25 +05:30
parent 9944698665
commit bdd663e658
2 changed files with 4 additions and 0 deletions

View file

@ -676,6 +676,8 @@ func PullRequestForBranch(client *Client, repo ghrepo.Interface, baseBranch, hea
state
body
mergeable
additions
deletions
author {
login
}

View file

@ -138,6 +138,8 @@ func printRawPrPreview(io *iostreams.IOStreams, pr *api.PullRequest) error {
fmt.Fprintf(out, "milestone:\t%s\n", pr.Milestone.Title)
fmt.Fprintf(out, "number:\t%d\n", pr.Number)
fmt.Fprintf(out, "url:\t%s\n", pr.URL)
fmt.Fprintf(out, "additions:\t+%s\n", cs.Green(strconv.Itoa(pr.Additions)))
fmt.Fprintf(out, "deletions:\t-%s\n", cs.Red(strconv.Itoa(pr.Deletions)))
fmt.Fprintln(out, "--")
fmt.Fprintln(out, pr.Body)