From d3eb78709030650f24f5e31730f47591d6cef4cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= <tiangolo@gmail.com>
Date: Thu, 17 Mar 2022 13:36:21 -0500
Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20FastAPI=20People=20generat?=
 =?UTF-8?q?ion=20to=20include=20missing=20file=20in=20commit=20(#4695)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .github/actions/people/app/main.py | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/.github/actions/people/app/main.py b/.github/actions/people/app/main.py
index dc0bbc4c0..0b6ff4063 100644
--- a/.github/actions/people/app/main.py
+++ b/.github/actions/people/app/main.py
@@ -501,9 +501,16 @@ if __name__ == "__main__":
     github_sponsors_path = Path("./docs/en/data/github_sponsors.yml")
     people_old_content = people_path.read_text(encoding="utf-8")
     github_sponsors_old_content = github_sponsors_path.read_text(encoding="utf-8")
-    new_people_content = yaml.dump(people, sort_keys=False, width=200, allow_unicode=True)
-    new_github_sponsors_content = yaml.dump(github_sponsors, sort_keys=False, width=200, allow_unicode=True)
-    if people_old_content == new_people_content and github_sponsors_old_content == new_github_sponsors_content:
+    new_people_content = yaml.dump(
+        people, sort_keys=False, width=200, allow_unicode=True
+    )
+    new_github_sponsors_content = yaml.dump(
+        github_sponsors, sort_keys=False, width=200, allow_unicode=True
+    )
+    if (
+        people_old_content == new_people_content
+        and github_sponsors_old_content == new_github_sponsors_content
+    ):
         logging.info("The FastAPI People data hasn't changed, finishing.")
         sys.exit(0)
     people_path.write_text(new_people_content, encoding="utf-8")
@@ -517,7 +524,9 @@ if __name__ == "__main__":
     logging.info(f"Creating a new branch {branch_name}")
     subprocess.run(["git", "checkout", "-b", branch_name], check=True)
     logging.info("Adding updated file")
-    subprocess.run(["git", "add", str(people_path)], check=True)
+    subprocess.run(
+        ["git", "add", str(people_path), str(github_sponsors_path)], check=True
+    )
     logging.info("Committing updated file")
     message = "👥 Update FastAPI People"
     result = subprocess.run(["git", "commit", "-m", message], check=True)