gitlab-projects-settings 4.2.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.
Files changed (48) hide show
  1. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/.chglog/config.yml +1 -0
  2. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/.gitlab-ci.yml +19 -19
  3. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/CHANGELOG.md +23 -4
  4. {gitlab_projects_settings-4.2.0/gitlab_projects_settings.egg-info → gitlab_projects_settings-4.2.1}/PKG-INFO +2 -2
  5. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1/gitlab_projects_settings.egg-info}/PKG-INFO +2 -2
  6. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/setup.py +1 -1
  7. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/features/gitlab.py +12 -6
  8. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/types/gitlab.py +14 -10
  9. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/.chglog/CHANGELOG.tpl.md +0 -0
  10. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/.chglog/changelog.sh +0 -0
  11. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/.gitignore +0 -0
  12. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/.markdownlint.json +0 -0
  13. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/.style.yapf +0 -0
  14. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/.vscode/extensions.json +0 -0
  15. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/.vscode/settings.json +0 -0
  16. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/LICENSE +0 -0
  17. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/README.md +0 -0
  18. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/gitlab_projects_settings.egg-info/SOURCES.txt +0 -0
  19. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/gitlab_projects_settings.egg-info/dependency_links.txt +0 -0
  20. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/gitlab_projects_settings.egg-info/entry_points.txt +0 -0
  21. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/gitlab_projects_settings.egg-info/requires.txt +0 -0
  22. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/gitlab_projects_settings.egg-info/top_level.txt +0 -0
  23. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/mypy.ini +0 -0
  24. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/requirements/build.txt +0 -0
  25. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/requirements/deploy.txt +0 -0
  26. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/requirements/quality.txt +0 -0
  27. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/requirements/runtime.txt +0 -0
  28. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/setup.cfg +0 -0
  29. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/__init__.py +0 -0
  30. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/__main__.py +0 -0
  31. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/cli/__init__.py +0 -0
  32. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/cli/entrypoint.py +0 -0
  33. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/cli/main.py +0 -0
  34. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/features/__init__.py +0 -0
  35. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/package/__init__.py +0 -0
  36. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/package/bundle.py +0 -0
  37. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/package/settings.py +0 -0
  38. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/package/updates.py +0 -0
  39. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/package/version.py +0 -0
  40. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/prints/__init__.py +0 -0
  41. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/prints/boxes.py +0 -0
  42. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/prints/colors.py +0 -0
  43. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/prints/themes.py +0 -0
  44. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/system/__init__.py +0 -0
  45. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/system/platform.py +0 -0
  46. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/types/__init__.py +0 -0
  47. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/types/namespaces.py +0 -0
  48. {gitlab_projects_settings-4.2.0 → gitlab_projects_settings-4.2.1}/src/types/strings.py +0 -0
@@ -17,6 +17,7 @@ options:
17
17
  commit_groups:
18
18
  title_maps:
19
19
  chore: Cleanups
20
+ ci: CI
20
21
  docs: Documentation
21
22
  feat: Features
22
23
  fix: Bug Fixes
@@ -42,17 +42,17 @@ changelog:
42
42
  - echo ''
43
43
  - 'read -p " > Release tag : " -r tag'
44
44
  - echo ''
45
- - git tag -f -m '' "${tag}"
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 '' "${tag}"
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 '' "${tag}"
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 == "develop"
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 != "develop"
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 == "develop"
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 != "develop"
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 == "develop"
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 != "develop"
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 == "develop"
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 != "develop"
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,23 @@
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
+
2
21
  <a name="4.2.0"></a>
3
22
  ## [4.2.0](https://gitlab.com/AdrianDC/gitlab-projects-settings/compare/4.1.0...4.2.0) (2024-05-27)
4
23
 
@@ -34,7 +53,7 @@
34
53
  * **gitlab:** disable 'Repository' group feature after its members
35
54
  * **gitlab:** accept deletion denials in 'project_reset_members'
36
55
 
37
- ### Ci
56
+ ### CI
38
57
 
39
58
  * **gitlab-ci:** support multiple 'METAVAR' words in 'readme' job
40
59
  * **gitlab-ci:** deprecate requirements install in 'lint' job
@@ -78,7 +97,7 @@
78
97
  * **gitlab:** get all branches and tags upon 'list()' calls
79
98
  * **gitlab:** get all members in 'project_reset_members'
80
99
 
81
- ### Ci
100
+ ### CI
82
101
 
83
102
  * **gitlab-ci:** move 'readme' job after 'build' and local 'install'
84
103
 
@@ -111,7 +130,7 @@
111
130
  <a name="2.0.2"></a>
112
131
  ## [2.0.2](https://gitlab.com/AdrianDC/gitlab-projects-settings/compare/2.0.1...2.0.2) (2024-04-28)
113
132
 
114
- ### Ci
133
+ ### CI
115
134
 
116
135
  * **gitlab-ci:** disable 'typing' mypy caching with 'MYPY_CACHE_DIR'
117
136
 
@@ -140,7 +159,7 @@
140
159
  * **gitlab:** enforce '--dry-run' usage and improve Python codestyle
141
160
  * **settings:** apply 'subgroup' feature to subgroup groups
142
161
 
143
- ### Ci
162
+ ### CI
144
163
 
145
164
  * **gitlab-ci:** implement 'readme' local job to update README details
146
165
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gitlab-projects-settings
3
- Version: 4.2.0
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gitlab-projects-settings
3
- Version: 4.2.0
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
@@ -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'
@@ -209,7 +209,8 @@ class GitLabFeature:
209
209
 
210
210
  # Disable 'access_level' feature
211
211
  for level in feature.access_level:
212
- if getattr(project, level.key) != AccessLevels.DISABLED:
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 getattr(project, key):
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 getattr(project, level.key) == AccessLevels.DISABLED:
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 not getattr(project, key):
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 (getattr(project, level.key) != AccessLevels.DISABLED \
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 (getattr(project, key) \
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 = any(
133
- 'path_with_namespace' in item \
134
- and isinstance(item, dict) \
135
- and item['path_with_namespace'] != project.path_with_namespace \
136
- for item in gitlab.http_get(
137
- f'/projects/{project.id}/job_token_scope/allowlist',
138
- get_all=True,
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