Not able to run revq after configuring as per the readme
It's not working on my side [3].
As far as I could tell, the initial graphql query to retrieve the username returns None. I don't see anything obviously missing either from my user configuration in gitlab or the local configuration regarding the tool. [1]
Beyond that first issue, if i'm bypassing that error and hardcode my user, i've yet another error regarding graphql query complexity being too high to run to completion. [2]
[1]
$ pyenv virtualenv 3.11.1 gitlab-revq-3.11.1
$ pip install colorama
$ pip install python-gitlab
$ cat ~/.python-gitlab.cfg
[global]
default = swh
ssl_verify = true
timeout = 5
[staging-swh]
url = https://gitlab-staging.swh.network
private_token = helper: ~/bin/pass show ardumont/swh/gitlab/staging/api-access-token
api_version = 4
[swh]
url = https://gitlab.softwareheritage.org
private_token = helper: ~/bin/pass show ardumont/swh/gitlab/production/api-access-token # either with hard-coded token too
api_version = 4
$ revq.py # or python3 revq.py # i've added some print statement to explicit my issue the username is not retrieved somehow
instance: swh
config: <configparser.ConfigParser object at 0x7efe9b99b2d0>
config[instance]: <Section: swh>
data: {'data': {'currentUser': None}}
Traceback (most recent call last):
File "/home/tony/repo/public/gitlab-revq/./revq.py", line 406, in <module>
main()
File "/home/tony/repo/public/gitlab-revq/./revq.py", line 198, in main
my_username = data["data"]["currentUser"]["username"]
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
[2]
$ python3 revq.py
instance: swh
config: <configparser.ConfigParser object at 0x7f7fe42b9610>
config[instance]: <Section: swh>
data: {'data': {'currentUser': None}}
# the code as a my_username="ardumont" instead of the failing instruction.
Fetching page 1...
{'errors': [{'message': 'Query has complexity of 248, which exceeds max complexity of 200'}]}
[3]
$ git log | head -1
commit 4bcedc7da015a9f2cf3b0c9675d3ab13b83dd7e0