Skip to content

Commit bdd663e

Browse files
committed
Add additions and deletions in pr view raw as well
1 parent 9944698 commit bdd663e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

api/queries_pr.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,8 @@ func PullRequestForBranch(client *Client, repo ghrepo.Interface, baseBranch, hea
676676
state
677677
body
678678
mergeable
679+
additions
680+
deletions
679681
author {
680682
login
681683
}

pkg/cmd/pr/view/view.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ func printRawPrPreview(io *iostreams.IOStreams, pr *api.PullRequest) error {
138138
fmt.Fprintf(out, "milestone:\t%s\n", pr.Milestone.Title)
139139
fmt.Fprintf(out, "number:\t%d\n", pr.Number)
140140
fmt.Fprintf(out, "url:\t%s\n", pr.URL)
141+
fmt.Fprintf(out, "additions:\t+%s\n", cs.Green(strconv.Itoa(pr.Additions)))
142+
fmt.Fprintf(out, "deletions:\t-%s\n", cs.Red(strconv.Itoa(pr.Deletions)))
141143

142144
fmt.Fprintln(out, "--")
143145
fmt.Fprintln(out, pr.Body)

0 commit comments

Comments
 (0)