mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-08 22:17:34 +01:00
Improve outdated messages: don't show last commit on tag triggers
This commit is contained in:
parent
3b213889ca
commit
607c534174
@ -978,14 +978,14 @@ class PackageUpdateConfig(db.Model):
|
||||
if self.trigger == PackageUpdateTrigger.COMMIT:
|
||||
msg = "New commit {} found on the Git repo.".format(self.last_commit[0:5])
|
||||
|
||||
last_release = self.package.releases.first()
|
||||
if last_release and last_release.commit_hash:
|
||||
msg += " The last release was commit {}".format(last_release.commit_hash[0:5])
|
||||
|
||||
return msg
|
||||
|
||||
else:
|
||||
msg = "New tag {} found on the Git repo.".format(self.last_tag)
|
||||
|
||||
last_release = self.package.releases.first()
|
||||
if last_release and last_release.commit_hash:
|
||||
msg += " The last release was commit {}".format(last_release.commit_hash[0:5])
|
||||
|
||||
return msg
|
||||
return "New tag {} found on the Git repo.".format(self.last_tag)
|
||||
|
||||
def get_create_release_url(self):
|
||||
title = self.last_tag or self.outdated_at.strftime("%Y-%m-%d")
|
||||
|
Loading…
Reference in New Issue
Block a user