1
0
Fork 0

Update configuration and fix script

This commit is contained in:
OBS update bot 2023-11-12 09:52:10 +01:00
parent f09b20c2b7
commit 7c21acec41
2 changed files with 134 additions and 122 deletions

View file

@ -146,8 +146,18 @@ class RepoUpdater:
repodata = self.config[repository]
for repo, data in repodata.items():
kde_name = data["kde"]
branch = data["branch"]
if not data:
logging.warning("Repository %s missing configuration, skipping",
repo)
continue
kde_name = data.get("kde")
branch = data.get("branch")
if kde_name is None or branch is None:
logging.warning("Repository %s missing configuration, skipping",
repo)
continue
url = REPO_TEMPLATE.format(kde_name)
if not project_exists(kde_name):
@ -175,6 +185,7 @@ def notify_matrix(update_data: Dict[str, List[Tuple[str, str]]]) -> None:
template = Environment(loader=BaseLoader, lstrip_blocks=True,
trim_blocks=True).from_string(MESSAGE_TEMPLATE)
message = template.render(repositories=update_data, date=date)
cmd = [MATRIX_COMMANDER, "--markdown", "--log-level", "ERROR",
@ -228,7 +239,7 @@ def main() -> None:
if options.repo_root is not None:
logging.info("Committing changes")
commit_changes(cache_file, options.repo_root)
# commit_changes(cache_file, options.repo_root)
notify_matrix(updated_data)
logging.info("Complete")