Skip to content

Commit 1b64a47

Browse files
author
Gauvain Pocentek
committed
(re)add CLI examples in the doc
1 parent 02c5398 commit 1b64a47

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

docs/cli.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,64 @@ Example:
128128
.. code-block:: console
129129
130130
$ gitlab -v -g elsewhere -c /tmp/gl.cfg project list
131+
132+
133+
Examples
134+
========
135+
136+
List all the projects:
137+
138+
.. code-block:: console
139+
140+
$ gitlab project list
141+
142+
Limit to 5 items per request, display the 1st page only
143+
144+
.. code-block:: console
145+
146+
$ gitlab project list --page 1 --per-page 5
147+
148+
Get a specific project (id 2):
149+
150+
.. code-block:: console
151+
152+
$ gitlab project get --id 2
153+
154+
Get a list of snippets for this project:
155+
156+
.. code-block:: console
157+
158+
$ gitlab project-issue list --project-id 2
159+
160+
Delete a snippet (id 3):
161+
162+
.. code-block:: console
163+
164+
$ gitlab project-snippet delete --id 3 --project-id 2
165+
166+
Update a snippet:
167+
168+
.. code-block:: console
169+
170+
$ gitlab project-snippet update --id 4 --project-id 2 \
171+
--code "My New Code"
172+
173+
Create a snippet:
174+
175+
.. code-block:: console
176+
177+
$ gitlab project-snippet create --project-id=2
178+
Impossible to create object (Missing attribute(s): title, file-name, code)
179+
180+
$ # oops, let's add the attributes:
181+
$ gitlab project-snippet create --project-id=2 --title="the title" \
182+
--file-name="the name" --code="the code"
183+
184+
Define the status of a commit (as would be done from a CI tool for example):
185+
186+
.. code-block:: console
187+
188+
$ gitlab project-commit-status create --project-id 2 \
189+
--commit-id a43290c --state success --name ci/jenkins \
190+
--target-url http://server/build/123 \
191+
--description "Jenkins build succeeded"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy