mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-07-03 04:21:29 +00:00
email: For direct sponsored uploads, email both the sponsor and sponsoree
This commit is contained in:
parent
b896fbf038
commit
ba0dc69d0f
@ -38,12 +38,19 @@ If you have any questions about this email, please ask them in #ubuntu-release c
|
|||||||
|
|
||||||
def person_chooser(source):
|
def person_chooser(source):
|
||||||
"""Assign blame for the current source package."""
|
"""Assign blame for the current source package."""
|
||||||
|
def should_add_package_creator():
|
||||||
|
# things which were copied into unstable by a known bot
|
||||||
|
bot = source['package_signer_link'] in BOTS
|
||||||
|
# direct uploads
|
||||||
|
regular = not source['creator_link'] and not source['sponsor_link']
|
||||||
|
return bot or regular
|
||||||
|
|
||||||
people = {
|
people = {
|
||||||
source['package_signer_link'],
|
source['package_signer_link'],
|
||||||
source['sponsor_link'],
|
source['sponsor_link'],
|
||||||
source['creator_link'],
|
source['creator_link'],
|
||||||
} - {None} - BOTS
|
} - {None} - BOTS
|
||||||
if source['package_signer_link'] in BOTS:
|
if should_add_package_creator():
|
||||||
people.add(source['package_creator_link'])
|
people.add(source['package_creator_link'])
|
||||||
return people
|
return people
|
||||||
|
|
||||||
|
@ -127,6 +127,7 @@ class T(unittest.TestCase):
|
|||||||
})
|
})
|
||||||
self.assertEqual(person_chooser(SPONSORED_UPLOAD), {
|
self.assertEqual(person_chooser(SPONSORED_UPLOAD), {
|
||||||
'https://api.launchpad.net/1.0/~apw',
|
'https://api.launchpad.net/1.0/~apw',
|
||||||
|
'https://api.launchpad.net/1.0/~smb'
|
||||||
})
|
})
|
||||||
self.assertEqual(person_chooser(BILETO), {
|
self.assertEqual(person_chooser(BILETO), {
|
||||||
'https://api.launchpad.net/1.0/~dobey',
|
'https://api.launchpad.net/1.0/~dobey',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user