Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Gitlab Projects based on templates#2267

Answeredbyraedma
nightHawk13998 asked this question inQ&A
Discussion options

Hi, I am new to using this python wrapper and can't seem to figure out to create a project and have it use a custom template. I know the API supports using '--use-custom-template' but cant seem to figure out the correct call using this wrapper. If anyone has any suggestions that would be great.

group_id = XXXXXX template = "my_custom_template" project = gl.projects.create({'name': 'test_repo', 'namespace_id': group_id, 'use_custom_template"': template})

You must be logged in to vote

I faced the same problem. TheGitlab API description says there is the option--use_custom_template as well as--group-with-project-templates-id and--template-project-id so I tried my luck with

project = gitlab.projects.create({'name': 'name', 'namespace_id': subgroup.id, 'use_custom_template': True, 'group_with_project_templates_id': 42540,'template_project_id': 30982})

and this worked fine.

Replies: 1 comment

Comment options

I faced the same problem. TheGitlab API description says there is the option--use_custom_template as well as--group-with-project-templates-id and--template-project-id so I tried my luck with

project = gitlab.projects.create({'name': 'name', 'namespace_id': subgroup.id, 'use_custom_template': True, 'group_with_project_templates_id': 42540,'template_project_id': 30982})

and this worked fine.

You must be logged in to vote
0 replies
Answer selected byJohnVillalovos
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@nightHawk13998@raedma

[8]ページ先頭

©2009-2025 Movatter.jp