mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 19:11:25 +01:00
perf: drop wasted requests and reuse markdown renderers
pr edit with reviewers and other fields reads the pull request once, org delete counts only repositories, org view counts concurrently, team list skips the repository count of all-repository teams, pr diff --web builds the URL locally, pr list re-reads pull requests concurrently for review fields, and glamour renderers are built once per width and color. Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
8 files changed
+104
-47
No files matched your search
@@ -292,11 +292,11 @@ $ tea org delete acme-old --yes`,
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
size, err := service.Size(cmd.Context(), org.Name)
|
||||
repos, err := service.RepositoryCount(cmd.Context(), org.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if size.Repositories != nil && *size.Repositories > 0 {
|
||||
if repos != nil && *repos > 0 {
|
||||
return &services.ConflictError{Reason: services.ReasonOwnsRepos, Kind: "organization", Key: org.Name, Hint: "transfer or delete them first (see tea repo list " + org.Name + ")"}
|
||||
}
|
||||
if err := a.confirmAction(cmd, terminal.Confirmation{
|
||||
|
||||
Reference in new issue
Block a user