diff options
author | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2016-01-13 18:37:27 +0100 |
---|---|---|
committer | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2016-01-13 18:37:27 +0100 |
commit | 1b64a4730b85cd1effec48d1751e088a80b82b77 (patch) | |
tree | 3a10ecbeeea50df0e0b0ec4dd29c1058ff514ab4 /docs/cli.rst | |
parent | 02c5398dcca9c3f3c8e7a661668d97affd1097d7 (diff) | |
download | gitlab-1b64a4730b85cd1effec48d1751e088a80b82b77.tar.gz |
(re)add CLI examples in the doc
Diffstat (limited to 'docs/cli.rst')
-rw-r--r-- | docs/cli.rst | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/docs/cli.rst b/docs/cli.rst index ca19214..f00babc 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -128,3 +128,64 @@ Example: .. code-block:: console $ gitlab -v -g elsewhere -c /tmp/gl.cfg project list + + +Examples +======== + +List all the projects: + +.. code-block:: console + + $ gitlab project list + +Limit to 5 items per request, display the 1st page only + +.. code-block:: console + + $ gitlab project list --page 1 --per-page 5 + +Get a specific project (id 2): + +.. code-block:: console + + $ gitlab project get --id 2 + +Get a list of snippets for this project: + +.. code-block:: console + + $ gitlab project-issue list --project-id 2 + +Delete a snippet (id 3): + +.. code-block:: console + + $ gitlab project-snippet delete --id 3 --project-id 2 + +Update a snippet: + +.. code-block:: console + + $ gitlab project-snippet update --id 4 --project-id 2 \ + --code "My New Code" + +Create a snippet: + +.. code-block:: console + + $ gitlab project-snippet create --project-id=2 + Impossible to create object (Missing attribute(s): title, file-name, code) + + $ # oops, let's add the attributes: + $ gitlab project-snippet create --project-id=2 --title="the title" \ + --file-name="the name" --code="the code" + +Define the status of a commit (as would be done from a CI tool for example): + +.. code-block:: console + + $ gitlab project-commit-status create --project-id 2 \ + --commit-id a43290c --state success --name ci/jenkins \ + --target-url http://server/build/123 \ + --description "Jenkins build succeeded" |