diff --git a/CHANGELOG.md b/CHANGELOG.md index f1a9fdcb..e7388032 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ### Changed +- Non-existing users and teams will now trigger a warning message rather a failure during the execution of an `apply` operation. ([#51](https://gitlab.eclipse.org/eclipsefdn/security/otterdog/-/issues/51)) - Prevent printing of credential data when trace mode is enabled. ([#47](https://gitlab.eclipse.org/eclipsefdn/security/otterdog/-/issues/47)) - Switching to module `click` for command line parsing. - Updated module `playwright` to version 1.33.0. diff --git a/otterdog/providers/github/__init__.py b/otterdog/providers/github/__init__.py index ba7d2760..46ccc3eb 100644 --- a/otterdog/providers/github/__init__.py +++ b/otterdog/providers/github/__init__.py @@ -163,9 +163,16 @@ def get_actor_ids(self, actor_names: list[str]) -> list[str]: result = [] for actor in actor_names: if actor.startswith("/"): - result.append(self.rest_client.get_user_node_id(actor[1:])) + try: + result.append(self.rest_client.get_user_node_id(actor[1:])) + except RuntimeError: + utils.print_warn(f"user '{actor}' does not exist, skipping") + else: - result.append(self.rest_client.get_team_node_id(actor)) + try: + result.append(self.rest_client.get_team_node_id(actor)) + except RuntimeError: + utils.print_warn(f"team '{actor}' does not exist, skipping") return result