Skip to content

CLI: option to auto-detect GITLAB and project-id arguments from current git repo #3081

Open
@aelmahmoudy

Description

@aelmahmoudy

Please add a CLI option to auto-detect GITLAB (for -g argument) and project ID from the current git repo the gitlab command is run from. I implemented a shell wrapper around gitlab that basically would do the following:

  • git remote get-url $(git remote)
  • match the host of the above URL with entries in ~/.python-gitlab.cfg to get the GITLAB name
  • Use the last part of the remote URL as project ID

There might be a case of multiple remotes on the git repo., I would suggest adding --git-remote REMOTE argument for such case

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions