gitlab-projects-settings 4.1.0__tar.gz → 4.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/CHANGELOG.md +13 -0
  2. {gitlab_projects_settings-4.1.0/gitlab_projects_settings.egg-info → gitlab_projects_settings-4.2.0}/PKG-INFO +25 -2
  3. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/README.md +24 -1
  4. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0/gitlab_projects_settings.egg-info}/PKG-INFO +25 -2
  5. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/cli/entrypoint.py +15 -1
  6. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/cli/main.py +13 -6
  7. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/.chglog/CHANGELOG.tpl.md +0 -0
  8. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/.chglog/changelog.sh +0 -0
  9. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/.chglog/config.yml +0 -0
  10. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/.gitignore +0 -0
  11. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/.gitlab-ci.yml +0 -0
  12. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/.markdownlint.json +0 -0
  13. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/.style.yapf +0 -0
  14. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/.vscode/extensions.json +0 -0
  15. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/.vscode/settings.json +0 -0
  16. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/LICENSE +0 -0
  17. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/gitlab_projects_settings.egg-info/SOURCES.txt +0 -0
  18. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/gitlab_projects_settings.egg-info/dependency_links.txt +0 -0
  19. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/gitlab_projects_settings.egg-info/entry_points.txt +0 -0
  20. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/gitlab_projects_settings.egg-info/requires.txt +0 -0
  21. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/gitlab_projects_settings.egg-info/top_level.txt +0 -0
  22. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/mypy.ini +0 -0
  23. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/requirements/build.txt +0 -0
  24. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/requirements/deploy.txt +0 -0
  25. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/requirements/quality.txt +0 -0
  26. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/requirements/runtime.txt +0 -0
  27. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/setup.cfg +0 -0
  28. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/setup.py +0 -0
  29. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/__init__.py +0 -0
  30. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/__main__.py +0 -0
  31. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/cli/__init__.py +0 -0
  32. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/features/__init__.py +0 -0
  33. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/features/gitlab.py +0 -0
  34. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/package/__init__.py +0 -0
  35. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/package/bundle.py +0 -0
  36. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/package/settings.py +0 -0
  37. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/package/updates.py +0 -0
  38. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/package/version.py +0 -0
  39. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/prints/__init__.py +0 -0
  40. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/prints/boxes.py +0 -0
  41. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/prints/colors.py +0 -0
  42. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/prints/themes.py +0 -0
  43. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/system/__init__.py +0 -0
  44. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/system/platform.py +0 -0
  45. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/types/__init__.py +0 -0
  46. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/types/gitlab.py +0 -0
  47. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/types/namespaces.py +0 -0
  48. {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.0}/src/types/strings.py +0 -0
@@ -1,4 +1,17 @@
1
1
 
2
+ <a name="4.2.0"></a>
3
+ ## [4.2.0](https://gitlab.com/AdrianDC/gitlab-projects-settings/compare/4.1.0...4.2.0) (2024-05-27)
4
+
5
+ ### Documentation
6
+
7
+ * **readme:** add 'gitlab-projects-settings' examples documentation
8
+
9
+ ### Features
10
+
11
+ * **entrypoint:** improve outputs logs upon delections
12
+ * **main:** show newer updates message upon incompatible arguments
13
+
14
+
2
15
  <a name="4.1.0"></a>
3
16
  ## [4.1.0](https://gitlab.com/AdrianDC/gitlab-projects-settings/compare/4.0.0...4.1.0) (2024-05-17)
4
17
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gitlab-projects-settings
3
- Version: 4.1.0
3
+ Version: 4.2.0
4
4
  Summary: Configure GitLab groups and projects settings automatically
5
5
  Home-page: https://gitlab.com/AdrianDC/gitlab-projects-settings
6
6
  Author: Adrian DC
@@ -58,6 +58,28 @@ The following step is required before using the tool:
58
58
 
59
59
  ---
60
60
 
61
+ ## Examples
62
+
63
+ <!-- prettier-ignore-start -->
64
+
65
+ ```bash
66
+ # Show the helper menu
67
+ gitlab-projects-settings
68
+
69
+ # Protect all projects' tags under a group
70
+ gitlab-projects-settings --protect-tags -- 'https://gitlab.com' 'group'
71
+
72
+ # Update all avatars and descriptions under a group
73
+ gitlab-projects-settings --set-avatar ./avatar.png --update-description 'https://gitlab.com' 'group'
74
+
75
+ # Automatically detect and reset features of projects based on usage
76
+ gitlab-projects-settings --reset-features 'https://gitlab.com' 'group/project'
77
+ ```
78
+
79
+ <!-- prettier-ignore-end -->
80
+
81
+ ---
82
+
61
83
  ## Usage
62
84
 
63
85
  <!-- prettier-ignore-start -->
@@ -65,7 +87,7 @@ The following step is required before using the tool:
65
87
 
66
88
  ```yaml
67
89
  usage: gitlab-projects-settings [-h] [--version] [--update-check] [--settings] [--set GROUP KEY VAL] [-t TOKEN]
68
- [--dry-run] [--exclude-group] [--exclude-subgroups] [--exclude-projects]
90
+ [--dry-run] [--dump] [--exclude-group] [--exclude-subgroups] [--exclude-projects]
69
91
  [--available-features] [--reset-features [KEEP_FEATURES]]
70
92
  [--disable-features FEATURES] [--enable-features FEATURES] [--reset-members]
71
93
  [--set-avatar FILE] [--set-description TEXT] [--update-description]
@@ -88,6 +110,7 @@ credentials arguments:
88
110
 
89
111
  common settings arguments:
90
112
  --dry-run # Enable dry run mode to check without saving
113
+ --dump # Dump Python objects of groups and projects
91
114
  --exclude-group # Exclude parent group settings
92
115
  --exclude-subgroups # Exclude children subgroups settings
93
116
  --exclude-projects # Exclude children projects settings
@@ -22,6 +22,28 @@ The following step is required before using the tool:
22
22
 
23
23
  ---
24
24
 
25
+ ## Examples
26
+
27
+ <!-- prettier-ignore-start -->
28
+
29
+ ```bash
30
+ # Show the helper menu
31
+ gitlab-projects-settings
32
+
33
+ # Protect all projects' tags under a group
34
+ gitlab-projects-settings --protect-tags -- 'https://gitlab.com' 'group'
35
+
36
+ # Update all avatars and descriptions under a group
37
+ gitlab-projects-settings --set-avatar ./avatar.png --update-description 'https://gitlab.com' 'group'
38
+
39
+ # Automatically detect and reset features of projects based on usage
40
+ gitlab-projects-settings --reset-features 'https://gitlab.com' 'group/project'
41
+ ```
42
+
43
+ <!-- prettier-ignore-end -->
44
+
45
+ ---
46
+
25
47
  ## Usage
26
48
 
27
49
  <!-- prettier-ignore-start -->
@@ -29,7 +51,7 @@ The following step is required before using the tool:
29
51
 
30
52
  ```yaml
31
53
  usage: gitlab-projects-settings [-h] [--version] [--update-check] [--settings] [--set GROUP KEY VAL] [-t TOKEN]
32
- [--dry-run] [--exclude-group] [--exclude-subgroups] [--exclude-projects]
54
+ [--dry-run] [--dump] [--exclude-group] [--exclude-subgroups] [--exclude-projects]
33
55
  [--available-features] [--reset-features [KEEP_FEATURES]]
34
56
  [--disable-features FEATURES] [--enable-features FEATURES] [--reset-members]
35
57
  [--set-avatar FILE] [--set-description TEXT] [--update-description]
@@ -52,6 +74,7 @@ credentials arguments:
52
74
 
53
75
  common settings arguments:
54
76
  --dry-run # Enable dry run mode to check without saving
77
+ --dump # Dump Python objects of groups and projects
55
78
  --exclude-group # Exclude parent group settings
56
79
  --exclude-subgroups # Exclude children subgroups settings
57
80
  --exclude-projects # Exclude children projects settings
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gitlab-projects-settings
3
- Version: 4.1.0
3
+ Version: 4.2.0
4
4
  Summary: Configure GitLab groups and projects settings automatically
5
5
  Home-page: https://gitlab.com/AdrianDC/gitlab-projects-settings
6
6
  Author: Adrian DC
@@ -58,6 +58,28 @@ The following step is required before using the tool:
58
58
 
59
59
  ---
60
60
 
61
+ ## Examples
62
+
63
+ <!-- prettier-ignore-start -->
64
+
65
+ ```bash
66
+ # Show the helper menu
67
+ gitlab-projects-settings
68
+
69
+ # Protect all projects' tags under a group
70
+ gitlab-projects-settings --protect-tags -- 'https://gitlab.com' 'group'
71
+
72
+ # Update all avatars and descriptions under a group
73
+ gitlab-projects-settings --set-avatar ./avatar.png --update-description 'https://gitlab.com' 'group'
74
+
75
+ # Automatically detect and reset features of projects based on usage
76
+ gitlab-projects-settings --reset-features 'https://gitlab.com' 'group/project'
77
+ ```
78
+
79
+ <!-- prettier-ignore-end -->
80
+
81
+ ---
82
+
61
83
  ## Usage
62
84
 
63
85
  <!-- prettier-ignore-start -->
@@ -65,7 +87,7 @@ The following step is required before using the tool:
65
87
 
66
88
  ```yaml
67
89
  usage: gitlab-projects-settings [-h] [--version] [--update-check] [--settings] [--set GROUP KEY VAL] [-t TOKEN]
68
- [--dry-run] [--exclude-group] [--exclude-subgroups] [--exclude-projects]
90
+ [--dry-run] [--dump] [--exclude-group] [--exclude-subgroups] [--exclude-projects]
69
91
  [--available-features] [--reset-features [KEEP_FEATURES]]
70
92
  [--disable-features FEATURES] [--enable-features FEATURES] [--reset-members]
71
93
  [--set-avatar FILE] [--set-description TEXT] [--update-description]
@@ -88,6 +110,7 @@ credentials arguments:
88
110
 
89
111
  common settings arguments:
90
112
  --dry-run # Enable dry run mode to check without saving
113
+ --dump # Dump Python objects of groups and projects
91
114
  --exclude-group # Exclude parent group settings
92
115
  --exclude-subgroups # Exclude children subgroups settings
93
116
  --exclude-projects # Exclude children projects settings
@@ -25,7 +25,7 @@ from ..types.namespaces import Namespaces
25
25
  class Entrypoint:
26
26
 
27
27
  # Enumerations
28
- Result = Enum('Result', ['SUCCESS', 'FINALIZE', 'ERROR'])
28
+ Result = Enum('Result', ['SUCCESS', 'FINALIZE', 'ERROR', 'CRITICAL'])
29
29
 
30
30
  # CLI, pylint: disable=too-many-branches
31
31
  @staticmethod
@@ -237,6 +237,8 @@ class Entrypoint:
237
237
  group_type,
238
238
  group.full_path,
239
239
  ):
240
+ print(' ')
241
+ Platform.flush()
240
242
  return Entrypoint.Result.SUCCESS
241
243
 
242
244
  # Delete group
@@ -297,6 +299,11 @@ class Entrypoint:
297
299
  f'{Colors.RESET}')
298
300
  Platform.flush()
299
301
 
302
+ # Dump group object
303
+ if options.dump:
304
+ print(' ')
305
+ print(group.to_json())
306
+
300
307
  # Footer
301
308
  print(' ')
302
309
  Platform.flush()
@@ -328,6 +335,8 @@ class Entrypoint:
328
335
  'project',
329
336
  project.path_with_namespace,
330
337
  ):
338
+ print(' ')
339
+ Platform.flush()
331
340
  return Entrypoint.Result.SUCCESS
332
341
 
333
342
  # Delete project
@@ -497,6 +506,11 @@ class Entrypoint:
497
506
  f'{Colors.RESET}')
498
507
  Platform.flush()
499
508
 
509
+ # Dump group object
510
+ if options.dump:
511
+ print(' ')
512
+ print(project.to_json())
513
+
500
514
  # Footer
501
515
  print(' ')
502
516
  Platform.flush()
@@ -94,6 +94,12 @@ def main() -> None:
94
94
  action='store_true',
95
95
  help='Enable dry run mode to check without saving',
96
96
  )
97
+ group.add_argument(
98
+ '--dump',
99
+ dest='dump',
100
+ action='store_true',
101
+ help='Dump Python objects of groups and projects',
102
+ )
97
103
  group.add_argument(
98
104
  '--exclude-group',
99
105
  dest='exclude_group',
@@ -292,18 +298,19 @@ def main() -> None:
292
298
 
293
299
  # Arguments validation
294
300
  if not options.token or not options.gitlab or not options.path:
295
- print(' ')
296
- parser.print_help()
297
- print(' ')
298
- Platform.flush()
299
- sys_exit(1)
301
+ result = Entrypoint.Result.CRITICAL
300
302
 
301
303
  # Header
302
304
  print(' ')
303
305
  Platform.flush()
304
306
 
305
307
  # CLI entrypoint
306
- result = Entrypoint.cli(options)
308
+ if result != Entrypoint.Result.CRITICAL:
309
+ result = Entrypoint.cli(options)
310
+
311
+ # CLI helper
312
+ else:
313
+ parser.print_help()
307
314
 
308
315
  # Footer
309
316
  print(' ')