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.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pydis_site/apps/content/models/tag.py b/pydis_site/apps/content/models/tag.py
index 3c729768..c504ce21 100644
--- a/pydis_site/apps/content/models/tag.py
+++ b/pydis_site/apps/content/models/tag.py
@@ -23,6 +23,11 @@ class Commit(models.Model):
"""The URL to the commit on GitHub."""
return self.URL_BASE + self.sha
+ def lines(self) -> collections.abc.Iterable[str]:
+ """Return each line in the commit message."""
+ for line in self.message.split("\n"):
+ yield line
+
def format_users(self) -> collections.abc.Iterable[str]:
"""Return a nice representation of the user(s)' name and email."""
for author in json.loads(self.author):