Commit Graph

2 Commits

Author SHA1 Message Date
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
Norwin 7ddbf1a015 Fix GetCombinedStatus() (#470)
fix broken GetCombinedStatus

weirdly enough, gitea API responds to .../status properly, if ref has a status.
but if there is no status, an empty response is returned.
../statuses handles both correctly.. 🙃

fix ListStatuses

rename sha to ref and use jsonHeader on GetCombinedStatus

Add Tests

enable tests for GetCombinedStatus()

next fix

final fix

Co-authored-by: Norwin Roosen <git@nroo.de>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/470
Reviewed-by: 6543 <6543@obermui.de>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-Authored-By: Norwin <noerw@noreply.gitea.io>
Co-Committed-By: Norwin <noerw@noreply.gitea.io>
2020-12-17 12:46:51 +08:00