diff --git a/issue_generator.py b/issue_generator.py index 317542b..00d0cc3 100755 --- a/issue_generator.py +++ b/issue_generator.py @@ -146,6 +146,7 @@ class FeedReader: return None return feed.entries[0] + def read_feed(self) -> bool | None: '''Read a feed and post an issue if a new item is found''' entry = self.first_item() @@ -219,5 +220,19 @@ class GithubReader(GithubTagReader): if __name__ == "__main__": from config import FEED_READERS + fail = 0 + ok = 0 + posted = 0 for reader in FEED_READERS: - reader.read_feed() + res = reader.read_feed() + if res == None: + print(f"No versions of {reader.name} available.") + fail += 1 + elif res == False: + ok += 1 + elif res == True: + print(f"{reader.name} outdated, issue posted!") + posted += 1 + else: + print(f"{reader.name} read with status {res}") + print(f"I've added {posted} new issues, {fail} items have no versions and {ok} items are up to date.")