diff --git a/scripts/language_stats.py b/scripts/language_stats.py index 133a44d..6588ff2 100644 --- a/scripts/language_stats.py +++ b/scripts/language_stats.py @@ -295,9 +295,11 @@ def main() -> int: # Fetch current README, update it, and push readme_content, readme_sha = fetch_readme(session) updated_readme = replace_between_markers(readme_content, markdown) - update_readme(session, updated_readme, readme_sha) - - print("README.md updated successfully.", file=sys.stderr) + if updated_readme == readme_content: + print("Language stats unchanged. Skipping README update.", file=sys.stderr) + else: + update_readme(session, updated_readme, readme_sha) + print("README.md updated successfully.", file=sys.stderr) # Save current state for next run new_state = {"repo_timestamps": current_timestamps}