Skip to content
This repository was archived by the owner on Aug 22, 2022. It is now read-only.
This repository was archived by the owner on Aug 22, 2022. It is now read-only.

Question - Create new project (within a "Group") using New-GitLabProject  #204

@NealWalters

Description

@NealWalters

1. Provide a general summary of the issue in the Title above

How do you specify a "group", is it the -Path or -Namespace or something else?
The GitLab visual interface seems to have an entity known as "groups".
When using the online interface, you create projects under groups.

2. Describe Your Environment

Operating System and PowerShell version:
Win 2012/R2
Powershell
Major Minor Build Revision
5 1 14409 1005

3. Expected Behavior

Run some command to create a project in a group

4.Current Behavior

Test 1
$projName = "MyCompany.MyNewProjectName"
$groupName = "ExistingGroupName"
New-GitLabProject -name $projName -path $groupName

Results
WARNING: All tokens will be sent over HTTP. Recommendation: Use HTTPS.
New-GitLabProject : Cannot bind parameter because parameter 'name' is specified more than once. To provide multiple values to parameters that can accept
multiple values, use the array syntax. For example, "-parameter value1,value2,value3".
At line:15 char:35

  • New-GitLabProject -name $projName -path $groupName
  •                               ~~~~~
    
    • CategoryInfo : InvalidArgument: (:) [New-GitLabProject], ParameterBindingException
    • FullyQualifiedErrorId : ParameterAlreadyBound,New-GitLabProject

Test 2

$projName = "MyCompany.MyNewProjectName"
$groupName = "ExistingGroupName"
New-GitLabProject -name $projName -namespace $groupName

Results:
WARNING: All tokens will be sent over HTTP. Recommendation: Use HTTPS.
QueryGitLabAPI : -
At C:\Program Files (x86)\WindowsPowerShell\Modules\PSGitLab\3.0.1\PSGitLab.psm1:1775 char:9

  •     QueryGitLabAPI -Request $Request -ObjectType 'GitLab.Project'
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,QueryGitLabAPI

5. Possible Solution

Update doc to link the concept of a group to whatever you call it in the API, assuming it does existin the API.

6. Context

See number 1 above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions