Page MenuHomeSoftware Heritage

github: Remove dead code
ClosedPublic

Authored by vlorentz on Apr 21 2022, 8:33 PM.

Details

Summary

Authentication is handled directly in the session

Diff Detail

Repository
rDLS Listers
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D7629 (id=27632)

Rebasing onto 2fa9f0abd2...

Current branch diff-target is up to date.
Changes applied before test
commit d0924f39d04e7b7128c55a116280e2c6b6ec5a00
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Apr 21 20:32:45 2022 +0200

    github: Remove dead code
    
    Authentication is handled directly in the session

See https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/493/ for more details.

I've no idea if what you are saying is true.
Also, i'm unsure about the coverage on that part of the code so ¯\_(ツ)_/¯.

I'll let someone else decide.

That's easy to check.

Before this diff:

 dev@desktop5  ~/swh-environment/swh-lister  ➦ 2fa9f0a  grep github_request ../*/swh -rI
../swh-lister/swh/lister/github/lister.py:def github_request(
../swh-lister/swh/lister/github/lister.py:                    response = github_request(current_url, session=self.session)

After this diff:

 dev@desktop5  ~/swh-environment/swh-lister   master  grep github_request ../*/swh -rI
../swh-lister/swh/lister/github/lister.py:def github_request(url: str, session: requests.Session) -> requests.Response:
../swh-lister/swh/lister/github/lister.py:                    response = github_request(current_url, session=self.session)
swh/lister/github/lister.py
189

Ok, it's handled in self.session (see previous lines).

Now i got it.

This revision is now accepted and ready to land.Apr 22 2022, 12:01 PM
This revision was automatically updated to reflect the committed changes.