8000 Merge pull request #1854 from MRigal/docs/small-releases-additions · python-gitlab/python-gitlab@ff04900 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ff04900

Browse files
authored
Merge pull request #1854 from MRigal/docs/small-releases-additions
Enhance releases API docs for CI_JOB_TOKEN usage
2 parents ff4b1cc + 5d973de commit ff04900

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/gl_objects/releases.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Examples
2121

2222
Get a list of releases from a project::
2323

24+
project = gl.projects.get(project_id, lazy=True)
2425
release = project.releases.list()
2526

2627
Get a single release::
@@ -45,6 +46,14 @@ Delete a release::
4546
# delete object directly
4647
release.delete()
4748

49+
.. note::
50+
51+
The Releases API is one of the few working with ``CI_JOB_TOKEN``, but the project can't
52+
be fetched with the token. Thus use `lazy` for the project as in the above example.
53+
54+
Also be aware that most of the capabilities of the endpoint were not accessible with
55+
``CI_JOB_TOKEN`` until Gitlab version 14.5.
56+
4857
Project release links
4958
=====================
5059

0 commit comments

Comments
 (0)
0