From 800f99d9fa9fcdc32a0c37a3eed46586f64ff987 Mon Sep 17 00:00:00 2001 From: Arun Date: Thu, 8 Aug 2024 21:27:35 -0700 Subject: [PATCH] Describe bucket and state JSON fields in pr checks command While the `state` field corresponds 1:1 with different GitHub Actions states, the `bucket` field is an abstraction of the CLI that lacked documentation. This both adds documentation about the existence of the `bucket` field and enumerates the possible values. --- pkg/cmd/pr/checks/checks.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/pr/checks/checks.go b/pkg/cmd/pr/checks/checks.go index 40b395897d8..797c19c199a 100644 --- a/pkg/cmd/pr/checks/checks.go +++ b/pkg/cmd/pr/checks/checks.go @@ -61,15 +61,18 @@ func NewCmdChecks(f *cmdutil.Factory, runF func(*ChecksOptions) error) *cobra.Co cmd := &cobra.Command{ Use: "checks [ | | ]", Short: "Show CI status for a single pull request", - Long: heredoc.Doc(` + Long: heredoc.Docf(` Show CI status for a single pull request. Without an argument, the pull request that belongs to the current branch is selected. + When the %[1]s--json%[1]s flag is used, it includes a %[1]sbucket%[1]s field, which categorizes + the %[1]sstate%[1]s field into %[1]spass%[1]s, %[1]sfail%[1]s, %[1]spending%[1]s, %[1]sskipping%[1]s, or %[1]scancel%[1]s. + Additional exit codes: 8: Checks pending - `), + `, "`"), Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { opts.Finder = shared.NewFinder(f)