gitlab-projects-settings 4.1.0__tar.gz → 4.2.1__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.
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/.chglog/config.yml +1 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/.gitlab-ci.yml +19 -19
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/CHANGELOG.md +36 -4
- {gitlab_projects_settings-4.1.0/gitlab_projects_settings.egg-info → gitlab_projects_settings-4.2.1}/PKG-INFO +26 -3
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/README.md +24 -1
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1/gitlab_projects_settings.egg-info}/PKG-INFO +26 -3
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/setup.py +1 -1
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/cli/entrypoint.py +15 -1
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/cli/main.py +13 -6
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/features/gitlab.py +12 -6
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/types/gitlab.py +14 -10
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/.chglog/CHANGELOG.tpl.md +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/.chglog/changelog.sh +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/.gitignore +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/.markdownlint.json +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/.style.yapf +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/.vscode/extensions.json +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/.vscode/settings.json +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/LICENSE +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/gitlab_projects_settings.egg-info/SOURCES.txt +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/gitlab_projects_settings.egg-info/dependency_links.txt +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/gitlab_projects_settings.egg-info/entry_points.txt +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/gitlab_projects_settings.egg-info/requires.txt +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/gitlab_projects_settings.egg-info/top_level.txt +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/mypy.ini +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/requirements/build.txt +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/requirements/deploy.txt +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/requirements/quality.txt +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/requirements/runtime.txt +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/setup.cfg +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/__init__.py +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/__main__.py +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/cli/__init__.py +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/features/__init__.py +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/package/__init__.py +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/package/bundle.py +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/package/settings.py +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/package/updates.py +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/package/version.py +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/prints/__init__.py +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/prints/boxes.py +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/prints/colors.py +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/prints/themes.py +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/system/__init__.py +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/system/platform.py +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/types/__init__.py +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/types/namespaces.py +0 -0
- {gitlab_projects_settings-4.1.0 → gitlab_projects_settings-4.2.1}/src/types/strings.py +0 -0
|
@@ -42,17 +42,17 @@ changelog:
|
|
|
42
42
|
- echo ''
|
|
43
43
|
- 'read -p " > Release tag : " -r tag'
|
|
44
44
|
- echo ''
|
|
45
|
-
- git tag -f -m
|
|
45
|
+
- git tag -f -m "${tag}" "${tag}"
|
|
46
46
|
- ./.tmp/git-chglog -o ./CHANGELOG.md
|
|
47
47
|
- sed -i "s#raw/[^/]*/docs#raw/${tag}/docs#g" ./README.md
|
|
48
48
|
- git add -v ./CHANGELOG.md ./README.md
|
|
49
49
|
- 'git commit -m "docs(changelog): regenerate release tag changes history" -s'
|
|
50
|
-
- git tag -f -m
|
|
50
|
+
- git tag -f -m "${tag}" "${tag}"
|
|
51
51
|
- ./.tmp/git-chglog -o ./CHANGELOG.md
|
|
52
52
|
- sh ./.chglog/changelog.sh --clean
|
|
53
53
|
- git add -v ./CHANGELOG.md
|
|
54
54
|
- git commit --amend --no-edit
|
|
55
|
-
- git tag -f -m
|
|
55
|
+
- git tag -f -m "${tag}" "${tag}"
|
|
56
56
|
rules:
|
|
57
57
|
- if: $CI_LOCAL
|
|
58
58
|
|
|
@@ -69,12 +69,12 @@ images:
|
|
|
69
69
|
echo ''
|
|
70
70
|
echo " [INFO] Pull: ${image}"
|
|
71
71
|
echo ''
|
|
72
|
-
docker pull "${image}"
|
|
72
|
+
docker pull "${image}" || true
|
|
73
73
|
docker tag "${image}" "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}"
|
|
74
74
|
echo ''
|
|
75
75
|
echo " [INFO] Push: ${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}"
|
|
76
76
|
echo ''
|
|
77
|
-
docker push "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}"
|
|
77
|
+
docker push "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}" || true
|
|
78
78
|
docker rmi "${image}" >/dev/null || true
|
|
79
79
|
fi
|
|
80
80
|
done
|
|
@@ -86,7 +86,7 @@ images:
|
|
|
86
86
|
echo ''
|
|
87
87
|
echo " [INFO] Pull: ${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${base}"
|
|
88
88
|
echo ''
|
|
89
|
-
docker pull "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${base}"
|
|
89
|
+
docker pull "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${base}" || true
|
|
90
90
|
docker pull "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}" || true
|
|
91
91
|
docker build -t "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}" -f - . <<-EOF
|
|
92
92
|
FROM ${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${base}
|
|
@@ -102,7 +102,7 @@ images:
|
|
|
102
102
|
echo ''
|
|
103
103
|
echo " [INFO] Push: ${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}"
|
|
104
104
|
echo ''
|
|
105
|
-
docker push "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}"
|
|
105
|
+
docker push "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}" || true
|
|
106
106
|
fi
|
|
107
107
|
# Prepare codestyle image
|
|
108
108
|
- |
|
|
@@ -112,7 +112,7 @@ images:
|
|
|
112
112
|
echo ''
|
|
113
113
|
echo " [INFO] Pull: ${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${base}"
|
|
114
114
|
echo ''
|
|
115
|
-
docker pull "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${base}"
|
|
115
|
+
docker pull "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${base}" || true
|
|
116
116
|
docker pull "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}" || true
|
|
117
117
|
docker build -t "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}" -f- . <<-EOF
|
|
118
118
|
FROM ${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${base}
|
|
@@ -129,7 +129,7 @@ images:
|
|
|
129
129
|
echo ''
|
|
130
130
|
echo " [INFO] Push: ${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}"
|
|
131
131
|
echo ''
|
|
132
|
-
docker push "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}"
|
|
132
|
+
docker push "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}" || true
|
|
133
133
|
fi
|
|
134
134
|
# Prepare deploy image
|
|
135
135
|
- |
|
|
@@ -139,7 +139,7 @@ images:
|
|
|
139
139
|
echo ''
|
|
140
140
|
echo " [INFO] Pull: ${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${base}"
|
|
141
141
|
echo ''
|
|
142
|
-
docker pull "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${base}"
|
|
142
|
+
docker pull "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${base}" || true
|
|
143
143
|
docker pull "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}" || true
|
|
144
144
|
docker build -t "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}" -f - . <<-EOF
|
|
145
145
|
FROM ${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${base}
|
|
@@ -152,7 +152,7 @@ images:
|
|
|
152
152
|
echo ''
|
|
153
153
|
echo " [INFO] Push: ${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}"
|
|
154
154
|
echo ''
|
|
155
|
-
docker push "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}"
|
|
155
|
+
docker push "${REGISTRY_HOST}/${REGISTRY_OWNER}/${REGISTRY_PROJECT}/${image}" || true
|
|
156
156
|
fi
|
|
157
157
|
rules:
|
|
158
158
|
- if: $CI_LOCAL
|
|
@@ -169,13 +169,13 @@ codestyle:
|
|
|
169
169
|
- echo '' && git diff --name-status
|
|
170
170
|
- git diff --quiet
|
|
171
171
|
rules:
|
|
172
|
-
- if: $CI_COMMIT_REF_NAME ==
|
|
172
|
+
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
|
173
173
|
changes:
|
|
174
174
|
- 'CHANGELOG.md'
|
|
175
175
|
- 'requirements/**/*'
|
|
176
176
|
- 'setup.py'
|
|
177
177
|
- 'src/**/*'
|
|
178
|
-
- if: $CI_COMMIT_TAG || $CI_PIPELINE_SOURCE == "trigger" || $CI_PIPELINE_SOURCE == "web" || $CI_COMMIT_REF_NAME !=
|
|
178
|
+
- if: $CI_COMMIT_TAG || $CI_PIPELINE_SOURCE == "trigger" || $CI_PIPELINE_SOURCE == "web" || $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
|
|
179
179
|
when: on_success
|
|
180
180
|
allow_failure: true
|
|
181
181
|
|
|
@@ -186,13 +186,13 @@ lint:
|
|
|
186
186
|
- pylint --errors-only ./src/ ./setup.py
|
|
187
187
|
- pylint --disable=missing-docstring --load-plugins=pylint.extensions.no_self_use ./src/ ./setup.py
|
|
188
188
|
rules:
|
|
189
|
-
- if: $CI_COMMIT_REF_NAME ==
|
|
189
|
+
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
|
190
190
|
changes:
|
|
191
191
|
- 'CHANGELOG.md'
|
|
192
192
|
- 'requirements/**/*'
|
|
193
193
|
- 'setup.py'
|
|
194
194
|
- 'src/**/*'
|
|
195
|
-
- if: $CI_COMMIT_TAG || $CI_PIPELINE_SOURCE == "trigger" || $CI_PIPELINE_SOURCE == "web" || $CI_COMMIT_REF_NAME !=
|
|
195
|
+
- if: $CI_COMMIT_TAG || $CI_PIPELINE_SOURCE == "trigger" || $CI_PIPELINE_SOURCE == "web" || $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
|
|
196
196
|
when: on_success
|
|
197
197
|
allow_failure: true
|
|
198
198
|
|
|
@@ -212,13 +212,13 @@ typings:
|
|
|
212
212
|
- sleep 1
|
|
213
213
|
- mypy --follow-imports silent --pretty ./src/ ./setup.py
|
|
214
214
|
rules:
|
|
215
|
-
- if: $CI_COMMIT_REF_NAME ==
|
|
215
|
+
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
|
216
216
|
changes:
|
|
217
217
|
- 'CHANGELOG.md'
|
|
218
218
|
- 'requirements/**/*'
|
|
219
219
|
- 'setup.py'
|
|
220
220
|
- 'src/**/*'
|
|
221
|
-
- if: $CI_COMMIT_TAG || $CI_PIPELINE_SOURCE == "trigger" || $CI_PIPELINE_SOURCE == "web" || $CI_COMMIT_REF_NAME !=
|
|
221
|
+
- if: $CI_COMMIT_TAG || $CI_PIPELINE_SOURCE == "trigger" || $CI_PIPELINE_SOURCE == "web" || $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
|
|
222
222
|
when: on_success
|
|
223
223
|
allow_failure: true
|
|
224
224
|
|
|
@@ -235,12 +235,12 @@ build:
|
|
|
235
235
|
after_script:
|
|
236
236
|
- rm -rf ./build ./*.egg-info ./.eggs
|
|
237
237
|
rules:
|
|
238
|
-
- if: $CI_COMMIT_REF_NAME ==
|
|
238
|
+
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
|
239
239
|
changes:
|
|
240
240
|
- 'CHANGELOG.md'
|
|
241
241
|
- 'requirements/**/*'
|
|
242
242
|
- 'src/**/*'
|
|
243
|
-
- if: $CI_COMMIT_TAG || $CI_PIPELINE_SOURCE == "trigger" || $CI_PIPELINE_SOURCE == "web" || $CI_COMMIT_REF_NAME !=
|
|
243
|
+
- if: $CI_COMMIT_TAG || $CI_PIPELINE_SOURCE == "trigger" || $CI_PIPELINE_SOURCE == "web" || $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
|
|
244
244
|
when: on_success
|
|
245
245
|
artifacts:
|
|
246
246
|
paths:
|
|
@@ -1,4 +1,36 @@
|
|
|
1
1
|
|
|
2
|
+
<a name="4.2.1"></a>
|
|
3
|
+
## [4.2.1](https://gitlab.com/AdrianDC/gitlab-projects-settings/compare/4.2.0...4.2.1) (2024-06-11)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* **gitlab:** restore support for old GitLab 13.12 instances
|
|
8
|
+
|
|
9
|
+
### CI
|
|
10
|
+
|
|
11
|
+
* **gitlab-ci:** change commit messages to tag name
|
|
12
|
+
* **gitlab-ci:** use 'CI_DEFAULT_BRANCH' to access 'develop' branch
|
|
13
|
+
* **gitlab-ci:** support docker pull and push without remote
|
|
14
|
+
* **setup:** update Python package keywords hints
|
|
15
|
+
|
|
16
|
+
### Documentation
|
|
17
|
+
|
|
18
|
+
* **chglog:** add 'ci' as 'CI' configuration for 'CHANGELOG.md'
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
<a name="4.2.0"></a>
|
|
22
|
+
## [4.2.0](https://gitlab.com/AdrianDC/gitlab-projects-settings/compare/4.1.0...4.2.0) (2024-05-27)
|
|
23
|
+
|
|
24
|
+
### Documentation
|
|
25
|
+
|
|
26
|
+
* **readme:** add 'gitlab-projects-settings' examples documentation
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
* **entrypoint:** improve outputs logs upon delections
|
|
31
|
+
* **main:** show newer updates message upon incompatible arguments
|
|
32
|
+
|
|
33
|
+
|
|
2
34
|
<a name="4.1.0"></a>
|
|
3
35
|
## [4.1.0](https://gitlab.com/AdrianDC/gitlab-projects-settings/compare/4.0.0...4.1.0) (2024-05-17)
|
|
4
36
|
|
|
@@ -21,7 +53,7 @@
|
|
|
21
53
|
* **gitlab:** disable 'Repository' group feature after its members
|
|
22
54
|
* **gitlab:** accept deletion denials in 'project_reset_members'
|
|
23
55
|
|
|
24
|
-
###
|
|
56
|
+
### CI
|
|
25
57
|
|
|
26
58
|
* **gitlab-ci:** support multiple 'METAVAR' words in 'readme' job
|
|
27
59
|
* **gitlab-ci:** deprecate requirements install in 'lint' job
|
|
@@ -65,7 +97,7 @@
|
|
|
65
97
|
* **gitlab:** get all branches and tags upon 'list()' calls
|
|
66
98
|
* **gitlab:** get all members in 'project_reset_members'
|
|
67
99
|
|
|
68
|
-
###
|
|
100
|
+
### CI
|
|
69
101
|
|
|
70
102
|
* **gitlab-ci:** move 'readme' job after 'build' and local 'install'
|
|
71
103
|
|
|
@@ -98,7 +130,7 @@
|
|
|
98
130
|
<a name="2.0.2"></a>
|
|
99
131
|
## [2.0.2](https://gitlab.com/AdrianDC/gitlab-projects-settings/compare/2.0.1...2.0.2) (2024-04-28)
|
|
100
132
|
|
|
101
|
-
###
|
|
133
|
+
### CI
|
|
102
134
|
|
|
103
135
|
* **gitlab-ci:** disable 'typing' mypy caching with 'MYPY_CACHE_DIR'
|
|
104
136
|
|
|
@@ -127,7 +159,7 @@
|
|
|
127
159
|
* **gitlab:** enforce '--dry-run' usage and improve Python codestyle
|
|
128
160
|
* **settings:** apply 'subgroup' feature to subgroup groups
|
|
129
161
|
|
|
130
|
-
###
|
|
162
|
+
### CI
|
|
131
163
|
|
|
132
164
|
* **gitlab-ci:** implement 'readme' local job to update README details
|
|
133
165
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gitlab-projects-settings
|
|
3
|
-
Version: 4.1
|
|
3
|
+
Version: 4.2.1
|
|
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
|
|
@@ -11,7 +11,7 @@ Project-URL: Changelog, https://gitlab.com/AdrianDC/gitlab-projects-settings/blo
|
|
|
11
11
|
Project-URL: Documentation, https://gitlab.com/AdrianDC/gitlab-projects-settings#gitlab-projects-settings
|
|
12
12
|
Project-URL: Source, https://gitlab.com/AdrianDC/gitlab-projects-settings
|
|
13
13
|
Project-URL: Statistics, https://pypistats.org/packages/gitlab-projects-settings
|
|
14
|
-
Keywords: gitlab issues sync
|
|
14
|
+
Keywords: gitlab projects issues sync
|
|
15
15
|
Classifier: Environment :: Console
|
|
16
16
|
Classifier: Intended Audience :: Developers
|
|
17
17
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
@@ -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
|
|
3
|
+
Version: 4.2.1
|
|
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
|
|
@@ -11,7 +11,7 @@ Project-URL: Changelog, https://gitlab.com/AdrianDC/gitlab-projects-settings/blo
|
|
|
11
11
|
Project-URL: Documentation, https://gitlab.com/AdrianDC/gitlab-projects-settings#gitlab-projects-settings
|
|
12
12
|
Project-URL: Source, https://gitlab.com/AdrianDC/gitlab-projects-settings
|
|
13
13
|
Project-URL: Statistics, https://pypistats.org/packages/gitlab-projects-settings
|
|
14
|
-
Keywords: gitlab issues sync
|
|
14
|
+
Keywords: gitlab projects issues sync
|
|
15
15
|
Classifier: Environment :: Console
|
|
16
16
|
Classifier: Intended Audience :: Developers
|
|
17
17
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
@@ -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
|
|
@@ -20,7 +20,7 @@ with open('README.md', encoding='utf8', mode='r') as f:
|
|
|
20
20
|
PROJECT_AUTHOR = 'Adrian DC'
|
|
21
21
|
PROJECT_DESCRIPTION = 'Configure GitLab groups and projects settings automatically'
|
|
22
22
|
PROJECT_EMAIL = 'radian.dc@gmail.com'
|
|
23
|
-
PROJECT_KEYWORDS = 'gitlab issues sync'
|
|
23
|
+
PROJECT_KEYWORDS = 'gitlab projects issues sync'
|
|
24
24
|
PROJECT_NAME = 'gitlab-projects-settings'
|
|
25
25
|
PROJECT_OWNER = 'AdrianDC'
|
|
26
26
|
PROJECT_PACKAGE = 'gitlab_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
|
-
|
|
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
|
|
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(' ')
|
|
@@ -209,7 +209,8 @@ class GitLabFeature:
|
|
|
209
209
|
|
|
210
210
|
# Disable 'access_level' feature
|
|
211
211
|
for level in feature.access_level:
|
|
212
|
-
if
|
|
212
|
+
if hasattr(project, level.key) \
|
|
213
|
+
and getattr(project, level.key) != AccessLevels.DISABLED:
|
|
213
214
|
changed = True
|
|
214
215
|
setattr(
|
|
215
216
|
project,
|
|
@@ -219,7 +220,8 @@ class GitLabFeature:
|
|
|
219
220
|
|
|
220
221
|
# Disable 'enabled' feature
|
|
221
222
|
for key in feature.enabled:
|
|
222
|
-
if
|
|
223
|
+
if hasattr(project, key) \
|
|
224
|
+
and getattr(project, key):
|
|
223
225
|
changed = True
|
|
224
226
|
setattr(
|
|
225
227
|
project,
|
|
@@ -257,7 +259,8 @@ class GitLabFeature:
|
|
|
257
259
|
|
|
258
260
|
# Enable 'access_level' feature
|
|
259
261
|
for level in feature.access_level:
|
|
260
|
-
if
|
|
262
|
+
if hasattr(project, level.key) \
|
|
263
|
+
and getattr(project, level.key) == AccessLevels.DISABLED:
|
|
261
264
|
changed = True
|
|
262
265
|
setattr(
|
|
263
266
|
project,
|
|
@@ -267,7 +270,8 @@ class GitLabFeature:
|
|
|
267
270
|
|
|
268
271
|
# Enable 'enabled' feature
|
|
269
272
|
for key in feature.enabled:
|
|
270
|
-
if
|
|
273
|
+
if hasattr(project, key) \
|
|
274
|
+
and not getattr(project, key):
|
|
271
275
|
changed = True
|
|
272
276
|
setattr(
|
|
273
277
|
project,
|
|
@@ -305,7 +309,8 @@ class GitLabFeature:
|
|
|
305
309
|
|
|
306
310
|
# Disable 'access_level' feature
|
|
307
311
|
for level in feature.access_level:
|
|
308
|
-
if changed or (
|
|
312
|
+
if changed or (hasattr(project, level.key) \
|
|
313
|
+
and getattr(project, level.key) != AccessLevels.DISABLED \
|
|
309
314
|
and not ProjectFeatures.test(self.__gitlab, project, feature.tests)):
|
|
310
315
|
changed = True
|
|
311
316
|
setattr(
|
|
@@ -316,7 +321,8 @@ class GitLabFeature:
|
|
|
316
321
|
|
|
317
322
|
# Disable 'enabled' feature
|
|
318
323
|
for key in feature.enabled:
|
|
319
|
-
if changed or (
|
|
324
|
+
if changed or (hasattr(project, key) \
|
|
325
|
+
and getattr(project, key) \
|
|
320
326
|
and not ProjectFeatures.test(self.__gitlab, project, feature.tests)):
|
|
321
327
|
changed = True
|
|
322
328
|
setattr(
|
|
@@ -5,7 +5,7 @@ from typing import Dict, List, NamedTuple
|
|
|
5
5
|
|
|
6
6
|
# Modules libraries
|
|
7
7
|
from gitlab import Gitlab
|
|
8
|
-
from gitlab.exceptions import GitlabGetError, GitlabListError
|
|
8
|
+
from gitlab.exceptions import GitlabGetError, GitlabHttpError, GitlabListError
|
|
9
9
|
from gitlab.v4.objects import Project
|
|
10
10
|
|
|
11
11
|
# AccessLevels class, pylint: disable=too-few-public-methods
|
|
@@ -129,15 +129,19 @@ class ProjectFeatures:
|
|
|
129
129
|
'name' in item and item['name'] == '.gitlab-ci.yml'
|
|
130
130
|
for item in project.repository_tree(get_all=True) \
|
|
131
131
|
)
|
|
132
|
-
test_ci_token_access =
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
132
|
+
test_ci_token_access: bool = False
|
|
133
|
+
try:
|
|
134
|
+
test_ci_token_access = any(
|
|
135
|
+
'path_with_namespace' in item \
|
|
136
|
+
and isinstance(item, dict) \
|
|
137
|
+
and item['path_with_namespace'] != project.path_with_namespace \
|
|
138
|
+
for item in gitlab.http_get(
|
|
139
|
+
f'/projects/{project.id}/job_token_scope/allowlist',
|
|
140
|
+
get_all=True,
|
|
141
|
+
) \
|
|
142
|
+
)
|
|
143
|
+
except GitlabHttpError:
|
|
144
|
+
test_ci_token_access = False
|
|
141
145
|
assert (test_ci_jobs or test_ci_files or test_ci_token_access)
|
|
142
146
|
|
|
143
147
|
# Handle commits test
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|