Crayon2000 / GitConduit

Git migration tool
MIT License
0 stars 0 forks source link

HTTP 422 Unprocessable Entity: Description MaxSize #4

Open Crayon2000 opened 3 years ago

Crayon2000 commented 3 years ago

When importing from GitHub to Gogs I get this error.

Can be reproduced with

{
    "name": "easyloggingpp",
    "description": "Single header C++ logging library. It is extremely powerful, extendable, light-weight, fast performing, thread and type safe and consists of many built-in features. It provides ability to write logs in your own customized format. It also provide support for logging your classes, third-party libraries, STL and third-party containers etc.",
    "homepage": "",
    "private": false,
    "has_issues": false,
    "has_projects": true,
    "has_wiki": false,
    "has_downloads": true
}

In Gogs UI we see:

Description of repository. Maximum 512 characters length.

In fact with the API the limit is maximum 255. See https://github.com/gogs/go-gogs-client/blob/master/repo.go#L67

The description field should be truncated when creating a Gogs repository.

Crayon2000 commented 3 years ago

Note: A PR was created to raise the limit from 255 to 512 in the Gogs API: https://github.com/gogs/go-gogs-client/pull/123