feat: improve listing runs

This commit is contained in:
Jason Song committed 2023-01-06 16:29:10 +08:00
1 parent 6f6bfc5d51
commit aba1c03fee
5 files changed
+22 -35

No files matched your search

+10
View File
@@ -51,9 +51,19 @@ func init() {
}
func (run *ActionRun) HTMLURL() string {
if run.Repo == nil {
return ""
}
return fmt.Sprintf("%s/actions/runs/%d", run.Repo.HTMLURL(), run.Index)
}
func (run *ActionRun) Link() string {
if run.Repo == nil {
return ""
}
return fmt.Sprintf("%s/actions/runs/%d", run.Repo.Link(), run.Index)
}
// LoadAttributes load Repo TriggerUser if not loaded
func (run *ActionRun) LoadAttributes(ctx context.Context) error {
if run == nil {