sample-rulez.yaml: Replace obsolete constant
If you install a recent python-gitlab
, you get version 4.13.0. The MASTER_ACCESS
constant used in the example rules file has been deprecated/obsolete since python-gitlab
sometime in version 2 already and since been removed.
Steps for reproduction:
python3 -m venv venv
source venv/bin/activate
pip install pyyaml
pip install python-gitlab
./gitlab-rulez diff ./sample-rulez.yaml
This results in:
Traceback (most recent call last):
File "/home/uli/gitlab-rulez/./gitlab-rulez", line 597, in <module>
r.load_rules(args.RULES)
File "/home/uli/gitlab-rulez/./gitlab-rulez", line 396, in load_rules
self._convert_constant_value(b, "push_access_level")
File "/home/uli/gitlab-rulez/./gitlab-rulez", line 387, in _convert_constant_value
item[key] = getattr(gitlab.const, symbol)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'gitlab.const' has no attribute 'MASTER_ACCESS'. Did you mean: 'OWNER_ACCESS'?
Edited by Ulrich Eckhardt