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

feat: add create from template args to ProjectManager#1053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nejch merged 1 commit intopython-gitlab:masterfromlassimus:master
Mar 23, 2020

Conversation

lassimus
Copy link
Contributor

This commit adds the v4 Create project attributes necessary to create a
project from a project, instance, or group level template as documented
inhttps://docs.gitlab.com/ee/api/projects.html#create-project

This commit adds the v4 Create project attributes necessary to create aproject from a project, instance, or group level template as documentedinhttps://docs.gitlab.com/ee/api/projects.html#create-project
Copy link
Member

@nejchnejch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for the PR! It looks like there are a lot of missing optional attributes, since they can be supplied in**kwargs.

Just a minor comment, but I'll let@max-wittig decide if it's really needed. It might make sense to add these in here as well for consistency:

classUserProjectManager(ListMixin,CreateMixin,RESTManager):
_path="/projects/user/%(user_id)s"
_obj_cls=UserProject
_from_parent_attrs= {"user_id":"id"}
_create_attrs= (
("name",),
(
"default_branch",
"issues_enabled",
"wall_enabled",
"merge_requests_enabled",
"wiki_enabled",
"snippets_enabled",
"public",
"visibility",
"description",
"builds_enabled",
"public_builds",
"import_url",
"only_allow_merge_if_build_succeeds",
),

(although the GitLab docs are a bit inconsistent there, I think the same 4 attributes apply, but some of these are EE features, so hard to test)

@nejchnejch requested a review frommax-wittigMarch 21, 2020 16:53
@lassimus
Copy link
ContributorAuthor

**kwargs is useful when you're using the library, but if the optional attributes aren't added, they aren't usable in the cli.

I'm currently using the cli for chatops ci jobs, as it's much less maintenance than a purpose-built script that uses the library. I know you guys have talked about removing the cli completely, so I understand if you don't want to accept the PR for those reasons.

If you accept this PR, I'm certainly open to contributing more api updates.

nejch reacted with thumbs up emoji

@nejch
Copy link
Member

nejch commentedMar 23, 2020
edited
Loading

**kwargs is useful when you're using the library, but if the optional attributes aren't added, they aren't usable in the cli.

I'm currently using the cli for chatops ci jobs, as it's much less maintenance than a purpose-built script that uses the library. I know you guys have talked about removing the cli completely, so I understand if you don't want to accept the PR for those reasons.

If you accept this PR, I'm certainly open to contributing more api updates.

Ah I might have worded that strangely, it was a general comment that we have some catching up to do across the entire library to match the current GitLab API attributes ;) Sorry if that came out wrong!

That's a good point about CLI usage as well, thanks. We should probably review all the missing attributes and add more as a follow-up to this PR.

@nejchnejch merged commitc5904c4 intopython-gitlab:masterMar 23, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nejchnejchnejch left review comments

@max-wittigmax-wittigAwaiting requested review from max-wittig

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@lassimus@nejch

[8]ページ先頭

©2009-2025 Movatter.jp