mirror of
https://github.com/vince-winkintel/gitlab-cli-skills.git
synced 2026-09-19 06:01:21 +08:00
docs: refresh glab skills for v1.117.0 (#89)
* docs: refresh glab skills for v1.117.0 * [verified] fix: address PR review feedback --------- Co-authored-by: Victor Hermes <victor-hermes@users.noreply.github.com>
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
1.13.26
|
||||
1.13.27
|
||||
|
||||
Release/version change metadata for this skill set lives here, not in individual skill files.
|
||||
|
||||
Historical notes consolidated from skill docs:
|
||||
- v1.13.27
|
||||
- glab v1.117.0 refresh: added experimental `--attach` guidance and checksum-verified help for issue, incident, merge request, merge request note, and project-scoped work-item descriptions/comments, including repeated files, stdin, append-versus-replace behavior, fork targets, and flag conflicts.
|
||||
- Added the experimental `glab dependency-firewall npm` wrapper, including repository/auth prerequisites, verbatim npm argument forwarding, unchanged package-manager registry configuration, policy enforcement, and the `glab help dependency-firewall npm` discovery path.
|
||||
- Documented non-interactive authentication host precedence and semi-interactive prompt-skipping flags, complete alias expansion in `alias list`, inherited flags in MCP tool schemas, and `repo create --skipGitInit` behavior.
|
||||
- Reviewed access-token-only OAuth credential-helper handling, telemetry, config/docs moves, and project caching changes; no additional skill command surfaces were required.
|
||||
- v1.13.26
|
||||
- glab v1.116.0 refresh: replaced the generated `glab config` setting reference with the complete checksum-verified release-binary help, including canonical global/per-host keys, accepted aliases, scoping, pager precedence, and the `debug` setting.
|
||||
- Documented that `glab config set` now accepts registered aliases and that `glab_pager` and `debug` are valid settings; verified canonical alias persistence with an isolated config directory.
|
||||
|
||||
@@ -138,7 +138,7 @@ standalone skill in a sibling directory; open its `SKILL.md` for full details.
|
||||
- [`glab-artifact-registry`](../glab-artifact-registry/SKILL.md) - Experimental short-lived Artifact Registry token exchange and access checks
|
||||
- [`glab-cluster`](../glab-cluster/SKILL.md) - Kubernetes cluster integration
|
||||
- [`glab-container-registry`](../glab-container-registry/SKILL.md) - Container registry repositories and tags
|
||||
- [`glab-dependency-firewall`](../glab-dependency-firewall/SKILL.md) - Beta local package-manager registry policy configuration and CI activity summaries
|
||||
- [`glab-dependency-firewall`](../glab-dependency-firewall/SKILL.md) - Experimental npm policy-enforcement wrapper and local Dependency Firewall activity summaries
|
||||
- [`glab-deploy-key`](../glab-deploy-key/SKILL.md) - Deploy keys for automation
|
||||
- [`glab-orbit`](../glab-orbit/SKILL.md) - GitLab Knowledge Graph / Orbit discovery, schema inspection, and remote query workflows (EXPERIMENTAL)
|
||||
- [`glab-quick-actions`](../glab-quick-actions/SKILL.md) - GitLab slash command quick actions for batching state changes
|
||||
|
||||
@@ -30,8 +30,11 @@ description: Create, list, and delete GitLab CLI command aliases and shortcuts.
|
||||
|
||||
```bash
|
||||
glab alias --help
|
||||
glab alias list
|
||||
```
|
||||
|
||||
`glab alias list` wraps long rows instead of truncating expansions at a fixed column width, so the complete stored command remains visible. Treat shell aliases as executable code and review the full expansion before running an unfamiliar alias.
|
||||
|
||||
## Subcommands
|
||||
|
||||
See [references/commands.md](references/commands.md) for full `--help` output.
|
||||
|
||||
@@ -36,6 +36,7 @@ glab auth logout
|
||||
4. Verify with `glab auth status`
|
||||
|
||||
> `glab auth login` supports a complete setup flow:
|
||||
> - `--api-host` to explicitly set a different API/Web endpoint for self-hosted instances
|
||||
> - `--ssh-hostname` to explicitly set a different SSH endpoint for self-hosted instances
|
||||
> - `--web` to skip the login-type prompt and go straight to browser/OAuth auth
|
||||
> - `--container-registry-domains` to preconfigure registry / dependency-proxy domains during login
|
||||
@@ -44,6 +45,8 @@ glab auth logout
|
||||
|
||||
For personal access tokens, glab requires at least `api` and `write_repository`. GitLab 18.9 introduced `https://<host>/-/user_settings/personal_access_tokens/legacy/new?scopes=api,write_repository`; that route does not exist on earlier releases. GitLab 18.8 and earlier use `https://<host>/-/user_settings/personal_access_tokens?scopes=api,write_repository` instead. Use the URL for the target instance rather than assuming the current GitLab.com route exists on an older self-managed server.
|
||||
|
||||
In non-interactive login, omitting `--hostname` resolves the target in this order: the base repository's GitLab remote, `GITLAB_HOST`, the configuration `host`, then `gitlab.com`. For credential writes, prefer an explicit `--hostname` when the surrounding repository or environment is not intentionally authoritative.
|
||||
|
||||
### Login flag examples
|
||||
|
||||
```bash
|
||||
@@ -61,6 +64,12 @@ glab auth login \
|
||||
--web \
|
||||
--container-registry-domains "registry.gitlab.com,gitlab.com"
|
||||
|
||||
# Supply every self-managed endpoint so only browser authorization remains interactive
|
||||
glab auth login --hostname gitlab.example.com --web \
|
||||
--api-host gitlab.example.com --ssh-hostname gitlab.example.com \
|
||||
--api-protocol https --git-protocol ssh \
|
||||
--container-registry-domains registry.gitlab.example.com
|
||||
|
||||
# Explicitly opt out of keyring storage (stores the token as plaintext)
|
||||
glab auth login --hostname gitlab.company.com --insecure-storage \
|
||||
--stdin < approved-token-file
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
|
||||
Source: <https://docs.gitlab.com/cli/auth/>
|
||||
|
||||
> Help output captured from `glab auth <subcommand> --help`.
|
||||
> Selected help blocks were refreshed from the checksum-verified glab v1.117.0 macOS arm64 release binary. Refreshed renderer output removes terminal padding and trailing whitespace; untouched legacy blocks may retain older padding or inherited-flag wording. In the `login` examples, renderer ellipses are replaced with complete example lines from the v1.117.0 release documentation.
|
||||
|
||||
## login
|
||||
|
||||
```
|
||||
Authenticates with a GitLab instance.
|
||||
|
||||
Authenticates with a GitLab instance.
|
||||
|
||||
By default, glab stores your credentials in your operating system's
|
||||
keyring (macOS Keychain, Windows Credential Manager, or the Secret
|
||||
@@ -35,6 +36,15 @@ Authenticates with a GitLab instance.
|
||||
In interactive mode, glab detects GitLab instances from your Git remotes
|
||||
and lists them as options, so you do not have to type the hostname manually.
|
||||
|
||||
When you omit `--hostname` in a non-interactive run, glab authenticates
|
||||
with the first of these that applies:
|
||||
|
||||
- The host of the base repository, if you're in a Git repository with a GitLab remote.
|
||||
- The `GITLAB_HOST` environment variable, if it's set.
|
||||
- The `host` key in your configuration file, if it's set.
|
||||
- `gitlab.com`, if none of the above apply.
|
||||
|
||||
|
||||
USAGE
|
||||
|
||||
glab auth login [--flags]
|
||||
@@ -60,6 +70,10 @@ Authenticates with a GitLab instance.
|
||||
# Semi-interactive OAuth login, skipping all prompts except browser auth
|
||||
glab auth login --hostname gitlab.com --web --git-protocol ssh --container-registry-domains "gitlab.com,gitlab.com:443,registry.gitlab.com"
|
||||
|
||||
# Semi-interactive OAuth login for GitLab Self-Managed, with every
|
||||
# prompted value supplied by a flag.
|
||||
glab auth login --hostname gitlab.example.com --web --api-host gitlab.example.com --ssh-hostname gitlab.example.com --api-protocol https --git-protocol ssh --container-registry-domains registry.gitlab.example.com
|
||||
|
||||
# OAuth device authorization flow for headless environments without a local browser.
|
||||
# glab displays a one-time code and verification URL; you authorize on any
|
||||
# other device with a browser. Requires GitLab 17.9 or later.
|
||||
@@ -73,19 +87,20 @@ Authenticates with a GitLab instance.
|
||||
|
||||
FLAGS
|
||||
|
||||
-a --api-host Hostname for the API endpoint, if different from --hostname. Accepts a hostname or hostname:port. Use only when the API is served from a different host than the Git remote.
|
||||
-a --api-host Hostname for the API endpoint, if different from --hostname. Accepts a hostname or hostname:port. Also skips the API hostname prompt in interactive mode.
|
||||
-p --api-protocol Api protocol. Options: https, http.
|
||||
--container-registry-domains Container registry and image dependency proxy domains, comma-separated.
|
||||
--device Use the OAuth 2.0 device authorization flow. Useful for headless environments where a local browser is not available. Requires GitLab 17.9 or later.
|
||||
-g --git-protocol Git protocol. Options: ssh, https, http.
|
||||
-h --help Show help for this command.
|
||||
--hostname The hostname of the GitLab instance to authenticate with.
|
||||
--hostname The hostname of the GitLab instance to authenticate with. When omitted, glab prompts in interactive mode, or uses the host resolved from your Git remotes, GITLAB_HOST, and your configuration.
|
||||
--insecure-storage Store the token as plaintext in the configuration file instead of the operating system's keyring.
|
||||
-j --job-token Ci job token.
|
||||
--ssh-hostname Ssh hostname for instances with a different SSH endpoint. A port is not required; Git uses the port from the remote URL.
|
||||
--ssh-hostname Ssh hostname for instances with a different SSH endpoint. A port is not required; Git uses the port from the remote URL. Also skips the SSH hostname prompt in interactive mode.
|
||||
--stdin Read the token from standard input.
|
||||
-t --token Your GitLab access token.
|
||||
--web Skip the login type prompt and use web/OAuth login.
|
||||
|
||||
```
|
||||
|
||||
## logout
|
||||
|
||||
@@ -1,19 +1,36 @@
|
||||
---
|
||||
name: glab-dependency-firewall
|
||||
description: Inspect GitLab Dependency Firewall activity from local package-manager workflows with glab. Use when summarizing blocked or flagged packages from CI logs, reviewing .gitlab/df/ci-log.json, or troubleshooting Dependency Firewall exit codes. Triggers on dependency firewall, glab df, glab dependency-firewall, npm registry policy, ci-summary, blocked package, flagged package.
|
||||
description: Run npm through GitLab Dependency Firewall and inspect local firewall activity with glab. Use when enforcing dependency policy during npm commands, summarizing blocked or flagged packages from CI logs, reviewing .gitlab/df/ci-log.json, or troubleshooting Dependency Firewall exit codes. Triggers on dependency firewall, glab df, glab dependency-firewall, npm registry policy, ci-summary, blocked package, flagged package.
|
||||
---
|
||||
|
||||
# glab dependency-firewall
|
||||
|
||||
Inspect GitLab Dependency Firewall activity for local package-manager workflows. The current command group is marked experimental, and the verified release binary exposes `ci-summary` only; do not rely on older `configure` examples unless live help on the target machine still lists them.
|
||||
Run npm through GitLab Dependency Firewall and inspect recorded activity. The command group and npm wrapper are experimental; confirm availability before relying on them in durable automation.
|
||||
|
||||
## Quick start
|
||||
|
||||
```bash
|
||||
# Summarize the current working directory's Dependency Firewall CI log
|
||||
glab dependency-firewall ci-summary
|
||||
|
||||
# Run an npm install through the project policy
|
||||
glab dependency-firewall npm install left-pad
|
||||
```
|
||||
|
||||
## Run npm through the firewall
|
||||
|
||||
`glab dependency-firewall npm <npm args>` resolves the GitLab project from the current repository, obtains that project's Dependency Firewall policy, and forwards every remaining argument to npm verbatim. It checks package downloads and uploads, refuses blocked packages, and summarizes the run after npm exits.
|
||||
|
||||
```bash
|
||||
glab dependency-firewall npm install
|
||||
glab dependency-firewall npm ci --ignore-scripts
|
||||
glab dependency-firewall npm publish --dry-run
|
||||
```
|
||||
|
||||
The wrapper uses npm's existing registry configuration without modifying it. Run it inside a Git repository whose GitLab remote identifies the intended project, and verify glab authentication first. Treat a policy block as authoritative; do not retry outside the wrapper merely to bypass the result.
|
||||
|
||||
Because npm arguments are forwarded verbatim, `glab dependency-firewall npm --help` is an npm invocation rather than glab wrapper help. Use `glab help dependency-firewall npm` to inspect the wrapper's own help.
|
||||
|
||||
## Summarize CI activity
|
||||
|
||||
`ci-summary` reads `.gitlab/df/ci-log.json` relative to the current working directory. Run it from the same directory as the package-manager/Dependency Firewall operation that produced the log.
|
||||
@@ -46,12 +63,12 @@ Treat exit `3` as a policy result, not a transient command failure. Surface the
|
||||
- Confirm `.gitlab/df/ci-log.json` exists under the current working directory used for the command.
|
||||
- Do not assume a log in a repository root applies when the package manager ran in a nested workspace.
|
||||
|
||||
**A `configure` example fails:**
|
||||
- `glab dependency-firewall configure` is not exposed by the verified current release binary.
|
||||
- Re-check `glab dependency-firewall --help` on the target machine before using older docs or scripts.
|
||||
**Wrapper help is confusing:**
|
||||
- `glab dependency-firewall npm --help` is forwarded to npm after glab resolves the GitLab project, so outside a GitLab-remote repository it may fail before showing any npm help.
|
||||
- Use `glab help dependency-firewall npm` for glab's wrapper help.
|
||||
|
||||
**Unsupported package manager:**
|
||||
- The current visible command surface does not configure package managers.
|
||||
- The current visible wrapper command supports npm; support code for other managers does not make their commands public.
|
||||
- Do not invent configuration for another manager; check live help or official docs for the target glab/GitLab version.
|
||||
|
||||
## Command reference
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# glab dependency-firewall command reference
|
||||
|
||||
> Help output captured from the checksum-verified glab v1.115.0 macOS arm64 release binary. Terminal padding and trailing whitespace are removed.
|
||||
> Help output captured from the checksum-verified glab v1.117.0 macOS arm64 release binary. Terminal padding and trailing whitespace are removed. The npm wrapper help uses `glab help dependency-firewall npm` because wrapper arguments are forwarded to npm verbatim.
|
||||
|
||||
## dependency-firewall
|
||||
|
||||
@@ -24,11 +24,12 @@ Alias: `df`
|
||||
|
||||
COMMANDS
|
||||
|
||||
ci-summary Summarize Dependency Firewall activity from the CI log. (EXPERIMENTAL)
|
||||
ci-summary Summarize Dependency Firewall activity from the CI log. (EXPERIMENTAL)
|
||||
npm <npm args> Run npm through the GitLab Dependency Firewall. (EXPERIMENTAL)
|
||||
|
||||
FLAGS
|
||||
|
||||
-h --help Show help for this command.
|
||||
-h --help Show help for this command.
|
||||
|
||||
```
|
||||
|
||||
@@ -69,3 +70,37 @@ Alias: `df`
|
||||
-h --help Show help for this command.
|
||||
|
||||
```
|
||||
|
||||
## dependency-firewall npm
|
||||
|
||||
```text
|
||||
|
||||
Run the npm binary through the GitLab Dependency Firewall. The command checks each package download and upload against
|
||||
the policy for the current project, refuses blocked packages, and summarizes the results after the run.
|
||||
|
||||
The command uses your package manager's registry or index configuration, and does not modify it.
|
||||
|
||||
All arguments are forwarded to npm verbatim.
|
||||
|
||||
This feature is an experiment and is not ready for production use.
|
||||
It might be unstable or removed at any time.
|
||||
For more information, see
|
||||
https://docs.gitlab.com/policy/development_stages_support/.
|
||||
|
||||
|
||||
USAGE
|
||||
|
||||
glab dependency-firewall npm <npm args> [--flags]
|
||||
|
||||
EXAMPLES
|
||||
|
||||
# Install a package through the Dependency Firewall
|
||||
glab dependency-firewall npm install left-pad
|
||||
|
||||
FLAGS
|
||||
|
||||
-h --help Show help for this command.
|
||||
|
||||
```
|
||||
|
||||
Because this experimental wrapper forwards arguments to npm verbatim, the displayed `-h`/`--help` flag is forwarded to npm and may require GitLab repository resolution first. Use `glab help dependency-firewall npm` for glab's wrapper help.
|
||||
|
||||
@@ -39,8 +39,15 @@ description: Manage GitLab incidents for issue tracking and incident management.
|
||||
|
||||
```bash
|
||||
glab incident --help
|
||||
|
||||
# Comment with a local attachment
|
||||
glab incident note 123 --message "Current dashboard state" --attach ./dashboard.png
|
||||
```
|
||||
|
||||
## Attach files to incident comments
|
||||
|
||||
The experimental `--attach <path>` flag uploads a file to the incident's project and appends the returned Markdown reference to the comment. Repeat it for multiple files. An attachment can be the entire comment and skips the editor; `--attach -` reads the attachment from standard input.
|
||||
|
||||
## Subcommands
|
||||
|
||||
See [references/commands.md](references/commands.md) for full `--help` output.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# glab incident help
|
||||
|
||||
> Help output captured from `glab incident --help`.
|
||||
> Selected help blocks were refreshed from the checksum-verified glab v1.117.0 macOS arm64 release binary. Refreshed renderer output removes terminal padding and trailing whitespace; untouched legacy blocks may retain older padding or inherited-flag wording.
|
||||
|
||||
```
|
||||
|
||||
@@ -98,17 +98,43 @@
|
||||
|
||||
```
|
||||
|
||||
Comment on an incident in GitLab.
|
||||
|
||||
USAGE
|
||||
|
||||
glab incident note <incident-id> [--flags]
|
||||
|
||||
FLAGS
|
||||
|
||||
Opens an editor for the comment if you don't use `--message`.
|
||||
|
||||
`--attach` uploads a file and references it at the end of the comment. Repeat the flag for more than one file, or pass
|
||||
`-` to read the file from standard input. An attachment is content on its own, so a comment with only `--attach` skips
|
||||
the editor.
|
||||
|
||||
The `--attach` flag is an experiment. It might be
|
||||
unstable or removed at any time, and is not ready for production use.
|
||||
For more information, see
|
||||
https://docs.gitlab.com/policy/development_stages_support/.
|
||||
|
||||
|
||||
USAGE
|
||||
|
||||
glab incident note <incident-id> [--flags]
|
||||
|
||||
EXAMPLES
|
||||
|
||||
# Comment on incident 123, opening an editor for the message
|
||||
glab incident note 123
|
||||
|
||||
# Comment with the message given inline
|
||||
glab incident note 123 --message "Looking into this now."
|
||||
|
||||
# Attach a screenshot alongside the message
|
||||
glab incident note 123 --message "Here is the repro." --attach ./screenshot.png
|
||||
|
||||
# Attach an image piped from the clipboard
|
||||
pngpaste - | glab incident note 123 --attach -
|
||||
|
||||
FLAGS
|
||||
|
||||
--attach (Experimental) Upload a file and reference it at the end of the comment. Use "-" to read the file from standard input. Repeat the flag to attach multiple files.
|
||||
-h --help Show help for this command.
|
||||
-m --message Message text.
|
||||
-R --repo Select another repository. Can use either `OWNER/REPO` or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
|
||||
-R --repo Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted.
|
||||
|
||||
```
|
||||
|
||||
## incident reopen
|
||||
@@ -206,4 +232,3 @@
|
||||
-s --system-logs Show system activities and logs.
|
||||
-w --web Open incident in a browser. Uses the default browser, or the browser specified in the $BROWSER variable.
|
||||
```
|
||||
|
||||
|
||||
@@ -17,6 +17,10 @@ glab issue create --title "Fix login bug" --label bug
|
||||
glab issue create --title "Fix login bug" --description-file description.md
|
||||
glab issue update 123 --description-file description.md
|
||||
|
||||
# Upload a screenshot and append its Markdown reference
|
||||
glab issue create --title "Fix login bug" --description "See below." --attach ./repro.png
|
||||
glab issue update 123 --attach ./after.png
|
||||
|
||||
# List open issues
|
||||
glab issue list --state opened
|
||||
|
||||
@@ -69,6 +73,8 @@ glab issue update https://gitlab.com/group/project/-/work_items/123 --label need
|
||||
|
||||
For one-off multi-line descriptions, use `--description-file <path>` or `--description-file -` for stdin. It is mutually exclusive with `--description`; on create, it is also mutually exclusive with `--template`. A file containing exactly `-` is rejected because `--description -` means "open an editor".
|
||||
|
||||
Use the experimental `--attach <path>` repeatedly to upload one or more local files and append GitLab-provided Markdown references to the description. `--attach -` reads one attachment from standard input; do not combine it with `--description-file -`, because both would consume stdin. On create, `--title` plus an attachment is enough for non-interactive operation. On update, attachments append to the existing description unless `--description` or `--description-file` supplies a replacement body.
|
||||
|
||||
2. **Add reproduction steps:**
|
||||
```bash
|
||||
glab issue note 456 -m "Steps to reproduce:
|
||||
@@ -77,8 +83,13 @@ glab issue update https://gitlab.com/group/project/-/work_items/123 --label need
|
||||
3. Click submit
|
||||
Expected: Dashboard loads
|
||||
Actual: 500 error"
|
||||
|
||||
# A file can accompany a message or be the entire comment
|
||||
glab issue note 456 -m "Screenshot from production" --attach ./repro.png
|
||||
```
|
||||
|
||||
Repeat `--attach` to preserve multiple uploads in argument order. An attachment-only note skips the editor; use `--attach -` when piping a single file through stdin.
|
||||
|
||||
### Issue triage
|
||||
|
||||
1. **List untriaged issues:**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# glab issue help
|
||||
|
||||
> Help output captured from `glab issue --help`.
|
||||
> Selected help blocks were refreshed from the checksum-verified glab v1.117.0 macOS arm64 release binary. Refreshed renderer output removes terminal padding and trailing whitespace; untouched legacy blocks may retain older padding or inherited-flag wording.
|
||||
|
||||
```
|
||||
|
||||
@@ -107,6 +107,15 @@ FLAGS
|
||||
description. Use `--web` to create the issue in your browser, or
|
||||
`--template` to start from an issue template.
|
||||
|
||||
`--attach` uploads a file and references it at the end of the description. Repeat the flag for more than one file, or
|
||||
pass `-` to read the file from standard input. An attachment satisfies the description requirement, so `--title` with
|
||||
`--attach` completes without prompting.
|
||||
|
||||
The `--attach` flag is an experiment. It might be
|
||||
unstable or removed at any time, and is not ready for production use.
|
||||
For more information, see
|
||||
https://docs.gitlab.com/policy/development_stages_support/.
|
||||
|
||||
The `--recover` flag is an experiment: it might be unstable or
|
||||
removed at any time, and is not ready for production use. For more
|
||||
information, see
|
||||
@@ -133,9 +142,13 @@ FLAGS
|
||||
# Read the description from standard input
|
||||
cat description.md | glab issue create -t "we need this feature" --description-file -
|
||||
|
||||
# Attach a screenshot to the description
|
||||
glab issue create -t "Login button misaligned" -d "See below." --attach ./screenshot.png
|
||||
|
||||
FLAGS
|
||||
|
||||
-a --assignee Assign issue to people by their `usernames`. Multiple usernames can be comma-separated or specified by repeating the flag.
|
||||
--attach (Experimental) Upload a file and reference it at the end of the description. Use "-" to read the file from standard input. Repeat the flag to attach multiple files.
|
||||
-c --confidential Set an issue to be confidential.
|
||||
-d --description Issue description. Set to "-" to open an editor.
|
||||
--description-file Read the issue description from a file. Use "-" to read from standard input.
|
||||
@@ -157,6 +170,7 @@ FLAGS
|
||||
--web Continue issue creation with web interface.
|
||||
-w --weight Issue weight. Valid values are greater than or equal to 0.
|
||||
-y --yes Don't prompt for confirmation to submit the issue.
|
||||
|
||||
```
|
||||
|
||||
## issue delete
|
||||
@@ -230,17 +244,43 @@ FLAGS
|
||||
|
||||
```
|
||||
|
||||
Comment on an issue in GitLab.
|
||||
|
||||
USAGE
|
||||
|
||||
glab issue note <issue-id> [--flags]
|
||||
|
||||
FLAGS
|
||||
|
||||
Opens an editor for the comment if you don't use `--message`.
|
||||
|
||||
`--attach` uploads a file and references it at the end of the comment. Repeat the flag for more than one file, or pass
|
||||
`-` to read the file from standard input. An attachment is content on its own, so a comment with only `--attach` skips
|
||||
the editor.
|
||||
|
||||
The `--attach` flag is an experiment. It might be
|
||||
unstable or removed at any time, and is not ready for production use.
|
||||
For more information, see
|
||||
https://docs.gitlab.com/policy/development_stages_support/.
|
||||
|
||||
|
||||
USAGE
|
||||
|
||||
glab issue note <issue-id> [--flags]
|
||||
|
||||
EXAMPLES
|
||||
|
||||
# Comment on issue 123, opening an editor for the message
|
||||
glab issue note 123
|
||||
|
||||
# Comment with the message given inline
|
||||
glab issue note 123 --message "Looking into this now."
|
||||
|
||||
# Attach a screenshot alongside the message
|
||||
glab issue note 123 --message "Here is the repro." --attach ./screenshot.png
|
||||
|
||||
# Attach an image piped from the clipboard
|
||||
pngpaste - | glab issue note 123 --attach -
|
||||
|
||||
FLAGS
|
||||
|
||||
--attach (Experimental) Upload a file and reference it at the end of the comment. Use "-" to read the file from standard input. Repeat the flag to attach multiple files.
|
||||
-h --help Show help for this command.
|
||||
-m --message Message text.
|
||||
-R --repo Select another repository. Can use either `OWNER/REPO` or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
|
||||
-R --repo Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted.
|
||||
|
||||
```
|
||||
|
||||
## issue reopen
|
||||
@@ -317,6 +357,15 @@ FLAGS
|
||||
description. Use `--label` and `--unlabel` to add or remove
|
||||
labels.
|
||||
|
||||
`--attach` uploads a file and references it at the end of the description. Repeat the flag for more than one file, or
|
||||
pass `-` to read the file from standard input. Without `--description` the references are added to the description the
|
||||
issue already has, instead of replacing it.
|
||||
|
||||
The `--attach` flag is an experiment. It might be
|
||||
unstable or removed at any time, and is not ready for production use.
|
||||
For more information, see
|
||||
https://docs.gitlab.com/policy/development_stages_support/.
|
||||
|
||||
|
||||
USAGE
|
||||
|
||||
@@ -333,9 +382,13 @@ FLAGS
|
||||
# Read the description from standard input
|
||||
cat description.md | glab issue update 42 --description-file -
|
||||
|
||||
# Add a screenshot to the existing description
|
||||
glab issue update 42 --attach ./screenshot.png
|
||||
|
||||
FLAGS
|
||||
|
||||
-a --assignee Assign users by username. Prefix with '!' or '-' to remove from existing assignees, or '+' to add new. Otherwise, replace existing assignees with these users. Multiple usernames can be comma-separated or specified by repeating the flag.
|
||||
--attach (Experimental) Upload a file and reference it at the end of the description. Use "-" to read the file from standard input. Repeat the flag to attach multiple files.
|
||||
-c --confidential Make issue confidential.
|
||||
-d --description Issue description. Set to "-" to open an editor.
|
||||
--description-file Read the issue description from a file. Use "-" to read from standard input.
|
||||
@@ -351,6 +404,7 @@ FLAGS
|
||||
-u --unlabel Remove labels.
|
||||
--unlock-discussion Unlock discussion on issue.
|
||||
-w --weight Set weight of the issue.
|
||||
|
||||
```
|
||||
|
||||
## issue view
|
||||
|
||||
@@ -41,6 +41,9 @@ glab mcp --help
|
||||
### Unannotated commands excluded
|
||||
Commands that lack MCP annotations are not registered as MCP tools. This means only explicitly supported commands are exposed to AI assistants, reducing noise and improving reliability. If a GitLab operation you expect isn't available as an MCP tool, it may lack MCP annotations.
|
||||
|
||||
### Inherited flags advertised
|
||||
MCP tool schemas include visible inherited flags accepted from parent commands, such as `--repo` on project-scoped operations. Pass these through the tool's `flags` object using the schema's underscore-normalized names (for example, `repo`); do not assume a flag is unavailable merely because it is registered on a parent command.
|
||||
|
||||
## Subcommands
|
||||
|
||||
See [references/commands.md](references/commands.md) for full `--help` output.
|
||||
|
||||
@@ -17,6 +17,11 @@ glab mr create --fill
|
||||
glab mr create --title "Fix login bug" --description-file description.md
|
||||
glab mr update 123 --description-file description.md
|
||||
|
||||
# Attach local files to a description
|
||||
glab mr create --title "Fix login bug" --description "Before and after:" \
|
||||
--attach ./before.png --attach ./after.png
|
||||
glab mr update 123 --attach ./latest.png
|
||||
|
||||
# List my MRs
|
||||
glab mr list --assignee=@me
|
||||
|
||||
@@ -46,6 +51,8 @@ glab mr create --fill --template .gitlab/merge_request_templates/default.md
|
||||
|
||||
For one-off multi-line descriptions, use `--description-file <path>` or `--description-file -` for stdin. It is mutually exclusive with `--description`; on create, it is also mutually exclusive with `--template`. A file containing exactly `-` is rejected because `--description -` means "open an editor".
|
||||
|
||||
Use the experimental `--attach <path>` repeatedly to upload files and append GitLab-provided Markdown references to the description. `--attach -` reads one file from stdin and cannot share stdin with `--description-file -`. On update, attachments append to the existing description unless a replacement description is supplied. For fork merge requests, `mr create` uploads attachments to the target project so the references resolve there.
|
||||
|
||||
In a non-interactive environment, an explicit `--title` is sufficient; glab can create the MR with an empty description instead of requiring a TTY or `--description`. Interactive terminals still prompt for a missing description/template. For deterministic automation, pass `--yes` plus any source/target/repository selectors explicitly.
|
||||
|
||||
```bash
|
||||
@@ -121,6 +128,10 @@ glab mr create --draft --title "WIP: Feature X"
|
||||
glab mr note create 123 --file src/cache.ts --line 42 -m "Please extract this branch"
|
||||
glab mr note create 123 --file src/cache.ts --old-line 17 -m "Why was this removed?"
|
||||
|
||||
# Attach evidence to a new or existing note
|
||||
glab mr note create 123 -m "Rendered result" --attach ./result.png
|
||||
glab mr note update 123 456789 --attach ./updated.png
|
||||
|
||||
# List discussion threads and expose note/discussion IDs (experimental)
|
||||
glab mr note list 123
|
||||
glab mr note list 123 --state unresolved --type diff
|
||||
@@ -131,6 +142,8 @@ glab mr create --draft --title "WIP: Feature X"
|
||||
glab mr note reopen 3107030349 123
|
||||
```
|
||||
|
||||
For `glab mr note update`, the note ID is always the final positional argument. The help renderer shows required arguments before optional ones, but the command parses the last argument as `<note-id>`; use `glab mr note update <mr> <note-id>` when specifying an MR.
|
||||
|
||||
4. **Approve:**
|
||||
```bash
|
||||
glab mr approve 123
|
||||
@@ -267,6 +280,8 @@ Flag rules worth remembering from the upstream help/docs:
|
||||
- `--line` and `--old-line` require `--file` and cannot be used together.
|
||||
- `--file`, `--reply`, and `--unique` are mutually exclusive.
|
||||
- `--resolvable=false` cannot be combined with `--reply`, `--file`, `--line`, or `--old-line`.
|
||||
- `--attach` can be repeated and may provide the entire note body; it cannot be combined with `--unique` because each upload produces a fresh URL.
|
||||
- On `mr note update`, attachment-only input appends to the current note body; pairing `--message` with attachments replaces the body and then appends the new references.
|
||||
- Omit both `--line` and `--old-line` when you want a file-level diff comment.
|
||||
|
||||
### Keep the helper/script path when
|
||||
|
||||
+203
-26
@@ -1,6 +1,6 @@
|
||||
# glab mr help
|
||||
|
||||
> Help output captured from `glab mr --help`.
|
||||
> Selected help blocks were refreshed from the checksum-verified glab v1.117.0 macOS arm64 release binary. Refreshed renderer output removes terminal padding and trailing whitespace; untouched legacy blocks may retain older padding or inherited-flag wording. Documented readability substitutions rejoin code spans that the renderer hard-wrapped, such as the stdin sentinel in `mr note update`.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
- [mr approve](#mr-approve) | [mr approvers](#mr-approvers) | [mr checkout](#mr-checkout) | [mr close](#mr-close)
|
||||
- [mr create](#mr-create) | [mr delete](#mr-delete) | [mr diff](#mr-diff) | [mr for](#mr-for)
|
||||
- [mr issues](#mr-issues) | [mr list](#mr-list) | [mr merge](#mr-merge) | [mr note](#mr-note)
|
||||
- [mr note create](#mr-note-create) | [mr note update](#mr-note-update) | [mr note list](#mr-note-list)
|
||||
- [mr rebase](#mr-rebase) | [mr reopen](#mr-reopen) | [mr revoke](#mr-revoke) | [mr subscribe](#mr-subscribe)
|
||||
- [mr todo](#mr-todo) | [mr unsubscribe](#mr-unsubscribe) | [mr update](#mr-update) | [mr view](#mr-view)
|
||||
|
||||
@@ -178,6 +179,15 @@
|
||||
to automatically fill the title and description from the commit history. Use
|
||||
`--draft` to create a draft merge request.
|
||||
|
||||
`--attach` uploads a file and references it at the end of the description. Repeat the flag for more than one file, or
|
||||
pass `-` to read the file from standard input. Files upload to the target project, so the references resolve even for
|
||||
a merge request from a fork.
|
||||
|
||||
The `--attach` flag is an experiment. It might be
|
||||
unstable or removed at any time, and is not ready for production use.
|
||||
For more information, see
|
||||
https://docs.gitlab.com/policy/development_stages_support/.
|
||||
|
||||
The `--recover` flag is an experiment: it might be unstable or
|
||||
removed at any time, and is not ready for production use. For more
|
||||
information, see
|
||||
@@ -221,10 +231,14 @@
|
||||
# Read the description from standard input
|
||||
cat description.md | glab mr create -t "Fix login bug" --description-file -
|
||||
|
||||
# Attach a screenshot to the description
|
||||
glab mr create -t "Fix login bug" -d "Before and after:" --attach ./before.png --attach ./after.png
|
||||
|
||||
FLAGS
|
||||
|
||||
--allow-collaboration Allow commits from other members. Set to true/false to override project defaults, or omit to use project settings.
|
||||
-a --assignee Assign merge request to people by their `usernames`. Multiple usernames can be comma-separated or specified by repeating the flag.
|
||||
--attach (Experimental) Upload a file and reference it at the end of the description. Use "-" to read the file from standard input. Repeat the flag to attach multiple files.
|
||||
--auto-merge Set the merge request to merge when all merge checks pass.
|
||||
--copy-issue-labels Copy labels from issue to the merge request. Used with --related-issue.
|
||||
--create-source-branch Create a source branch if it does not exist.
|
||||
@@ -470,41 +484,190 @@ Command "for" is deprecated, use `glab mr create --related-issue <issueID>`
|
||||
|
||||
```
|
||||
|
||||
Manage comments and discussions on a merge request.
|
||||
Creates a comment by default. Use `--resolve` or
|
||||
`--unresolve` to manage existing discussion threads.
|
||||
|
||||
|
||||
USAGE
|
||||
|
||||
glab mr note [command] [<id> | <branch>] [--flags]
|
||||
|
||||
EXAMPLES
|
||||
|
||||
# Add a comment to merge request with ID 123
|
||||
glab mr note 123 -m "Looks good to me!"
|
||||
|
||||
# Add a comment to the merge request for the current branch
|
||||
glab mr note -m "LGTM"
|
||||
|
||||
# Open your editor to compose a multi-line comment
|
||||
glab mr note 123
|
||||
|
||||
# Resolve a discussion by note ID
|
||||
glab mr note 123 --resolve 3107030349
|
||||
|
||||
# Unresolve a discussion by note ID
|
||||
glab mr note 123 --unresolve 3107030349
|
||||
|
||||
COMMANDS
|
||||
|
||||
list [<id> | <branch>] [--flags] List merge request discussions. (EXPERIMENTAL)
|
||||
reopen <discussion-id> [<id> | <branch>] Reopen a discussion on a merge request. (EXPERIMENTAL)
|
||||
resolve <discussion-id> [<id> | <branch>] Resolve a discussion on a merge request. (EXPERIMENTAL)
|
||||
create [<id> | <branch>] [--flags] Create a comment or discussion on a merge request. (EXPERIMENTAL)
|
||||
delete <note-id> [<id> | <branch>] [--flags] Delete a note from a merge request. (EXPERIMENTAL)
|
||||
list [<id> | <branch>] [--flags] List merge request discussions. (EXPERIMENTAL)
|
||||
reopen <discussion-id> [<id> | <branch>] Reopen a discussion on a merge request. (EXPERIMENTAL)
|
||||
resolve <discussion-id> [<id> | <branch>] Resolve a discussion on a merge request. (EXPERIMENTAL)
|
||||
update <note-id> [<id> | <branch>] [--flags] Update the body of a note on a merge request. (EXPERIMENTAL)
|
||||
|
||||
FLAGS
|
||||
|
||||
-h --help Show help for this command.
|
||||
-m --message Comment or note message.
|
||||
-R --repo Select another repository. Can use either `OWNER/REPO` or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
|
||||
--unique Don't create a comment or note if it already exists.
|
||||
-h --help Show help for this command.
|
||||
-R --repo Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted.
|
||||
```
|
||||
|
||||
## mr note create
|
||||
|
||||
```text
|
||||
|
||||
Add a comment to a merge request. By default, the command creates the comment
|
||||
as a new discussion thread.
|
||||
|
||||
Use `--resolvable=false` to create a non-resolvable note instead.
|
||||
Non-resolvable notes do not block merging when the project requires
|
||||
**All threads must be resolved**. Use this option for automation or status
|
||||
updates that do not need a human to resolve them.
|
||||
|
||||
Use `--reply` to add a note to an existing discussion thread instead of
|
||||
starting a new one. The value can be a full discussion ID or a unique
|
||||
prefix of at least 8 characters. Find discussion IDs with
|
||||
`glab mr note list`. Human-readable output uses
|
||||
eight characters before the ellipsis, for example
|
||||
`[discussion: abc12345…]`; pass
|
||||
only those characters, for example `--reply abc12345`. To get a
|
||||
full ID, use the `id` field of each discussion object:
|
||||
`glab mr note list -F json | jq -r '.[].id'`.
|
||||
|
||||
Use `--file` to place a diff comment on a specific file in the latest
|
||||
merge request diff version. Combine with `--line` (new side) or
|
||||
`--old-line` (old/removed side) to target a specific line. Omit
|
||||
both flags for a file-level comment.
|
||||
|
||||
The flag rules are:
|
||||
|
||||
- `--line` and `--old-line` require `--file`, and
|
||||
cannot be used together.
|
||||
- `--file`, `--reply`, and `--unique` are mutually
|
||||
exclusive.
|
||||
- `--resolvable=false` cannot be combined with `--reply`
|
||||
or `--file` (and by extension `--line` or
|
||||
`--old-line`).
|
||||
- `--attach` and `--unique` are mutually exclusive,
|
||||
because every upload gets a fresh URL and so an attached comment can
|
||||
never match an existing one.
|
||||
|
||||
`--attach` uploads a file and references it at the end of the comment. Repeat the flag for more than one file, or pass
|
||||
`-` to read the file from standard input. An attachment is content on its own, so a comment with only `--attach`
|
||||
neither prompts nor reads a body from stdin.
|
||||
|
||||
This feature is an experiment and is not ready for production use.
|
||||
It might be unstable or removed at any time.
|
||||
For more information, see
|
||||
https://docs.gitlab.com/policy/development_stages_support/.
|
||||
|
||||
|
||||
USAGE
|
||||
|
||||
glab mr note create [<id> | <branch>] [--flags]
|
||||
|
||||
EXAMPLES
|
||||
|
||||
# Add a comment to merge request 123
|
||||
glab mr note create 123 -m "Looks good to me!"
|
||||
|
||||
# Add a comment to the current branch's merge request
|
||||
glab mr note create -m "LGTM"
|
||||
|
||||
# Open editor to compose the message
|
||||
glab mr note create 123
|
||||
|
||||
# Pipe from stdin
|
||||
echo "LGTM" | glab mr note create 123
|
||||
|
||||
# Read the body from a file
|
||||
glab mr note create 123 < plan.md
|
||||
|
||||
# Skip if already posted
|
||||
glab mr note create 123 -m "LGTM" --unique
|
||||
|
||||
# Create a non-resolvable note, for example for bot or CI status updates
|
||||
glab mr note create 123 -m "Build status: green" --resolvable=false
|
||||
|
||||
# Reply to an existing discussion thread
|
||||
glab mr note create 123 --reply abc12345 -m "I agree!"
|
||||
|
||||
# Add a diff comment on line 42 of main.go
|
||||
glab mr note create 123 --file main.go --line 42 -m "Needs refactoring"
|
||||
|
||||
# Add a diff comment on lines 10-15 (multiline range)
|
||||
glab mr note create 123 --file main.go --line 10:15 -m "Extract this block"
|
||||
|
||||
# Add a diff comment on a removed line (old side)
|
||||
glab mr note create 123 --file main.go --old-line 7 -m "Why was this removed?"
|
||||
|
||||
# Add a file-level diff comment (no line specified)
|
||||
glab mr note create 123 --file main.go -m "General comment on this file"
|
||||
|
||||
# Attach a screenshot alongside the message
|
||||
glab mr note create 123 -m "Renders wrong here." --attach ./screenshot.png
|
||||
|
||||
# Attach an image piped from the clipboard
|
||||
pngpaste - | glab mr note create 123 --attach -
|
||||
|
||||
FLAGS
|
||||
|
||||
--attach (Experimental) Upload a file and reference it at the end of the comment. Use "-" to read the file from standard input. Repeat the flag to attach multiple files.
|
||||
--file File path for a diff comment, like <path/to/file>. Targets the latest merge request diff version.
|
||||
-h --help Show help for this command.
|
||||
--line Line in the new version. A single line number, like 42, or a range, like 10:15.
|
||||
-m --message Comment or note message.
|
||||
--old-line Line in the old version, for commenting on a removed line.
|
||||
--reply Reply to an existing discussion. Accepts a full discussion ID or a unique prefix of at least 8 characters.
|
||||
-R --repo Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted.
|
||||
--resolvable Create the note as a resolvable discussion thread. Set to false to create a non-resolvable note. (true)
|
||||
--unique Don't create a note if a note with the same body already exists. Reads all merge request comments first.
|
||||
|
||||
```
|
||||
|
||||
## mr note update
|
||||
|
||||
```text
|
||||
|
||||
Replace the body of an existing note on a merge request.
|
||||
|
||||
`<note-id>` is a numeric note ID, not a hex discussion ID.
|
||||
You can find note IDs with:
|
||||
|
||||
- `glab mr note list -F json` (the `.id` field)
|
||||
- Note URLs: `.../merge_requests/1#note_12345`
|
||||
|
||||
You can change only the note body. You cannot move the position of diff notes.
|
||||
|
||||
`--attach` uploads a file and references it at the end of the note. Repeat the flag for more than one file, or pass `-` to read the file from standard input. Without `--message` the references are added to the body the note already has,
|
||||
instead of replacing it.
|
||||
|
||||
This feature is an experiment and is not ready for production use.
|
||||
It might be unstable or removed at any time.
|
||||
For more information, see
|
||||
https://docs.gitlab.com/policy/development_stages_support/.
|
||||
|
||||
|
||||
USAGE
|
||||
|
||||
glab mr note update <note-id> [<id> | <branch>] [--flags]
|
||||
|
||||
EXAMPLES
|
||||
|
||||
# Update note 12345 on merge request 1 with a new message
|
||||
glab mr note update 1 12345 -m "Updated comment"
|
||||
|
||||
# Update a note on the current branch's merge request, composing in an editor
|
||||
glab mr note update 12345
|
||||
|
||||
# Pipe the new body from stdin
|
||||
echo "new body" | glab mr note update 1 12345
|
||||
|
||||
# Add a screenshot to the existing note body
|
||||
glab mr note update 1 12345 --attach ./screenshot.png
|
||||
|
||||
FLAGS
|
||||
|
||||
--attach (Experimental) Upload a file and reference it at the end of the note. Use "-" to read the file from standard input. Repeat the flag to attach multiple files.
|
||||
-h --help Show help for this command.
|
||||
-m --message New note body. If omitted, opens an editor or reads from stdin.
|
||||
-R --repo Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted.
|
||||
|
||||
```
|
||||
|
||||
## mr note list
|
||||
@@ -713,6 +876,15 @@ INHERITED FLAGS
|
||||
Defaults to the currently checked-out branch. Use `--fill` to
|
||||
automatically fill the title and description from the commit history.
|
||||
|
||||
`--attach` uploads a file and references it at the end of the description. Repeat the flag for more than one file, or
|
||||
pass `-` to read the file from standard input. Without `--description` the references are added to the description the
|
||||
merge request already has, instead of replacing it.
|
||||
|
||||
The `--attach` flag is an experiment. It might be
|
||||
unstable or removed at any time, and is not ready for production use.
|
||||
For more information, see
|
||||
https://docs.gitlab.com/policy/development_stages_support/.
|
||||
|
||||
|
||||
USAGE
|
||||
|
||||
@@ -738,9 +910,13 @@ INHERITED FLAGS
|
||||
# Read the description from standard input
|
||||
cat description.md | glab mr update 23 --description-file -
|
||||
|
||||
# Add a screenshot to the existing description
|
||||
glab mr update 23 --attach ./screenshot.png
|
||||
|
||||
FLAGS
|
||||
|
||||
-a --assignee Assign users via username. Prefix with '!' or '-' to remove from existing assignees, '+' to add. Otherwise, replace existing assignees with given users. Multiple usernames can be comma-separated or specified by repeating the flag.
|
||||
--attach (Experimental) Upload a file and reference it at the end of the description. Use "-" to read the file from standard input. Repeat the flag to attach multiple files.
|
||||
-d --description Merge request description. Set to "-" to open an editor.
|
||||
--description-file Read the merge request description from a file. Use "-" to read from standard input.
|
||||
--draft Mark merge request as a draft.
|
||||
@@ -762,6 +938,7 @@ INHERITED FLAGS
|
||||
--unlock-discussion Unlock discussion on merge request.
|
||||
--wip Mark merge request as a work in progress. Alternative to --draft.
|
||||
-y --yes Skip confirmation prompt.
|
||||
|
||||
```
|
||||
|
||||
## mr view
|
||||
|
||||
@@ -54,6 +54,8 @@ glab repo search "keyword"
|
||||
|
||||
**Note:** `glab repo create --readme` clones the newly created repository instead of using `git init`, ensuring a clean local copy with the initial README.
|
||||
|
||||
`glab repo create --skipGitInit` creates the remote project without prompting to initialize a local directory. If the current directory is not already a Git repository, glab also skips adding a remote instead of emitting a misleading `fatal: not a git repository` warning after successful remote creation.
|
||||
|
||||
A path containing nested groups preserves the complete namespace. For example, `glab repo create group/subgroup/my-project` creates `my-project` under `group/subgroup`, not only the final subgroup.
|
||||
|
||||
2. **Clone locally (if not using --readme):**
|
||||
|
||||
@@ -30,6 +30,10 @@ glab work-items create --type task --title "Follow up on flaky pipeline"
|
||||
glab work-items create --type task --title "Follow up" --description-file description.md
|
||||
glab work-items update 42 --description-file description.md
|
||||
|
||||
# Attach a project-scoped file reference
|
||||
glab work-items create --type task --title "Follow up" --attach ./evidence.png
|
||||
glab work-items update 42 --attach ./latest.png
|
||||
|
||||
# Create a group-scoped epic
|
||||
glab work-items create --type epic --group my-group --title "Platform rewrite"
|
||||
```
|
||||
@@ -99,6 +103,8 @@ glab work-items create --type issue --title "Backfill docs" --output json
|
||||
|
||||
For one-off multi-line descriptions, use `--description-file <path>` or `--description-file -` for stdin. It is mutually exclusive with `--description`. A file containing exactly `-` is rejected because `--description -` means "open an editor".
|
||||
|
||||
The experimental `--attach <path>` flag uploads a file and appends the returned Markdown reference to the description. Repeat it for multiple files, or use `--attach -` for one stdin attachment; do not also read a description from stdin. On update, attachment-only input preserves the current description and appends references, while an explicit description replaces the body first. Uploads are project-scoped, so `--attach` cannot be combined with `--group`.
|
||||
|
||||
Supported upstream type values include:
|
||||
`epic`, `incident`, `issue`, `key_result`, `objective`, `requirement`, `task`, `test_case`, and `ticket`.
|
||||
|
||||
@@ -180,6 +186,7 @@ glab work-items list [flags]
|
||||
--type One or more work item types
|
||||
|
||||
glab work-items create [flags]
|
||||
--attach Upload and reference a file; repeat for multiple files
|
||||
--confidential Mark the work item confidential
|
||||
--description Body text (use - to open editor)
|
||||
--description-file Read body text from a file or stdin
|
||||
@@ -191,6 +198,7 @@ glab work-items create [flags]
|
||||
|
||||
glab work-items update <iid> [flags]
|
||||
--assignee Update assignees
|
||||
--attach Upload and reference a file; repeat for multiple files
|
||||
--description Body text
|
||||
--description-file Read body text from a file or stdin
|
||||
--duedate Update due date
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# glab work-items command reference
|
||||
|
||||
> Help output captured from the checksum-verified glab v1.115.0 macOS arm64 release binary. Terminal padding and trailing whitespace are removed.
|
||||
> Help output captured from the checksum-verified glab v1.117.0 macOS arm64 release binary. Terminal padding and trailing whitespace are removed. Documented readability substitutions rejoin code spans that the renderer hard-wrapped, such as `--group`.
|
||||
|
||||
## work-items
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
Use `--type` to specify the kind of work item to create.
|
||||
The command uses your repository context to detect scope automatically.
|
||||
|
||||
`--attach` uploads a file and references it at the end of the description. Repeat the flag for more than one file, or
|
||||
pass `-` to read the file from standard input. Uploads are project-scoped, so `--attach` cannot be combined with `--group`.
|
||||
|
||||
This feature is an experiment and is not ready for production use.
|
||||
It might be unstable or removed at any time.
|
||||
For more information, see
|
||||
@@ -66,8 +69,12 @@
|
||||
# Read the description from standard input
|
||||
cat description.md | glab work-items create --type issue --title "Add feature" --description-file -
|
||||
|
||||
# Attach a screenshot to the description
|
||||
glab work-items create --type issue --title "Add feature" --attach ./screenshot.png
|
||||
|
||||
FLAGS
|
||||
|
||||
--attach (Experimental) Upload a file and reference it at the end of the description. Use "-" to read the file from standard input. Repeat the flag to attach multiple files.
|
||||
-c --confidential Mark work item confidential.
|
||||
-d --description Description of the work item. Set to "-" to open an editor.
|
||||
--description-file Read the work item description from a file. Use "-" to read from standard input.
|
||||
@@ -89,6 +96,10 @@
|
||||
|
||||
Use `--group` to target a group or subgroup. `--group` and `--repo` are mutually exclusive.
|
||||
|
||||
`--attach` uploads a file and references it at the end of the description. Repeat the flag for more than one file, or
|
||||
pass `-` to read the file from standard input. Without `--description` the references are added to the description the
|
||||
work item already has, instead of replacing it. Uploads are project-scoped, so `--attach` cannot be combined with `--group`.
|
||||
|
||||
This feature is an experiment and is not ready for production use.
|
||||
It might be unstable or removed at any time.
|
||||
For more information, see
|
||||
@@ -113,9 +124,13 @@
|
||||
# Read the description from standard input
|
||||
cat description.md | glab work-items update 42 --description-file -
|
||||
|
||||
# Add a screenshot to the existing description
|
||||
glab work-items update 42 --attach ./screenshot.png
|
||||
|
||||
FLAGS
|
||||
|
||||
-a --assignee Update the work item assignee with the supplied GitLab usernames.
|
||||
--attach (Experimental) Upload a file and reference it at the end of the description. Use "-" to read the file from standard input. Repeat the flag to attach multiple files.
|
||||
-d --description Update the description for the work item.
|
||||
--description-file Read the work item description from a file. Use "-" to read from standard input.
|
||||
--duedate Update the due date for the work item.
|
||||
|
||||
Reference in New Issue
Block a user