From a3aea11e5bc7ce42286106006372e7516252b5f2 Mon Sep 17 00:00:00 2001 From: Dan Hughes Date: Wed, 26 Aug 2020 17:28:17 +0100 Subject: [PATCH] Include URL and number in non-TTY output --- pkg/cmd/pr/view/view.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/pr/view/view.go b/pkg/cmd/pr/view/view.go index 169d989f1..e473bd212 100644 --- a/pkg/cmd/pr/view/view.go +++ b/pkg/cmd/pr/view/view.go @@ -48,7 +48,7 @@ func NewCmdView(f *cmdutil.Factory, runF func(*ViewOptions) error) *cobra.Comman Without an argument, the pull request that belongs to the current branch is displayed. - + With '--web', open the pull request in a web browser instead. `), Args: cobra.MaximumNArgs(1), @@ -114,6 +114,8 @@ func printRawPrPreview(out io.Writer, pr *api.PullRequest) error { fmt.Fprintf(out, "reviewers:\t%s\n", reviewers) fmt.Fprintf(out, "projects:\t%s\n", projects) 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.Fprintln(out, "--") fmt.Fprintln(out, pr.Body)