Skip to content

Commit f33c523

Browse files
nejchJohnVillalovos
authored andcommitted
docs(cli): make examples more easily navigable by generating TOC
1 parent 55c67d1 commit f33c523

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

docs/cli-examples.rst

+27
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ CLI examples
66

77
For a complete list of objects and actions available, see :doc:`/cli-objects`.
88

9+
Projects
10+
--------
11+
912
List the projects (paginated):
1013

1114
.. code-block:: console
@@ -42,12 +45,18 @@ Get a specific project (id 2):
4245
4346
$ gitlab project get --id 2
4447
48+
Users
49+
-----
50+
4551
Get a specific user by id:
4652

4753
.. code-block:: console
4854
4955
$ gitlab user get --id 3
5056
57+
Deploy tokens
58+
-------------
59+
5160
Create a deploy token for a project:
5261

5362
.. code-block:: console
@@ -61,6 +70,9 @@ List deploy tokens for a group:
6170
6271
$ gitlab -v group-deploy-token list --group-id 3
6372
73+
Packages
74+
--------
75+
6476
List packages for a project:
6577

6678
.. code-block:: console
@@ -99,12 +111,18 @@ Download a project's generic package:
99111
$ gitlab generic-package download --project-id 1 --package-name hello-world \
100112
--package-version v1.0.0 --file-name hello.tar.gz > /path/to/hello.tar.gz
101113
114+
Issues
115+
------
116+
102117
Get a list of issues for this project:
103118

104119
.. code-block:: console
105120
106121
$ gitlab project-issue list --project-id 2
107122
123+
Snippets
124+
--------
125+
108126
Delete a snippet (id 3):
109127

110128
.. code-block:: console
@@ -128,6 +146,9 @@ Create a snippet:
128146
$ gitlab project-snippet create --project-id 2 --title "the title" \
129147
--file-name "the name" --code "the code"
130148
149+
Commits
150+
-------
151+
131152
Get a specific project commit by its SHA id:
132153

133154
.. code-block:: console
@@ -149,12 +170,18 @@ Define the status of a commit (as would be done from a CI tool for example):
149170
--target-url http://server/build/123 \
150171
--description "Jenkins build succeeded"
151172
173+
Artifacts
174+
---------
175+
152176
Download the artifacts zip archive of a job:
153177

154178
.. code-block:: console
155179
156180
$ gitlab project-job artifacts --id 10 --project-id 1 > artifacts.zip
157181
182+
Other
183+
-----
184+
158185
Use sudo to act as another user (admin only):
159186

160187
.. code-block:: console

0 commit comments

Comments
 (0)