mirror of
https://github.com/f-droid/fdroidserver.git
synced 2026-08-07 05:46:15 -04:00
add Liberapay: field with username as data
Liberapay was originally included using a numeric ID, since they had not yet finalized the public URLs. Now it is a username. So this logic prefers the username in Liberapay: field, and keeps the old LiberapayID: to ease migration. LiberapayID: will not override Liberapay:. Clients are expected to prefer Liberapay: over LiberapayID:
This commit is contained in:
13 files changed
+28
-4
No files matched your search
@@ -36,6 +36,7 @@ from fdroidserver.common import FDroidPopen
|
||||
|
||||
DONATION_FIELDS = (
|
||||
'Donate',
|
||||
'Liberapay',
|
||||
'OpenCollective',
|
||||
)
|
||||
|
||||
@@ -1008,9 +1009,11 @@ class UpdateTest(unittest.TestCase):
|
||||
for field in DONATION_FIELDS:
|
||||
self.assertIsNotNone(app.get(field), field)
|
||||
self.assertEqual('LINK1', app.get('Donate'))
|
||||
self.assertEqual('USERNAME', app.get('Liberapay'))
|
||||
self.assertEqual('USERNAME', app.get('OpenCollective'))
|
||||
|
||||
app['Donate'] = 'keepme'
|
||||
app['Liberapay'] = 'keepme'
|
||||
app['OpenCollective'] = 'keepme'
|
||||
fdroidserver.update.insert_funding_yml_donation_links(apps)
|
||||
for field in DONATION_FIELDS:
|
||||
|
||||
Reference in new issue
Block a user