lister: Make sure lister that requires github tokens can use it
Deploying the nixguix lister, I realized that even though the credentials configuration is properly set for all listers, the listers actually requiring github origin canonicalization do not have access to the github credentials. It's lost during the constructor to only focus on the lister's credentials. Which currently translates to listers being rate-limited. This commit fixes it by pushing the self.github_session instantiation in the constructor when the lister explicitely requires the github session. Hence lifting the rate limit for maven, packagist, nixguix, and github listers. Related to infra/sysadm-environment#4655
Showing
- swh/lister/github/lister.py 3 additions, 6 deletionsswh/lister/github/lister.py
- swh/lister/github/tests/test_lister.py 1 addition, 1 deletionswh/lister/github/tests/test_lister.py
- swh/lister/maven/lister.py 2 additions, 5 deletionsswh/lister/maven/lister.py
- swh/lister/nixguix/lister.py 1 addition, 11 deletionsswh/lister/nixguix/lister.py
- swh/lister/packagist/lister.py 2 additions, 5 deletionsswh/lister/packagist/lister.py
- swh/lister/pattern.py 11 additions, 0 deletionsswh/lister/pattern.py
Loading
Please register or sign in to comment