FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Creation project with "." in name works incorrectly. · Issue #1006 · python-gitlab/python-gitlab · GitHub

Repository navigation

Creation project with "." in name works incorrectly. #1006

Description

Description of the problem, including code/CLI snippet

I'm trying to create project with "." in both name and path, using:

gl.projects.create({'namespace_id': group.id, 'name': projectName, 'path': projectName})

Expected Behavior

Name and path are the same and equal to actual "projectName".
URL git_url/test_group/project.test

Actual Behavior

Name is correct, but path has "." replaced with "-".
For example "project.test" has path "project-test".
URL: git_url/test_group/project-test

Specifications

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

Activity

  1. max-wittig commented on Feb 3, 2020

    Member

    Thanks for the report. I guess GitLab changed it now that . is allowed in the path and name.

    I don't think that this was possible before.

    Btw. it's dangerous to still run 12.1. There are a lot of critical security vulnabilites out in the open.

  2. Mukhamedgarif commented on Feb 3, 2020

    Author

    Thanks for reply. We tried as an experiment disable replacement and it looks that problem was solved.
    gitlab/v4/objects.py

    - file_path = file_path.replace('/', '%2F').replace('.', '%2E')
    + file_path = file_path.replace('/', '%2F').replace('.', '.')

    gitlab/init.py

    - new_path = parsed.path.replace('.', '%2E')
    + new_path = parsed.path.replace('.', '.')

    But the question is: why %2E - "." becomes %2D - "-"?

    In 12.1.4 I hadn't got any problems with creating project with "." in web UI.

  3. locked as resolved and limited conversation to collaborators on Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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


      Back | FazBrowse Home | New Git URL