Skip to content

Don't exit if a renamed label wasn't foundΒ #17

@jean

Description

@jean

If we see a request to rename a non-existent label, just complain and continue with the rest of the work.

iff --git a/src/labels/cli.py b/src/labels/cli.py
index 6cb7723..55e516d 100644
--- a/src/labels/cli.py
+++ b/src/labels/cli.py
@@ -204,7 +204,7 @@ def sync_cmd(
                     f'parameter: "{local_label.name}"',
                     err=True,
                 )
-                sys.exit(1)
+                labels_to_ignore[remote_name] = local_label

I'm driving labels from another package, running it across many repos.
Some repos may not have the label that I'm renaming.
I'd like it to skip the missing label and continue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions