Skip to content

Get asset links issue if tag_name have "/" char #2116

@thcao-ampere

Description

@thcao-ampere

Description of the problem, including code/CLI snippet

releases = project.releases.list()
for rel in releases:
    links = rel.links.list()

https://github.com/python-gitlab/python-gitlab/blob/main/gitlab/v4/objects/releases.py#L43

_path = "/projects/{project_id}/releases/{tag_name}/assets/links"

If tag_name = "abc/xyz" --> _path = "/projects/{project_id}/releases/abc/xyz/assets/links"
We should replace "/" to "%2F" in tag_name, _path = "/projects/{project_id}/releases/abc%2Fxyz/assets/links"

Expected Behavior

Get asset link list from release

Actual Behavior

Get exception GitlabListError: 404: 404 Not Found

Specifications

  • python-gitlab version: all version
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): gitlab.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy