| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 81e1c13 commit 463893f
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -581,6 +581,26 @@ class UserKeyManager(BaseManager): | |||
| 581 | 581 | obj_cls = UserKey | |
| 582 | 582 | ||
| 583 | 583 | ||
| 584 | + class UserProject(GitlabObject): | ||
| 585 | + _url = '/projects/user/%(user_id)s' | ||
| 586 | + _constructorTypes = {'owner': 'User', 'namespace': 'Group'} | ||
| 587 | + canUpdate = False | ||
| 588 | + canDelete = False | ||
| 589 | + canList = False | ||
| 590 | + canGet = False | ||
| 591 | + requiredUrlAttrs = ['user_id'] | ||
| 592 | + requiredCreateAttrs = ['name'] | ||
| 593 | + optionalCreateAttrs = ['default_branch', 'issues_enabled', 'wall_enabled', | ||
| 594 | + 'merge_requests_enabled', 'wiki_enabled', | ||
| 595 | + 'snippets_enabled', 'public', 'visibility_level', | ||
| 596 | + 'description', 'builds_enabled', 'public_builds', | ||
| 597 | + 'import_url', 'only_allow_merge_if_build_succeeds'] | ||
| 598 | + | ||
| 599 | + | ||
| 600 | + class UserProjectManager(BaseManager): | ||
| 601 | + obj_cls = UserProject | ||
| 602 | + | ||
| 603 | + | ||
| 584 | 604 | class User(GitlabObject): | |
| 585 | 605 | _url = '/users' | |
| 586 | 606 | shortPrintAttr = 'username' | |
@@ -597,6 +617,7 @@ class User(GitlabObject): | |||
| 597 | 617 | managers = ( | |
| 598 | 618 | ('emails', UserEmailManager, [('user_id', 'id')]), | |
| 599 | 619 | ('keys', UserKeyManager, [('user_id', 'id')]), | |
| 620 | + ('projects', UserProjectManager, [('user_id', 'id')]), | ||
| 600 | 621 | ) | |
| 601 | 622 | ||
| 602 | 623 | def _data_for_gitlab(self, extra_parameters={}, update=False, | |
@@ -2061,10 +2082,6 @@ class Project(GitlabObject): | |||
| 2061 | 2082 | ('branches', ProjectBranchManager, [('project_id', 'id')]), | |
| 2062 | 2083 | ('builds', ProjectBuildManager, [('project_id', 'id')]), | |
| 2063 | 2084 | ('commits', ProjectCommitManager, [('project_id', 'id')]), | |
| 2064 | - ('commit_comments', ProjectCommitCommentManager, | ||
| 2065 | - [('project_id', 'id')]), | ||
| 2066 | - ('commit_statuses', ProjectCommitStatusManager, | ||
| 2067 | - [('project_id', 'id')]), | ||
| 2068 | 2085 | ('deployments', ProjectDeploymentManager, [('project_id', 'id')]), | |
| 2069 | 2086 | ('environments', ProjectEnvironmentManager, [('project_id', 'id')]), | |
| 2070 | 2087 | ('events', ProjectEventManager, [('project_id', 'id')]), | |
@@ -2409,22 +2426,6 @@ def delete_all(self, **kwargs): | |||
| 2409 | 2426 | return int(r.text) | |
| 2410 | 2427 | ||
| 2411 | 2428 | ||
| 2412 | - class UserProject(GitlabObject): | ||
| 2413 | - _url = '/projects/user/%(user_id)s' | ||
| 2414 | - _constructorTypes = {'owner': 'User', 'namespace': 'Group'} | ||
| 2415 | - canUpdate = False | ||
| 2416 | - canDelete = False | ||
| 2417 | - canList = False | ||
| 2418 | - canGet = False | ||
| 2419 | - requiredUrlAttrs = ['user_id'] | ||
| 2420 | - requiredCreateAttrs = ['name'] | ||
| 2421 | - optionalCreateAttrs = ['default_branch', 'issues_enabled', 'wall_enabled', | ||
| 2422 | - 'merge_requests_enabled', 'wiki_enabled', | ||
| 2423 | - 'snippets_enabled', 'public', 'visibility_level', | ||
| 2424 | - 'description', 'builds_enabled', 'public_builds', | ||
| 2425 | - 'import_url', 'only_allow_merge_if_build_succeeds'] | ||
| 2426 | - | ||
| 2427 | - | ||
| 2428 | 2429 | class ProjectManager(BaseManager): | |
| 2429 | 2430 | obj_cls = Project | |
| 2430 | 2431 | ||
@@ -2489,10 +2490,6 @@ def starred(self, **kwargs): | |||
| 2489 | 2490 | return self.gitlab._raw_list("/projects/starred", Project, **kwargs) | |
| 2490 | 2491 | ||
| 2491 | 2492 | ||
| 2492 | - class UserProjectManager(BaseManager): | ||
| 2493 | - obj_cls = UserProject | ||
| 2494 | - | ||
| 2495 | - | ||
| 2496 | 2493 | class TeamMemberManager(BaseManager): | |
| 2497 | 2494 | obj_cls = TeamMember | |
| 2498 | 2495 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments