Commit graph

9 commits

Author SHA1 Message Date
6543
cc14c63ccc Add GetFileReader() & GetFile() support git-lfs (#595)
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/595
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: KN4CK3R <kn4ck3r@noreply.gitea.io>
2022-07-29 18:51:05 +08:00
Gusted
8fab37e740 Enforce golangci-lint + gofumpt (#587)
- Enforce [gofumpt](https://github.com/mvdan/gofumpt) to enforce a more idiomatic go style.
- Enforce golangci-lint a bunch of linters! Which were able to detect a few issues in the current codebase and have been fixed by this PR.
- Updated the Makefile to use `go install ....` instead of the old deprecated way of `go get`

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/587
Reviewed-by: John Olheiser <john.olheiser@gmail.com>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-committed-by: Gusted <williamzijl7@hotmail.com>
2022-04-28 23:33:21 +08:00
Gusted
603e4358f8 Fix CI tests (#579)
- `master` -> `main`, due to https://github.com/go-gitea/gitea/pull/19354
- Fix incorrect variable being passed into assert in `TestPull`.
- Fix `createTestRepo` to only delete existing TestRepo if the result's repo wasn't redirected(e.g. due to being transferred or renamed). Fixes the error in TransferRepo.
- Remove a check for tag verfication, for some developers this will always fail due to local git configs forcing signing on tags.

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/579
Reviewed-by: 6543 <6543@obermui.de>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-committed-by: Gusted <williamzijl7@hotmail.com>
2022-04-22 15:52:45 +08:00
6543
b0ee740ed0 Handle Contents Edge-Case (#492)
close #459

add Tests for #485

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/492
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: khmarbaise <khmarbaise@noreply.gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
2021-02-17 06:47:21 +08:00
6543
32b0722f98 GetFile: Use "ref" in-query if posible (#491)
based on https://github.com/go-gitea/gitea/pull/14563

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/491
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
2021-02-17 04:07:44 +08:00
6543
688ee1978e All Function return http responce (#416)
Add Docs on how to deal with this breaking change

doResponse should return responce in all cases, to prosses things manualy if wanted

helper func return http response

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/416
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-09-14 02:37:09 +00:00
6543
3c36bd251b Copy DeleteFileOptions struct fields into UpdateFileOptions struct (#330) 2020-05-21 10:13:32 +00:00
6543
f7cf231ae9 Add DeleteFile() (#302)
add DeleteFile + Tests

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/302
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: Andrew Thornton <art27@cantab.net>
2020-04-03 12:55:16 +00:00
6543
8045079a7a Add Get/Update/Create File (#281)
remove -binding- since sdk dont use it

Merge branch 'master' into add-edit-file

fix test

Merge branch 'master' into add-edit-file

add TEST

add Get/Create/Update-Contents

add missing structs

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/281
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: John Olheiser <john.olheiser@gmail.com>
2020-04-01 02:39:20 +00:00