Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Allow to access Releases API via CI_JOB_TOKEN #1850

Closed
@MRigal

Description

@MRigal

Description of the problem, including code/CLI snippet

Thanks to#746 we have support for the releases.
Unfortunately we have to load a project to create a release, but getting a project (event its own project like#1393 reported it) is not possible with CI_JOB_TOKEN.

I have made a work-around for this, by creating a fake Project object, but it's not very nice. Maybe we could have a way to use the Releases API with CI_JOB_TOKEN:

# fails with CI_JOB_TOKENgitlab_project = client.projects.get(id=1)# So this work as we aren't queryinggitlab_project = client._objects.Project(client.projects, attrs={"id": 1})# To be able to dorelease = gitlab_project.releases.create({"name": "Supa name"})

Expected Behavior

Not sure... Maybe something like this?

release = client.releases.create({"project_id": 1, "name": "Supa name"})

Actual Behavior

See description above

Specifications

  • python-gitlab version: ALL until at least 3.1
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): 13/14.x

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp