Per-backend log labels: show Gitea Actions text on waiting/failure pages and footer
This commit is contained in:
@@ -93,6 +93,11 @@ class GithubRun(models.Model):
|
||||
return get_backend(self.backend or 'github').log_url(self.github_run_id)
|
||||
return ""
|
||||
|
||||
@property
|
||||
def backend_label(self):
|
||||
"""任务所属构建平台的展示名(用于日志链接等文案)。"""
|
||||
return "Gitea Actions" if (self.backend or "github") == "gitea" else "GitHub Actions"
|
||||
|
||||
def short_uuid(self):
|
||||
return self.uuid[:8] if len(self.uuid) >= 8 else self.uuid
|
||||
|
||||
|
||||
Reference in New Issue
Block a user