Add an argument to list-repos to include the team name
$ list-repos --tag stable:follows-policy | head -n 5 openstack-dev/pbr openstack/automaton openstack/cinder openstack/debtcollector openstack/designate $ list-repos --tag stable:follows-policy --include-team | head -n 5 oslo openstack-dev/pbr oslo openstack/automaton cinder openstack/cinder oslo openstack/debtcollector designate openstack/designate This makes it possible to find the team the owns a repo that has a particular tag. Change-Id: I103280379f7869a13177e81022eae2948cad929c
This commit is contained in:
parent
6686d4426e
commit
9717c8125a
|
@ -51,6 +51,12 @@ def main():
|
|||
default=False,
|
||||
help='include all cycle-based code repositories',
|
||||
)
|
||||
parser.add_argument(
|
||||
'--include-team',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='Also include the team name for each repository',
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
team_data = governance.get_team_data(url=args.project_list)
|
||||
|
@ -63,4 +69,8 @@ def main():
|
|||
cycle_based=args.cycle_based,
|
||||
)
|
||||
for repo in sorted(repos, key=operator.attrgetter('name')):
|
||||
print(repo.name)
|
||||
if args.include_team:
|
||||
print("%s %s" % (governance.get_repo_owner(team_data, repo.name),
|
||||
repo.name))
|
||||
else:
|
||||
print(repo.name)
|
||||
|
|
Loading…
Reference in New Issue