Git Product home page Git Product logo

Comments (3)

NealWalters avatar NealWalters commented on September 17, 2024

After finding the GroupID, I have tried the following:

$searchGroup = "MyGroupName"
$group = Get-GitLabGroup -Search $searchGroup 
if ($group -eq $null) 
   {
      Write-Host "Group $searchGroup not found" 
   }
else 
   {
      Get-GitLabProject -GroupId $group.id 
      $newProjectname = 'NealTestScriptAddedProject'
      New-GitlabProject -Name $newProjectname  -Namespace "$searchGroup / $newProjectname" -public 
   }

I was guessing one of two things:

  1. That the current group would be used when you add a new project
  2. The group name is part of the namespace. When I listed my existing projects in the group that were created using the GitLab website, I saw the following name/value pair:

name_with_namespace : MyGroupName / MyProjectName

from psgitlab.

NealWalters avatar NealWalters commented on September 17, 2024

Ok, got it! Read this: https://forum.gitlab.com/t/create-a-new-project-in-a-group-using-api/1552/5

Changed one line above:

New-GitlabProject -Name $newProjectname -Namespace "$searchGroup" -public

The namespace is apparently just the group name when adding an item,

I also ran "get-gitlabnamespace" to see the namespaces.
Then I realized that when I retrieved the project that "name with namespace" is not the namespace, but the group name and the namespace.

Next question - how do I set the value of the Wiki for the project? Is it a file that can be uploaded? Or there an API to set it?

Neal

from psgitlab.

ngetchell avatar ngetchell commented on September 17, 2024

I don’t have anything around a wiki in the pipeline. You can treat the wiki as a git repository so you should be able to push changes via git.

Close the issue when you’ve seen the reply!

Sent with GitHawk

from psgitlab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.