Page MenuHomeSoftware Heritage

gitea: Inherit from Gogs lister
ClosedPublic

Authored by vlorentz on Aug 23 2022, 11:51 AM.

Details

Summary

This removes code and adds support for incremental pagination.

While both are essentially the same lister now, it still makes sense to
keep the Gitea lister separate, in order to:

  1. display them in different categories on https://archive.softwareheritage.org/
  2. support possible divergence of APIs in the future

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 D8289 (id=29937)

Rebasing onto dde7865ac4...

Current branch diff-target is up to date.
Changes applied before test
commit 0ec13061f8aefdd271594a4a40eff7ec46e2d699
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Aug 23 11:49:40 2022 +0200

    gitea: Inherit from Gogs lister
    
    This removes code and adds support for incremental pagination.
    
    While both are essentially the same lister now, it still makes sense to
    keep the Gitea lister separate, in order to:
    
    1. display them in different categories on https://archive.softwareheritage.org/
    2. support possible divergence of APIs in the future

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

Build is green

Patch application report for D8289 (id=29944)

Rebasing onto dde7865ac4...

Current branch diff-target is up to date.
Changes applied before test
commit 17a219ece0846b4cb4a27ac0ac6ab1b9d681b0ad
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Aug 23 11:49:40 2022 +0200

    gitea: Inherit from Gogs lister
    
    This removes code and adds support for incremental pagination.
    
    While both are essentially the same lister now, it still makes sense to
    keep the Gitea lister separate, in order to:
    
    1. display them in different categories on https://archive.softwareheritage.org/
    2. support possible divergence of APIs in the future

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

anlambert added a subscriber: anlambert.

Looks good to me.

As other listers (like gitlab) and probably future ones also return next page links in HTTP response headers,
I think we should add a new lister class (HTTPLinkHeaderLister for instance) wrapping common processing
to get the next page link and inherits from it in relevant listers.
But that's out of scope for that diff.

This revision is now accepted and ready to land.Aug 23 2022, 1:59 PM
This revision was automatically updated to reflect the committed changes.