Verified Commit e345ca67 authored by Kai Armstrong's avatar Kai Armstrong Committed by GitLab
Browse files

Merge branch 'karmstrong/jq-flag' into 'main'

feat: add global --jq flag for filtering JSON output

See merge request gitlab-org/cli!3295



Merged-by: Kai Armstrong's avatarKai Armstrong <karmstrong@gitlab.com>
Approved-by: default avatarGary Holtz <gholtz@gitlab.com>
Reviewed-by: default avatarGary Holtz <gholtz@gitlab.com>
Reviewed-by: Timo Furrer's avatarTimo Furrer <tfurrer@gitlab.com>
parents dba1338a 1f49782a
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ glab ci get --merge-request=42 --status=failed --with-job-details

```plaintext
  -b, --branch string       Get the pipeline for a branch. Defaults to the current branch.
      --jq string           Filter JSON output with a jq expression.
      --merge-request int   Show the pipeline for the given merge request <iid>.
  -F, --output string       Format output. Options: text, json. (default "text")
  -p, --pipeline-id int     Get the pipeline with the given <id>.
+1 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ glab ci list --status=failed
## Options

```plaintext
      --jq string               Filter JSON output with a jq expression.
  -n, --name string             Return only pipelines with the given name.
  -o, --order string            Order pipelines by this field. Options: id, status, ref, updated_at, user_id. (default "id")
  -F, --output string           Format output. Options: text, json. (default "text")
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ glab ci status
```plaintext
  -b, --branch string   Check pipeline status for a branch. Defaults to the current branch.
  -c, --compact         Show status in compact format.
      --jq string       Filter JSON output with a jq expression.
  -l, --live            Show status in real time until the pipeline ends.
  -F, --output string   Format output as: text, json. Note: JSON output is not compatible with --live or --compact flags. (default "text")
```
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ glab cluster agent get-token --agent 123
  -a, --agent int                        The numerical Agent ID to connect to.
  -c, --cache-mode string                Mode to use for caching the token. Allowed values: keyring-filesystem-fallback, force-keyring, force-filesystem, no (default "force-keyring")
      --check-revoked                    Check if a cached token is revoked. This requires an API call to GitLab which adds latency every time a cached token is accessed.
      --jq string                        Filter JSON output with a jq expression.
      --token-expiry-duration duration   Duration for how long the generated tokens should be valid for. Minimum is 1 day and the effective expiry is always at the end of the day, the time is ignored. (default 24h0m0s)
```

+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ glab cluster agent list --output json
## Options

```plaintext
      --jq string       Filter JSON output with a jq expression.
  -F, --output string   Format output as: text, json. (default "text")
  -p, --page uint       Page number. (default 1)
  -P, --per-page uint   Number of items to list per page. (default 30)
Loading