Commit Graph

13 Commits

Author SHA1 Message Date
Gusted 99a9de3172 Add response to `ReadRepoNotifications` (#590)
- This is a breaking change.
- Return the relevant notifications when the Gitea server is 1.16.0 or higher.
- Ref: https://github.com/go-gitea/gitea/pull/17064
- Resolves #543

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/590
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-05-15 23:47:38 +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
Norwin 0fb32ac11f NotificationSubject: add HTMLURL fields (#548)
upstream change: https://github.com/go-gitea/gitea/pull/17178

Co-authored-by: Norwin <git@nroo.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/548
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
2021-10-14 16:24:30 +08:00
6543 cc08994d13 Update List Options (#527)
* ListReleasesOptions: https://github.com/go-gitea/gitea/pull/16175
* ListNotificationOptions: https://github.com/go-gitea/gitea/pull/16177
* ListIssueOption: https://github.com/go-gitea/gitea/pull/16174

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/527
Reviewed-by: Norwin <noerw@noreply.gitea.io>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
2021-07-01 19:39:50 +08:00
6543 fb42ca1c8d Introduce NotifySubjectState (#520)
close #515

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/520
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-07-01 05:06:50 +08:00
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 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 779e9330e9 Update Struct NotificationSubject (#424)
NotificationSubject: add State

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/424
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-09-21 05:00:26 +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 f67cf3c5d0 Extend Notification Functions (#381)
add info about vararg

use fake vararg as per @zeripath

Merge branch 'master' into extend-list-notification

nit

fix

extend notification functions - handle pinned ones

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/381
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-07-21 12:28:16 +00:00
6543 bb6248f50d Add paggination to ListNotification functions (#339)
Merge branch 'master' into update-notifications

Merge branch 'master' into update-notifications

rm nonesence - dont know why i put it there

add paggination to ListNotification functions

refactor

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/339
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: Andrew Thornton <art27@cantab.net>
2020-05-20 08:26:47 +00:00
6543 50efd911c8 Tune CheckNotifications for api change (#308)
notification Check now always return json

make fmt relicts

CheckNotifications: one api call is enouth

add getResponseWithStatus to handle Response customized based on Status

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/308
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: Andrew Thornton <art27@cantab.net>
2020-04-14 13:29:44 +00:00
6543 85ee8a79b6 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>
2020-02-04 08:03:15 +00:00