mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-01 14:56:30 +00:00
minor clean up
This commit is contained in:
parent
431ca79733
commit
98c4999a1f
@ -316,20 +316,25 @@ func getWorkflowFileLink(ctx *context_module.Context, run *actions_model.ActionR
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
entries, err := actions.ListWorkflows(commit)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
var workflowEntry *git.TreeEntry
|
||||
for _, entry := range entries {
|
||||
if entry.Name() == run.WorkflowID {
|
||||
workflowEntry = entry
|
||||
break
|
||||
}
|
||||
}
|
||||
var workflowFilePath string
|
||||
if workflowEntry != nil {
|
||||
workflowFilePath = workflowEntry.GetPathInRepo()
|
||||
|
||||
if workflowEntry == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
workflowFilePath := workflowEntry.GetPathInRepo()
|
||||
if workflowFilePath == "" {
|
||||
return ""
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user