fix
This commit is contained in:
parent
4cfc6be322
commit
8d9b05608f
5 changed files with 59 additions and 11 deletions
|
|
@ -44,7 +44,10 @@ func (a *App) createForgejoRepo(ctx context.Context, name, description string, p
|
|||
HTMLURL string `json:"html_url"`
|
||||
}
|
||||
if err := json.Unmarshal(respBody, &parsed); err != nil {
|
||||
return "", nil
|
||||
return "", fmt.Errorf("forgejo create repo parse failed: %w", err)
|
||||
}
|
||||
if strings.TrimSpace(parsed.HTMLURL) == "" {
|
||||
return "", errors.New("forgejo create repo response missing html_url")
|
||||
}
|
||||
return parsed.HTMLURL, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue