Reviewed-on: https://codeberg.org/mvdkleijn/forgejo-sdk/pulls/1
Co-authored-by: Martijn van der Kleijn <martijn.niji@gmail.com>
Co-committed-by: Martijn van der Kleijn <martijn.niji@gmail.com>
Signed-off-by: Martijn van der Kleijn <martijn.niji@gmail.com>
Helps if need to get all data that can not be requested in single page
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/638
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: appleboy <appleboy.tw@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-committed-by: Lauris BH <lauris@nix.lv>
- 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>
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>
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>
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>
add TestLabels TEST
fix ...
impruve CreatePullReviewOptions Validate
some code refactor & reformat
add Validate functions where it make sence
add Validate() for CreateLabelOption
rm ToDo - not needed
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/370
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: Andrew Thornton <art27@cantab.net>
* Adding assets struct
Signed-off-by: Jonas Franz <info@jonasfranz.de>
* Replacing assets with attachments
Signed-off-by: Jonas Franz <info@jonasfranz.de>
* Using pointer to attachment instead of copy
Signed-off-by: Jonas Franz <info@jonasfranz.de>
* Adding swagger tags to attachment
Renaming Assets to Attachments
Signed-off-by: Jonas Franz <info@jonasfranz.de>
* Add client functions for attachments
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add EditAttachmentForm
Add CreateReleaseAttachment function
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add EditReleaseAttachment
Add DeleteReleaseAttachment
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add missing "Content-Type" to CreateReleaseAttachment
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Using reader for uploading file
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Use io.Copy instead of part.Write
Signed-off-by: Jonas Franz <info@jonasfranz.de>
* Add error checking
Signed-off-by: Jonas Franz <info@jonasfranz.de>
* Replace Attachments with Assets to make API Github compatible
Signed-off-by: Jonas Franz <info@jonasfranz.de>
* Added assets (attachments) to the releases.
- Added three new endpoints to the release api for attachments.
- List assets: GET /repos/:owner/:repo/releases/:id/assets
- Get single asset: GET /repos/:owner/:repo/releases/assets/:id
- Get /repos/:owner/:repo/releases/latest` that gets the latest published full release for the repository. Draft releases and prereleases are not returned by this endpoint.
Signed-off-by: Petrisor Lacatus <placatus@ptc.com>