From 8f4d3d891663f78565aad91a17c9907068dc3e0c Mon Sep 17 00:00:00 2001 From: Andreas Wachter Date: Sat, 30 Dec 2023 04:48:39 +0000 Subject: [PATCH] increased description limits to 2048 (#645) I noticed that the description limits on gitea were changed to 2048 characters last year, but it was still 255 in the SDK. Here the corresponding commit on gitea: https://github.com/go-gitea/gitea/commit/8351172b6e5221290dc5b2c81e159e2eec0b43c8 Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/645 Reviewed-by: techknowlogick Co-authored-by: Andreas Wachter Co-committed-by: Andreas Wachter --- gitea/repo.go | 4 ++-- gitea/repo_migrate.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gitea/repo.go b/gitea/repo.go index 7d2d242..79aa52d 100644 --- a/gitea/repo.go +++ b/gitea/repo.go @@ -334,8 +334,8 @@ func (opt CreateRepoOption) Validate(c *Client) error { if len(opt.Name) > 100 { return fmt.Errorf("name has more than 100 chars") } - if len(opt.Description) > 255 { - return fmt.Errorf("description has more than 255 chars") + if len(opt.Description) > 2048 { + return fmt.Errorf("description has more than 2048 chars") } if len(opt.DefaultBranch) > 100 { return fmt.Errorf("default branch name has more than 100 chars") diff --git a/gitea/repo_migrate.go b/gitea/repo_migrate.go index 3ab690e..2de2153 100644 --- a/gitea/repo_migrate.go +++ b/gitea/repo_migrate.go @@ -62,7 +62,7 @@ func (opt *MigrateRepoOption) Validate(c *Client) error { } else if len(opt.RepoName) > 100 { return fmt.Errorf("RepoName to long") } - if len(opt.Description) > 255 { + if len(opt.Description) > 2048 { return fmt.Errorf("Description to long") } switch opt.Service {