ci-fairy check-merge-request fails with Python exception if source branch is in the MR's target project
See e.g. https://gitlab.freedesktop.org/mesa/mesa/-/jobs/6614407:
$ ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/gitlab/base.py", line 59, in __getattr__
return self.__dict__["_updated_attrs"][name]
KeyError: 'allow_collaboration'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/gitlab/base.py", line 62, in __getattr__
value = self.__dict__["_attrs"][name]
KeyError: 'allow_collaboration'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/gitlab/base.py", line 82, in __getattr__
return self.__dict__["_parent_attrs"][name]
KeyError: 'allow_collaboration'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/ci-fairy", line 11, in <module>
load_entry_point('ci-fairy==0.1', 'console_scripts', 'ci-fairy')()
File "/usr/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/lib/python3.8/site-packages/ci_fairy.py", line 1149, in check_merge_request
if not mr.allow_collaboration:
File "/usr/lib/python3.8/site-packages/gitlab/base.py", line 84, in __getattr__
raise AttributeError(name)
AttributeError: allow_collaboration