Add a function to get a repository by a given ID
Co-authored-by: Jochen Hunz <j.hunz@anchorpoint.app>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/511
Reviewed-by: 6543 <6543@obermui.de>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: J0Nes90 <j0nes90@noreply.gitea.io>
Co-committed-by: J0Nes90 <j0nes90@noreply.gitea.io>
the sdk enforce pagination, but most list endpoints dont require it ...
close#507 fully
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/509
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
close one issue of #507
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/508
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
let the test PASS again
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/480
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
This PR close#475
It complements the `Client.GetArchive` call, which returns a byte slice and hence is unsuitable for use with large repositories, with a `Client.GetArchiveReader` method that returns a `io.ReadCloser` that streams the retrieved archvie and, therefore, induces a much smaller memory footprint on the calling client.
Co-authored-by: Peter Gardfjäll <peter.gardfjall.work@gmail.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/476
Reviewed-by: 6543 <6543@obermui.de>
Reviewed-by: Norwin <noerw@noreply.gitea.io>
Co-authored-by: petergardfjall <petergardfjall@noreply.gitea.io>
Co-committed-by: petergardfjall <petergardfjall@noreply.gitea.io>
gitea server returns a html_url field so make this available in the Release struct
Co-authored-by: Cameron Braid <cameron@drivenow.com.au>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/477
Reviewed-by: 6543 <6543@obermui.de>
Reviewed-by: Norwin <noerw@noreply.gitea.io>
Co-authored-by: cameronbraid <cameronbraid@noreply.gitea.io>
Co-committed-by: cameronbraid <cameronbraid@noreply.gitea.io>
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>
update min go requrement & update required go-version lib
use special version in notifications
migrate to new version check function
add predefined versions & comparsion function
Co-authored-by: 6543 <6543@noreply.gitea.io>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/442
Reviewed-by: Norwin <noerw@noreply.gitea.io>
Reviewed-by: Andrew Thornton <art27@cantab.net>
Co-Authored-By: 6543 <6543@obermui.de>
Co-Committed-By: 6543 <6543@obermui.de>
detect arch only on linux
fix
`make test-instance:` Support for MacOS & different architectures
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/450
Reviewed-by: mrsdizzie <info@mrsdizzie.com>
Reviewed-by: Andrew Thornton <art27@cantab.net>
Co-Authored-By: 6543 <6543@obermui.de>
Co-Committed-By: 6543 <6543@obermui.de>
Remove MAINTAINERS because LGTM is build into Gitea & Contributors are in git log
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/449
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>
remove unessesary version checks
Gitea Version Requirement >= 1.11
set lib version string
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/421
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: John Olheiser <john.olheiser@gmail.com>
Readme: show Version Requirements
SDK: dont support gitea < 1.10
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/419
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: John Olheiser <john.olheiser@gmail.com>
do not use interface for sdk ...
url.PathEscape()
add Tests
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/418
Reviewed-by: mrsdizzie <info@mrsdizzie.com>
Reviewed-by: John Olheiser <john.olheiser@gmail.com>
Functional Options dont have a reason for an error (at the moment)
fix test & code comment
md format
add SetSudo
always use Context
Add Migration Docu
Use Functional Options fo NewClient
Merge branch 'master' into with-ctx
optional exec http requests with context
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/417
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: John Olheiser <john.olheiser@gmail.com>
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>