def main():
    parser = argparse.ArgumentParser()
    parser.add_argument(
        '--email-tag',
        action='store_true',
        default=False,
        help='print as an email tag for release notes',
    )
    parser.add_argument(
        'repository',
        help='the name of the repository, such as "openstack/nova"',
    )
    args = parser.parse_args()

    team_data = governance.get_team_data()
    try:
        name = governance.get_repo_owner(team_data, args.repository)
    except ValueError as e:
        parser.error(str(e))
    else:
        if args.email_tag:
            name = '[' + name.split(' ')[0].lower() + ']'
        print(name)
 def test(self):
     owner = governance.get_repo_owner(
         TEAM_DATA,
         'openstack/cinder',
     )
     self.assertEqual('Cinder', owner)
Esempio n. 3
0
 def test(self):
     owner = governance.get_repo_owner(
         TEAM_DATA,
         'openstack/cinder',
     )
     self.assertEqual('Cinder', owner)