返回 AiToEarn
issue-tracker-gitlab.md
1 # Issue tracker: GitLab
2
3 Issues and PRDs for this repo live as GitLab issues. Use the [`glab`](https://gitlab.com/gitlab-org/cli) CLI for all operations.
4
5 ## Conventions
6
7 - **Create an issue**: `glab issue create --title "..." --description "..."`. Use a heredoc for multi-line descriptions. Pass `--description -` to open an editor.
8 - **Read an issue**: `glab issue view <number> --comments`. Use `-F json` for machine-readable output.
9 - **List issues**: `glab issue list -F json` with appropriate `--label` filters.
10 - **Comment on an issue**: `glab issue note <number> --message "..."`. GitLab calls comments "notes".
11 - **Apply / remove labels**: `glab issue update <number> --label "..."` / `--unlabel "..."`. Multiple labels can be comma-separated or by repeating the flag.
12 - **Close**: `glab issue close <number>`. `glab issue close` does not accept a closing comment, so post the explanation first with `glab issue note <number> --message "..."`, then close.
13 - **Merge requests**: GitLab calls PRs "merge requests". Use `glab mr create`, `glab mr view`, `glab mr note`, etc. — the same shape as `gh pr ...` with `mr` in place of `pr` and `note`/`--message` in place of `comment`/`--body`.
14
15 Infer the repo from `git remote -v` — `glab` does this automatically when run inside a clone.
16
17 ## When a skill says "publish to the issue tracker"
18
19 Create a GitLab issue.
20
21 ## When a skill says "fetch the relevant ticket"
22
23 Run `glab issue view <number> --comments`.
24
24 lines MARKDOWN