~brian-murray/+junk/bug-agent

« back to all changes in this revision

Viewing changes to crichton-update-bugs.py

  • Committer: Brian Murray
  • Date: 2023-09-22 19:22:45 UTC
  • Revision ID: brian@canonical.com-20230922192245-dfuqjqbu6gw2f5wi
Do not subscribe sponsors if any bug task is oem-priority

Show diffs side-by-side

added added

removed removed

Lines of Context:
1598
1598
                print('Skipping LP: #%s due to inability to find date attachment added' % bug_number)
1599
1599
                continue
1600
1600
            target_name = task.bug_target_name
1601
 
            # The Canonical OEM team has their own sponsorship process
1602
 
            if target_name in special_pkgs or target_name.startswith('oem-'):
1603
 
                target_name = task.bug_target_name.split(' ')[0]
1604
 
                print('Skipping LP: #%s because it is a special package %s' % (bug_number, target_name))
1605
 
                logging.info('LP: #%s skipped because it is about special package %s' % (bug_number, target_name))
 
1601
            # The Canonical OEM team has their own sponsorship process so
 
1602
            # don't autosubscribe ubuntu-sponsors
 
1603
            oem_project = False
 
1604
            for task in bug.bug_tasks:
 
1605
                if task.bug_target_name == 'oem-priority':
 
1606
                    oem_project = True
 
1607
                    break
 
1608
            if target_name in special_pkgs or target_name.startswith('oem-') \
 
1609
                    or oem_project:
 
1610
                if oem_project:
 
1611
                    target_name = 'oem-priority'
 
1612
                else:
 
1613
                    target_name = task.bug_target_name.split(' ')[0]
 
1614
                print('Skipping LP: #%s because it is a special package %s' %
 
1615
                      (bug_number, target_name))
 
1616
                logging.info(
 
1617
                    'LP: #%s skipped because it is about special package %s' %
 
1618
                    (bug_number, target_name))
1606
1619
                continue
1607
1620
            if 'patch' not in bug_tags:
1608
1621
                add_tags(bug, ['patch'])