aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/content/models
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2022-08-16 22:08:39 +0400
committerGravatar Hassan Abouelela <[email protected]>2022-08-16 22:08:39 +0400
commit7c240c68e24c0f3bf041522ce21de271cb92c6f3 (patch)
tree6b714750a6cf71dbb6b68a9c2081367ba7f76431 /pydis_site/apps/content/models
parentAdd Tag Metadata (diff)
Better Split Up Tag Commit Messages
Signed-off-by: Hassan Abouelela <[email protected]>
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):