From 5d973de8a5edd08f38031cf9be2636b0e12f008d Mon Sep 17 00:00:00 2001 From: Matthieu Rigal Date: Fri, 21 Jan 2022 15:56:03 +0100 Subject: [PATCH] docs: enhance release docs for CI_JOB_TOKEN usage --- docs/gl_objects/releases.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/gl_objects/releases.rst b/docs/gl_objects/releases.rst index 6077fe922..cb21db241 100644 --- a/docs/gl_objects/releases.rst +++ b/docs/gl_objects/releases.rst @@ -21,6 +21,7 @@ Examples Get a list of releases from a project:: + project = gl.projects.get(project_id, lazy=True) release = project.releases.list() Get a single release:: @@ -45,6 +46,14 @@ Delete a release:: # delete object directly release.delete() +.. note:: + + The Releases API is one of the few working with ``CI_JOB_TOKEN``, but the project can't + be fetched with the token. Thus use `lazy` for the project as in the above example. + + Also be aware that most of the capabilities of the endpoint were not accessible with + ``CI_JOB_TOKEN`` until Gitlab version 14.5. + Project release links =====================