-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
enhancementNew feature or enhancement for labelsNew feature or enhancement for labels
Description
I'm using labels in an unorthodox way: I'm driving it from another package.
Specifically, I'm spreading out updates over groups of repositories:
for repo in open(Path(group) / 'repos.txt').readlines():
repo = repo.strip()
workfile = Path(group) / 'workdir' / f'{repo}.toml'
context.invoke(labels_cli.fetch_cmd, owner='...', repo=repo, filename=workfile)
merge_labels(Path(group) / 'labels_to_update.toml', workfile)
delete_labels(Path(group) / 'labels_to_delete.txt', workfile)
# This may fail with labels that really require merging:
context.invoke(labels_cli.sync_cmd, owner='...', repo=repo, filename=workfile, dryrun=dryrun)
if not dryrun:
rename_standard_labels(Path(group) / 'labels_to_update.toml')This stops after the first iteration due to this line.
- Would it be OK to just turn that into a
return? - The reason why I'm invoking commands is that a lot of work is done in the
*_cmdimplementations, specificallysync_cmd. Maybe it's worthwhile moving this out tolabels/commands.pyor someplace, to makelabelsmore amenable to use as library. Does this make sense?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or enhancement for labelsNew feature or enhancement for labels