docs: add development setup guide (#37960)

Moves the "Hacking on Gitea" page out of the documentation website and into the repository as `docs/development.md`, so contributors find build and test instructions next to the code. The content has been cleaned up and corrected for in-repo use.

---------

Signed-off-by: bircni <bircni@icloud.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
bircni
2026-06-17 06:39:22 +00:00
committed by GitHub
co-authored by wxiaoguang Lunny Xiao
parent 9e84deb969
commit c68925152b
16 changed files with 762 additions and 262 deletions
+1 -7
View File
@@ -50,14 +50,8 @@ func TestAPIUpdateUserAvatar(t *testing.T) {
MakeRequest(t, req, http.StatusBadRequest)
// Test what happens if you use a file that is not an image
text, err := os.ReadFile(filepath.Join(setting.GetGiteaTestSourceRoot(), "tests/integration/README.md"))
assert.NoError(t, err)
if err != nil {
assert.FailNow(t, "Unable to open README.md")
}
opts = api.UpdateUserAvatarOption{
Image: base64.StdEncoding.EncodeToString(text),
Image: base64.StdEncoding.EncodeToString([]byte("This is not an image")),
}
req = NewRequestWithJSON(t, "POST", "/api/v1/user/avatar", &opts).