Commit Graph

19 Commits

Author SHA1 Message Date
6543 6b6fdd91ce UrlEscape Function Arguments used in UrlPath (#273)
close #271

* [x] add check if user/repo-name is empty
* [x] use net/url for links to encode

Co-authored-by: Andrew Thornton <art27@cantab.net>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/273
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
2021-03-22 04:20:32 +08:00
6543 c5a981333c Add DeleteTag & Correct DeleteReleaseByTag (#488)
* Add DeleteTag + Tests
* Correct DeleteReleaseByTag func + Tests

this is because of https://github.com/go-gitea/gitea/pull/14563 witch fixed unreleased inconsistency

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/488
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-14 00:14:24 +08:00
cameronbraid 30e7dc9ccb Add html_url field to Release struct (#477)
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>
2021-01-17 23:14:34 +08:00
Norwin 68eec69f47 Add DeleteRepoTag function (#461)
add DeleteRepoTag()

fixes #441

add test

didnt run them yet 🙃

Co-authored-by: Norwin Roosen <git@nroo.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/461
Reviewed-by: 6543 <6543@obermui.de>
Reviewed-by: khmarbaise <khmarbaise@noreply.gitea.io>
Co-Authored-By: Norwin <noerw@noreply.gitea.io>
Co-Committed-By: Norwin <noerw@noreply.gitea.io>
2020-12-10 02:08:22 +08:00
6543 9c81fa936f Use Predefind Versions & Compare Function (#442)
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>
2020-11-13 04:59:04 +08:00
6543 61f89c458f Add GetReleaseByTag (#427)
Add GetReleaseByTag & Test for all Release functiosn

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/427
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: lafriks <lafriks@noreply.gitea.io>
2020-09-29 14:35:59 +00: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 5d880baff1 Add Validate func for Create/Edit Options (#370)
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>
2020-06-09 10:47:55 +00:00
spawn2kill e7bf8a6842 added pagination options for listing requests (#205)
fix golint issue

small improvements

ListMyRepos now receives a value instead of a pointer

reverted makefile changes

added sleep in order to increase CI stability

resolved conflicts

Use RepositoryMeta struct on Issues (#267)

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/267
Reviewed-by: lafriks <lafriks@noreply.gitea.io>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>

extend SearchUsers (#248)

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: spawn2kill <spawn2kill@noreply.gitea.io>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/248
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: lafriks <lafriks@noreply.gitea.io>

Implement Repo Transfer (#264)

fix test

check version

add TestRepoTransfer

add TransferRepo

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/264
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: lafriks <lafriks@noreply.gitea.io>

Add notifications (#226)

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: spawn2kill <spawn2kill@noreply.gitea.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/226
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: lafriks <lafriks@noreply.gitea.io>

Use StateType (#265)

use StateType

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/265
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: lafriks <lafriks@noreply.gitea.io>

opt setDefaults on issue_comment

trigger CI

Trigger notification

resolved conflicts

Fix AddEmail (#260)

Merge branch 'master' into fix-AddEMail

Add ListIssueCommentOptions for optional param (#243)

Merge branch 'master' into impruve-ListXIssueComments

Remove ListUserIssues() ... (#262)

Merge branch 'master' into rm-ListUserIssues

correct version (#257)

Merge branch 'master' into targed-version

Extend Issue Struct (#258)

fix

extend IssueTest

add Repository to Issue struct

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/258
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>

Merge branch 'master' into targed-version

format code (#245)

fix if test is to fast

remove lgtm bot config (gitea handle this now)

format code

Add GetIssueComment (#216)

Merge branch 'master' into update-comment-api

Fix & Refactor UserApp Functions (#247)

Merge branch 'master' into refactor-user-app

Add SearchRepo API Call (#254)

Merge branch 'master' into search_repo

IssueSubscribtion: Check http Status responce (#242)

Merge branch 'master' into impruve-issueWatch

Refactor RepoWatch (#241)

Merge branch 'master' into refactor-repoWatch

Add ListMilestoneOption to ListRepoMilestones (#244)

use StateType

use PageSize

adjut test since gitea bug got fixed (#gitea/10047)

add TestMilestones

add optional ListMilestoneOption

format

Add ListOptions struct (#249)

same struct as in models/list_options.go

add mising license header

add ListOptions struct

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/249
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: lafriks <lafriks@noreply.gitea.io>

[README] add import path (#239)

add import path

add import path to readme

Changelog v0.11.0 (#235)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/235
Reviewed-by: lafriks <lafriks@noreply.gitea.io>
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: John Olheiser <john.olheiser@gmail.com>

Add TestMyUser (#237)

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/237
Reviewed-by: lafriks <lafriks@noreply.gitea.io>
Reviewed-by: Andrew Thornton <art27@cantab.net>

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/239
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: John Olheiser <john.olheiser@gmail.com>

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/244
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: Andrew Thornton <art27@cantab.net>

Merge branch 'master' into refactor-repoWatch

Add ListOptions struct (#249)

same struct as in models/list_options.go

add mising license header

add ListOptions struct

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/249
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: lafriks <lafriks@noreply.gitea.io>

add TEST

fix GetMyWatchedRepos

[README] add import path (#239)

add import path

add import path to readme

Changelog v0.11.0 (#235)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/235
Reviewed-by: lafriks <lafriks@noreply.gitea.io>
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: John Ol...

Co-authored-by: Hilário Coelho <hilario.coelho@securityside.com>
Co-authored-by: 6543 <6543@noreply.gitea.io>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/205
Reviewed-by: 6543 <6543@noreply.gitea.io>
Reviewed-by: Andrew Thornton <art27@cantab.net>
2020-02-05 07:59:55 +00:00
Lunny Xiao e41e9ea72c Move all structs from code.gitea.io/gitea/modules/structs to local to resolve the dependencies problem (#188) 2019-10-13 01:34:01 +00:00
Lunny Xiao 38803cbe75 Refactor codes to remove structs and depend them on code.gitea.io/gitea/modules/structs (#171)
* refactor codes to remove structs and depend them on code.gitea.io/gitea/modules/structs

* fix testing
2019-05-11 18:38:52 +03:00
Lauris BH d5a42771e7
Revert PR #133 (#140) 2019-01-27 13:35:53 +02:00
Norwin 6abdddefe3 make Release.Target a required parameter (#133) 2018-12-04 18:03:21 -05:00
Jonas Franz c026786979 Add Attachment API (#90)
* 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>
2018-02-28 11:17:30 +08:00
Vlad Temian a184f2d334 Run `go fmt` for the entire project (#85) 2018-01-09 02:26:05 +02:00
Ethan Koenig 1da52cf95f Updates to swagger documentation (#77) 2017-11-12 11:10:33 +02:00
Stefan Lacatus 11e0aa8cd4 Added read-only attachments to the Releases API (#63)
* 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>
2017-08-23 23:38:18 +02:00
Bo-Yi Wu 58bcff5dcc duplicated of json field (#47)
* duplicated of json field

* update json field name.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-04-16 07:07:55 +08:00
Ethan Koenig 61a9dda39e Rename gitea/releases.go -> gitea/release.go (#34) 2017-01-01 10:20:21 +08:00
Renamed from gitea/releases.go (Browse further)