I would like to know how can one check that public git repository is updated or not (if their are new commits) using python. Help in this regard would be appreciated.
PyGitHub is great for this, you can do something like:
for repo in g.get_organization(ORGANIZATION).get_repos():
print(f"Processing {repo.full_name}...")
commit_activity = repo.get_stats_commit_activity()
# We have 52 weeks of commit history to total up
annual_commits = 0
for week in commit_activity:
annual_commits += week.total
print(f"Totalled {annual_commits} commits.")