You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
forrepoinopen(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)
ifnotdryrun:
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 *_cmd implementations, specifically sync_cmd. Maybe it's worthwhile moving this out to labels/commands.py or someplace, to make labels more amenable to use as library. Does this make sense?
The text was updated successfully, but these errors were encountered:
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:
This stops after the first iteration due to this line.
return
?*_cmd
implementations, specificallysync_cmd
. Maybe it's worthwhile moving this out tolabels/commands.py
or someplace, to makelabels
more amenable to use as library. Does this make sense?The text was updated successfully, but these errors were encountered: