Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pkg/cmd/workflow/shared/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ func FindWorkflow(client *api.Client, repo ghrepo.Interface, workflowSelector st
if _, err := strconv.Atoi(workflowSelector); err == nil || isWorkflowFile(workflowSelector) {
workflow, err := getWorkflowByID(client, repo, workflowSelector)
if err != nil {
return nil, err
var httpErr api.HTTPError
if errors.As(err, &httpErr) && httpErr.StatusCode == 404 {
return nil, fmt.Errorf("workflow %s not found on the default branch", workflowSelector)
Comment thread
iamazeem marked this conversation as resolved.
}
}
return []Workflow{*workflow}, nil
}
Expand Down