gogs/lister: Allow public gogs instance listing

Prior to this commit, the lister assumed authentication was required. It exists public
gogs instances which do not require it.

This also updates documentation to mention the usual api location. This is useful when
people wants to actually trigger a listing as a pre-check flight.

This drops repetitive instruction in the gitea lister as well.

Co-authored with Antoine Lambert (@anlambert) <anlambert@softwareheritage.org>.

Related to infra/sysadm-environment#4644
This commit is contained in:
Antoine R. Dumont (@ardumont) 2022-10-21 17:50:49 +02:00
parent 0baaf68cff
commit 8a82bbf95f
No known key found for this signature in database
GPG key ID: 52E2E9840D10C3B8
3 changed files with 18 additions and 21 deletions

View file

@ -1,4 +1,4 @@
# Copyright (C) 2018-2021 The Software Heritage developers
# Copyright (C) 2018-2022 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
@ -20,8 +20,3 @@ class GiteaLister(GogsLister):
accessible at https://try.gitea.io/api/v1/ and https://codeberg.org/api/v1/."""
LISTER_NAME = "gitea"
def on_anonymous_mode(self):
logger.warning(
"No authentication token set in configuration, using anonymous mode"
)