| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent fdd4114 commit b6cc3f2
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,3 +38,9 @@ repos: | |||
| 38 | 38 | - types-PyYAML==6.0.12 | |
| 39 | 39 | - types-requests==2.28.11 | |
| 40 | 40 | - types-setuptools==64.0.1 | |
| 41 | + - repo: https://github.com/pre-commit/pygrep-hooks | ||
| 42 | + rev: v1.9.0 | ||
| 43 | + hooks: | ||
| 44 | + - id: rst-backticks | ||
| 45 | + - id: rst-directive-colons | ||
| 46 | + - id: rst-inline-touching-normal | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -93,7 +93,7 @@ To run these tests: | |||
| 93 | 93 | ||
| 94 | 94 | When developing tests it can be a little frustrating to wait for GitLab to spin | |
| 95 | 95 | up every run. To prevent the containers from being cleaned up afterwards, pass | |
| 96 | - `--keep-containers` to pytest, i.e.: | ||
| 96 | + ``--keep-containers`` to pytest, i.e.: | ||
| 97 | 97 | ||
| 98 | 98 | .. code-block:: bash | |
| 99 | 99 | ||
@@ -116,7 +116,7 @@ The tag must match an exact tag on Docker Hub: | |||
| 116 | 116 | ||
| 117 | 117 | .. code-block:: bash | |
| 118 | 118 | ||
| 119 | - # run tests against `nightly` or specific tag | ||
| 119 | + # run tests against ``nightly`` or specific tag | ||
| 120 | 120 | GITLAB_TAG=nightly tox -e api_func_v4 | |
| 121 | 121 | GITLAB_TAG=12.8.0-ce.0 tox -e api_func_v4 | |
| 122 | 122 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -53,11 +53,11 @@ https://requests.readthedocs.io/en/latest/user/advanced/#proxies | |||
| 53 | 53 | SSL certificate verification | |
| 54 | 54 | ---------------------------- | |
| 55 | 55 | ||
| 56 | - python-gitlab relies on the CA certificate bundle in the `certifi` package | ||
| 56 | + python-gitlab relies on the CA certificate bundle in the ``certifi`` package | ||
| 57 | 57 | that comes with the requests library. | |
| 58 | 58 | ||
| 59 | 59 | If you need python-gitlab to use your system CA store instead, you can provide | |
| 60 | - the path to the CA bundle in the `REQUESTS_CA_BUNDLE` environment variable. | ||
| 60 | + the path to the CA bundle in the ``REQUESTS_CA_BUNDLE`` environment variable. | ||
| 61 | 61 | ||
| 62 | 62 | Reference: | |
| 63 | 63 | https://requests.readthedocs.io/en/latest/user/advanced/#ssl-cert-verification | |
@@ -124,7 +124,7 @@ python-gitlab can automatically retry in such case, when | |||
| 124 | 124 | ``retry_transient_errors`` argument is set to ``True``. When enabled, | |
| 125 | 125 | HTTP error codes 500 (Internal Server Error), 502 (502 Bad Gateway), | |
| 126 | 126 | 503 (Service Unavailable), and 504 (Gateway Timeout) are retried. It will retry until reaching | |
| 127 | - the `max_retries` value. By default, `retry_transient_errors` is set to `False` and an exception | ||
| 127 | + the ``max_retries`` value. By default, ``retry_transient_errors`` is set to ``False`` and an exception | ||
| 128 | 128 | is raised for these errors. | |
| 129 | 129 | ||
| 130 | 130 | .. code-block:: python | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -200,7 +200,7 @@ You can print a Gitlab Object. For example: | |||
| 200 | 200 | # Or in a prettier format. | |
| 201 | 201 | project.pprint() | |
| 202 | 202 | ||
| 203 | - # Or explicitly via `pformat()`. This is equivalent to the above. | ||
| 203 | + # Or explicitly via ``pformat()``. This is equivalent to the above. | ||
| 204 | 204 | print(project.pformat()) | |
| 205 | 205 | ||
| 206 | 206 | You can also extend the object if the parameter isn't explicitly listed. For example, | |
@@ -217,16 +217,16 @@ the value on the object is accepted: | |||
| 217 | 217 | You can get a dictionary representation copy of the Gitlab Object. Modifications made to | |
| 218 | 218 | the dictionary will have no impact on the GitLab Object. | |
| 219 | 219 | ||
| 220 | - * `asdict()` method. Returns a dictionary representation of the Gitlab object. | ||
| 221 | - * `attributes` property. Returns a dictionary representation of the Gitlab | ||
| 220 | + * ``asdict()`` method. Returns a dictionary representation of the Gitlab object. | ||
| 221 | + * ``attributes`` property. Returns a dictionary representation of the Gitlab | ||
| 222 | 222 | object. Also returns any relevant parent object attributes. | |
| 223 | 223 | ||
| 224 | 224 | .. note:: | |
| 225 | 225 | ||
| 226 | - `attributes` returns the parent object attributes that are defined in | ||
| 227 | - `object._from_parent_attrs`. What this can mean is that for example a `ProjectIssue` | ||
| 228 | - object will have a `project_id` key in the dictionary returned from `attributes` but | ||
| 229 | - `asdict()` will not. | ||
| 226 | + ``attributes`` returns the parent object attributes that are defined in | ||
| 227 | + ``object._from_parent_attrs``. What this can mean is that for example a ``ProjectIssue`` | ||
| 228 | + object will have a ``project_id`` key in the dictionary returned from ``attributes`` but | ||
| 229 | + ``asdict()`` will not. | ||
| 230 | 230 | ||
| 231 | 231 | ||
| 232 | 232 | .. code-block:: python | |
@@ -244,7 +244,7 @@ You can get a JSON string represenation of the Gitlab Object. For example: | |||
| 244 | 244 | ||
| 245 | 245 | project = gl.projects.get(1) | |
| 246 | 246 | print(project.to_json()) | |
| 247 | - # Use arguments supported by `json.dump()` | ||
| 247 | + # Use arguments supported by ``json.dump()`` | ||
| 248 | 248 | print(project.to_json(sort_keys=True, indent=4)) | |
| 249 | 249 | ||
| 250 | 250 | Base types | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -219,7 +219,7 @@ Example for a `pass <https://www.passwordstore.org>`_ helper with a wrapper scri | |||
| 219 | 219 | private_token = helper: /path/to/helper.sh | |
| 220 | 220 | timeout = 1 | |
| 221 | 221 | ||
| 222 | - In `/path/to/helper.sh`: | ||
| 222 | + In ``/path/to/helper.sh``: | ||
| 223 | 223 | ||
| 224 | 224 | .. code-block:: bash | |
| 225 | 225 | ||
@@ -332,7 +332,7 @@ tcsh | |||
| 332 | 332 | ||
| 333 | 333 | .. code-block:: console | |
| 334 | 334 | ||
| 335 | - eval `register-python-argcomplete --shell tcsh gitlab` | ||
| 335 | + eval ``register-python-argcomplete --shell tcsh gitlab`` | ||
| 336 | 336 | ||
| 337 | 337 | fish | |
| 338 | 338 | ---- | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,16 +28,20 @@ Reference | |||
| 28 | 28 | Examples | |
| 29 | 29 | -------- | |
| 30 | 30 | ||
| 31 | - Use the ``list()`` and ``all()`` methods to list runners. | ||
| 31 | + Use the ``runners.list()`` and ``runners_all.list()`` methods to list runners. | ||
| 32 | + ``runners.list()`` - Get a list of specific runners available to the user | ||
| 33 | + ``runners_all.list()`` - Get a list of all runners in the GitLab instance | ||
| 34 | + (specific and shared). Access is restricted to users with administrator access. | ||
| 35 | + | ||
| 32 | 36 | ||
| 33 | 37 | Both methods accept a ``scope`` parameter to filter the list. Allowed values | |
| 34 | 38 | for this parameter are: | |
| 35 | 39 | ||
| 36 | 40 | * ``active`` | |
| 37 | 41 | * ``paused`` | |
| 38 | 42 | * ``online`` | |
| 39 | - * ``specific`` (``all()`` only) | ||
| 40 | - * ``shared`` (``all()`` only) | ||
| 43 | + * ``specific`` (``runners_all.list()`` only) | ||
| 44 | + * ``shared`` (``runners_all.list()`` only) | ||
| 41 | 45 | ||
| 42 | 46 | .. note:: | |
| 43 | 47 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments