Cherry-pick of upstream PR go-gitea/gitea#37518 onto feat/projects-api.
The PR is itself a rebase of #36831 onto main, adapted for the
multi-projects-per-issue model added in #36784.
Endpoints (all under /repos/{owner}/{repo}/projects...):
GET . list projects
POST . create project
GET /{id} get project
PATCH /{id} update project
DELETE /{id} delete project
GET /{id}/columns list columns
POST /{id}/columns create column
PATCH /columns/{id} update column
DELETE /columns/{id} delete column
GET /columns/{id}/issues list issues in column
POST /columns/{id}/issues/{issue_id} add/move issue to column
DELETE /columns/{id}/issues/{issue_id} remove issue from column
POST /columns/{id}/issues/{issue_id}/move move between columns
Source: https://github.com/go-gitea/gitea/pull/37518
Fix various legacy problems, including:
* Don't create default column when viewing an empty project
* Fix layouts for Windows
* Fix (partially) #15509
* Fix (partially) #17705
The sidebar refactoring: it is a clear partial-reloading approach,
brings better user experiences, and it makes "Multiple projects" /
"Project column on issue sidebar" feature easy to be added.
---------
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
This PR split the `Board` into two parts. One is the struct has been
renamed to `Column` and the second we have a `Template Type`.
But to make it easier to review, this PR will not change the database
schemas, they are just renames. The database schema changes could be in
future PRs.
---------
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: yp05327 <576951401@qq.com>