aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/content/models
diff options
context:
space:
mode:
Diffstat (limited to 'pydis_site/apps/content/models')
-rw-r--r--pydis_site/apps/content/models/tag.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pydis_site/apps/content/models/tag.py b/pydis_site/apps/content/models/tag.py
index e06ce067..1a20d775 100644
--- a/pydis_site/apps/content/models/tag.py
+++ b/pydis_site/apps/content/models/tag.py
@@ -16,7 +16,12 @@ class Commit(models.Model):
)
message = models.TextField(help_text="The commit message.")
date = models.DateTimeField(help_text="The date and time the commit was created.")
- author = models.TextField(help_text="The person(s) who created the commit.")
+ authors = models.TextField(help_text=(
+ "The person(s) who created the commit. This is a serialized JSON object. "
+ "Refer to the GitHub documentation on the commit endpoint "
+ "(schema/commit.author & schema/commit.committer) for more info. "
+ "https://docs.github.com/en/rest/commits/commits#get-a-commit"
+ ))
@property
def url(self) -> str:
@@ -30,7 +35,7 @@ class Commit(models.Model):
def format_authors(self) -> collections.abc.Iterable[str]:
"""Return a nice representation of the author(s)' name and email."""
- for author in json.loads(self.author):
+ for author in json.loads(self.authors):
yield f"{author['name']} <{author['email']}>"