Commit Graph

518 Commits

Author SHA1 Message Date
appleboy a991e370c5 feat: implement commit comparison feature in Gitea client (#659)
See the API: https://github.com/go-gitea/gitea/pull/30349

- Add a new file `repo_compare.go` with package `gitea` and `Compare` struct
- Implement `CompareCommits` method in `Client` struct in `repo_compare.go`
- Add `version1_22_0` constant in `version.go`

Signed-off-by: appleboy <appleboy.tw@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/659
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: appleboy <appleboy.tw@gmail.com>
Co-committed-by: appleboy <appleboy.tw@gmail.com>
2024-04-17 05:47:25 +00:00
appleboy bb25c989a0 chore: update Go module dependencies to latest versions (#658)
- Update the version of `golang.org/x/crypto` from `v0.17.0` to `v0.22.0` in `go.mod`
- Update the version of `golang.org/x/sys` from `v0.15.0` to `v0.19.0` in `go.mod`

Signed-off-by: appleboy <appleboy.tw@gmail.com>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/658
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: appleboy <appleboy.tw@gmail.com>
Co-committed-by: appleboy <appleboy.tw@gmail.com>
2024-04-16 08:15:01 +00:00
appleboy 18e5522f90 ci: update Gitea versions in workflows and Makefile (#657)
- Update Gitea Docker image version from `1.21.8` to `1.21.10` in testing workflow
- Update Gitea version from `1.21.1` to `1.21.10` in Makefile

Signed-off-by: appleboy <appleboy.tw@gmail.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/657
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: appleboy <appleboy.tw@gmail.com>
Co-committed-by: appleboy <appleboy.tw@gmail.com>
2024-04-14 13:09:31 +00:00
Lunny Xiao bad4de0196 Upgrade CI (#655)
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/655
2024-03-16 08:34:20 +00:00
rjhaverkamp 9ec1b82849 Fix typo in visibilty error (#653)
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/653
Reviewed-by: John Olheiser <jolheiser@noreply.gitea.com>
Co-authored-by: rjhaverkamp <rjhaverkamp@noreply.gitea.com>
Co-committed-by: rjhaverkamp <rjhaverkamp@noreply.gitea.com>
2024-02-28 00:12:39 +00:00
6543 bf71ec2fd9 Make only referenc of ErrUnknownVersion an error (#648)
just a refactor nit

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/648
Reviewed-by: John Olheiser <jolheiser@noreply.gitea.com>
2024-02-22 21:33:21 +00:00
Martijn van der Kleijn 001d5fad51 chore: Bump required Go version to 1.18 (#650)
Reasoning for the bump:
- Enforce (instead of assume) use of newer Go version to ensure presence of security fixes
- Enable use of more recent language features
- Go < 1.21 is EOL
- Testing workflow already uses >= 1.20

For sec fixes, see: https://go.dev/doc/devel/release#go1.21.minor

Signed-off-by: Martijn van der Kleijn <martijn.niji@gmail.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/650
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Martijn van der Kleijn <martijn.niji@gmail.com>
Co-committed-by: Martijn van der Kleijn <martijn.niji@gmail.com>
2024-02-22 21:28:11 +00:00
diogo464 5d0143e4e7 fix: updated repository field in Package struct (#647)
The definition for `Package` in the most recent api switch the
repository field from a string to a `Repository`.
Without this fix api calls like ListPackages will fail to deserialize
the response.

Co-authored-by: diogo464 <diogo464@protonmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/647
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: John Olheiser <jolheiser@noreply.gitea.com>
Co-authored-by: diogo464 <diogo464@noreply.gitea.com>
Co-committed-by: diogo464 <diogo464@noreply.gitea.com>
2024-01-29 05:38:16 +00:00
Simon Ser 53f735b911 Add support for user hooks (#644)
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/644
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Reviewed-by: John Olheiser <jolheiser@noreply.gitea.com>
Co-authored-by: Simon Ser <contact@emersion.fr>
Co-committed-by: Simon Ser <contact@emersion.fr>
2024-01-25 16:04:00 +00:00
Christian Groschupp 98b424a8af feat(release): add GetLatestRelease method (#639)
This PR adds the GetLatestRelease method to support the /repos/{owner}/{repo}/releases/latest endpoint.
ref: https://docs.gitea.com/api/1.20/#tag/repository/operation/repoGetLatestRelease

Resolves gitea/go-sdk#630

Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/639
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Christian Groschupp <christian@groschupp.org>
Co-committed-by: Christian Groschupp <christian@groschupp.org>
2024-01-06 05:14:12 +00:00
Bo-Yi Wu 2abfdd7ba6 chore: update dependencies to latest versions (#646)
- Update the version of `github.com/hashicorp/go-version` from `v1.5.0` to `v1.6.0`
- Update the version of `golang.org/x/crypto` from `v0.0.0-20220525230936-793ad666bf5e` to `v0.17.0`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/646
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-committed-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-12-31 04:06:05 +00:00
Andreas Wachter 8f4d3d8916 increased description limits to 2048 (#645)
I noticed that the description limits on gitea were changed to 2048 characters last year, but it was still 255 in the SDK.

Here the corresponding commit on gitea:
8351172b6e

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/645
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: Andreas Wachter <andreas.wachter@buddyspencer.monster>
Co-committed-by: Andreas Wachter <andreas.wachter@buddyspencer.monster>
2023-12-30 04:48:39 +00:00
ysicing bde56fb9bb feat(repo): update repo field (#642)
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/642
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: ysicing <i@ysicing.me>
Co-committed-by: ysicing <i@ysicing.me>
2023-12-24 20:16:02 +00:00
ysicing 228d6931f4 feat(repo-mirrors): add repo sync mirrors (#640)
add sync mirrors

Signed-off-by: ysicing <i@ysicing.me>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/640
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: ysicing <i@ysicing.me>
Co-committed-by: ysicing <i@ysicing.me>
2023-12-24 20:15:31 +00:00
appleboy c8745e1599 feat: add new constants for repository actions (#643)
- Add a new constant `RepoUnitActions` to represent the actions of a repository

Signed-off-by: appleboy <appleboy.tw@gmail.com>

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/643
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: appleboy <appleboy.tw@gmail.com>
Co-committed-by: appleboy <appleboy.tw@gmail.com>
2023-12-17 04:36:39 +00:00
Lauris BH 0e0a4691b6 Add Link header parsing in response (#638)
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>
2023-12-04 14:50:48 +00:00
crapStone e23e8aa300 add option to set user-agent to gitea client (#637)
This PR adds the ability to set a custom user-agent to the gitea client

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/637
Reviewed-by: 6543 <6543@obermui.de>
Reviewed-by: John Olheiser <john+gitea@jolheiser.com>
Co-authored-by: crapStone <crapstone01@gmail.com>
Co-committed-by: crapStone <crapstone01@gmail.com>
2023-11-15 01:43:37 +00:00
venc0r d5e174e5b5 feat(hook): add support for authorization_header in webhooks (#633)
fixes #632

Co-authored-by: Jörg Markert <venc0r@live.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/633
Reviewed-by: John Olheiser <john+gitea@jolheiser.com>
Co-authored-by: venc0r <venc0r@noreply.gitea.com>
Co-committed-by: venc0r <venc0r@noreply.gitea.com>
2023-09-26 00:01:48 +00:00
appleboy 0141b499c9 docs: update badges in README.md file (#628)
- Remove the badge for build status from the README.md file
- Add a badge for the MIT license to the README.md file
- Add a badge for the release to the README.md file
- Add a badge for the chat to the README.md file
- Add a badge for microbadger to the README.md file
- Add a badge for the Go Report Card to the README.md file
- Add a badge for GoDoc to the README.md file

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/628
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: appleboy <appleboy.tw@gmail.com>
Co-committed-by: appleboy <appleboy.tw@gmail.com>
2023-09-06 02:23:01 +00:00
Bo-Yi Wu 091528835f feat: Add API routes to list org secrets (#629)
- Add a new file `gitea/org_action.go`
- Add a new file `gitea/secret.go`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

block by https://github.com/go-gitea/gitea/pull/26485

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/629
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: John Olheiser <john+gitea@jolheiser.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-committed-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-08-15 15:15:48 +00:00
infinoid ae1583a7be Add missing fields to BranchProtection and related structs (#626)
the `gitea.BranchProtection` struct is missing some fields which are present in the actual gitea API (and swagger).

* BranchProtection.RuleName was added in gitea v1.19.0, via [PR #20825](https://github.com/go-gitea/gitea/pull/20825)
* BranchProtection.UnprotectedFilePatterns was added in gitea v1.16.0, via [PR #16395](https://github.com/go-gitea/gitea/pull/16395)

This PR adds those fields to the BranchProtection struct, and the related Create and Edit option structs, to match the structs [defined](https://github.com/go-gitea/gitea/blob/main/modules/structs/repo_branch.go#L27) on the gitea server side.

Co-authored-by: Mark Glines <mark@glines.org>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/626
Reviewed-by: John Olheiser <john+gitea@jolheiser.com>
Reviewed-by: delvh <dev.lh@web.de>
Co-authored-by: infinoid <infinoid@noreply.gitea.com>
Co-committed-by: infinoid <infinoid@noreply.gitea.com>
2023-08-01 16:26:41 +00:00
John Olheiser 93cfc320cf Update PR template (#627)
Noted by @ infinoid (thanks!)

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/627
2023-08-01 14:50:16 +00:00
b398f0fcac 0fe2ace132 Access the details of packages (#620)
This pull request provides access to the packages API by allowing packages to be listed, retrieved individually and for the files within a package to be listed.

Resolves gitea/go-sdk#619.

Co-authored-by: root <root@prxdevgw.westeros>
Co-authored-by: John Olheiser <john+gitea@jolheiser.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/620
Co-authored-by: b398f0fcac <b398f0fcac@noreply.gitea.com>
Co-committed-by: b398f0fcac <b398f0fcac@noreply.gitea.com>
2023-07-15 02:59:55 +00:00
Alessandro De Blasis f4be505bf6 feat(oauth2): confidential_client handling (#625)
This PR adds support for the `confidential_client` in `oauth2` to reflect the swagger APIs.

It has been surfaced here: https://github.com/Lerentis/terraform-provider-gitea/pull/46

Simple tests have also been added.

Please note that in this PR I am considering the current behaviour:

> if confidential_client is not set, it's assumed that it's false

However, from the swagger, it seems that the implicit default is `true` instead.

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/625
Co-authored-by: Alessandro De Blasis <alex@deblasis.net>
Co-committed-by: Alessandro De Blasis <alex@deblasis.net>
2023-07-15 02:55:06 +00:00
JohnWalkerx 315cf7aac8 Add missing MergePullRequestOption parameters for head_commit_id and merge_when_checks_succeed (#624)
This PR adds the missing parameters for MergePullRequestOption `head_commit_id` and `merge_when_checks_succed` like in the current Gitea API.
Resolves #623

Signed-off-by: Johannes Lauffer <johnwalkerx@mailbox.org>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/624
Co-authored-by: JohnWalkerx <johnwalkerx@mailbox.org>
Co-committed-by: JohnWalkerx <johnwalkerx@mailbox.org>
2023-07-15 02:53:03 +00:00
Zettat123 970776d1c1 Switch to Gitea Actions (#618)
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/618
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.io>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2023-05-09 11:50:20 +08:00
Norwin 24a404e561 Add `GetIssueTemplates()` (#603)
This API was added in 1.16, [template forms](https://github.com/go-gitea/gitea/pull/20987) will be in 1.18.
I don't think we need to add version checks, as the respective `.Form` field will just be empty on unsupported versions, but correct me if I'm wrong here.

fixes #547

- i took the freedom to change the struct property names from the API names for clarity
- I didn't add  tests because it would effectively just test gitea's API to be functional  (as long as there is only this GET method)

Co-authored-by: John Olheiser <john+gitea@jolheiser.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/603
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.io>
Reviewed-by: John Olheiser <john+gitea@jolheiser.com>
Co-authored-by: Norwin <git@nroo.de>
Co-committed-by: Norwin <git@nroo.de>
2023-04-20 00:19:26 +08:00
jolheiser 3c5cad657b Add token scopes enum and add to payloads (#617)
Closes #616

/cc @chmouel

---

This should work fine, as the Gitea API accepts a string array and then internally converts the scopes.

Co-authored-by: Chmouel Boudjnah <chmouel@chmouel.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/617
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.io>
Co-authored-by: jolheiser <john.olheiser@gmail.com>
Co-committed-by: jolheiser <john.olheiser@gmail.com>
2023-04-19 23:57:54 +08:00
6543 6d1bcd107f support error.Is for ErrUnknownVersion (#615)
followup of https://gitea.com/gitea/go-sdk/pulls/612

see https://gitea.com/gitea/tea/pulls/538#issuecomment-734707

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/615
Reviewed-by: John Olheiser <john+gitea@jolheiser.com>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
2023-04-03 11:34:49 +08:00
John Olheiser 7511c6d3cd Set client version to lowest for compat if server version can't be recognized and return specific error (#612)
This is a possible resolution for gitea/tea#531

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/612
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: John Olheiser <john+gitea@jolheiser.com>
Co-committed-by: John Olheiser <john+gitea@jolheiser.com>
2023-04-03 05:30:53 +08:00
Dmitry Afanasiev 846d53e967 add support for api /repos/{owner}/{repo}/collaborators/{collaborator}/permission (#611)
Co-authored-by: Dmitry Afanasiev <afanasiev.dmitry@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/611
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Dmitry Afanasiev <dafanasiev@noreply.gitea.io>
Co-committed-by: Dmitry Afanasiev <dafanasiev@noreply.gitea.io>
2023-03-04 20:31:32 +08:00
John Olheiser df1269f18d Pin CI (#614)
This PR pins the CI and various versions of tools in our Makefile to ensure a more stable run.

Note that they aren't necessarily the most current versions, as the SDK likely needs more work to bring it back up to par with the main repo.

Co-authored-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/614
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: John Olheiser <john+gitea@jolheiser.com>
Co-committed-by: John Olheiser <john+gitea@jolheiser.com>
2023-03-01 08:50:04 +08:00
John Olheiser 2c35c11772 Add confidential_client to oauth2 struct (#613)
Just updating the struct to match the current API

Co-authored-by: jolheiser <john.olheiser@gmail.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/613
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: John Olheiser <john+gitea@jolheiser.com>
Co-committed-by: John Olheiser <john+gitea@jolheiser.com>
2023-03-01 06:21:34 +08:00
edieruby 2d9ee57af1 update go.mod (#608)
add the depend of github.com/davidmz/go-pageant

Co-authored-by: Y <469960757@qq.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/608
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: edieruby <edieruby@noreply.gitea.io>
Co-committed-by: edieruby <edieruby@noreply.gitea.io>
2022-10-17 02:35:12 +08:00
qwerty287 1c9c71d84a Add `ListPullRequestFiles` (#607)
Was added in 1dfa28ffa5.

Co-authored-by: qwerty287 <ndev@web.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/607
Reviewed-by: 6543 <6543@obermui.de>
Reviewed-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: qwerty287 <qwerty287@noreply.gitea.io>
Co-committed-by: qwerty287 <qwerty287@noreply.gitea.io>
2022-10-17 02:33:29 +08:00
6543 8f846bdb9b Update PullRequest struct (#606)
Add AllowMaintainerEdit

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/606
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
2022-09-27 10:50:37 +08:00
earl-warren aef4e5e2bd Add `DeleteIssue()` (#598)
Fixes: #596

Signed-off-by: Earl Warren <contact@earl-warren.org>

Co-authored-by: Earl Warren <contact@earl-warren.org>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/598
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: Norwin <noerw@noreply.gitea.io>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: earl-warren <contact@earl-warren.org>
Co-committed-by: earl-warren <contact@earl-warren.org>
2022-09-16 05:45:01 +08:00
6543 7aeaaa45e1 More integration test fixes (#604) 2022-09-16 02:26:31 +08:00
Norwin e5b5b3447a Fix broken CI (#602)
closes #599
"blocks" #598

Co-authored-by: Norwin <git@nroo.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/602
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
2022-09-16 01:47:16 +08:00
6543 5852fcc4a3 Update EditPullRequestOption struct (#601)
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/601
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: John Olheiser <john+gitea@jolheiser.com>
2022-09-15 09:29:50 +08:00
6543 a0127ed0e7 use build tag to support darwin again (#600)
fix https://ci.woodpecker-ci.org/woodpecker-ci/woodpecker/build/3344/11

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/600
Reviewed-by: John Olheiser <john+gitea@jolheiser.com>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
2022-08-31 08:41:39 +08:00
6543 cc14c63ccc Add GetFileReader() & GetFile() support git-lfs (#595)
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/595
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: KN4CK3R <kn4ck3r@noreply.gitea.io>
2022-07-29 18:51:05 +08:00
lafriks de34275bb6 Add method to get user organization permissions (#594)
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/594
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: lafriks <lafriks@noreply.gitea.io>
Co-committed-by: lafriks <lafriks@noreply.gitea.io>
2022-07-20 10:57:09 +08:00
Wim e5f0c189f2 Add support for http signatures (#553)
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/553
Reviewed-by: Norwin <noerw@noreply.gitea.io>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Wim <42wim@noreply.gitea.io>
Co-committed-by: Wim <42wim@noreply.gitea.io>
2022-07-13 00:45:08 +08:00
6543 359c771ce3 Make CI work again (#593)
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/593
2022-05-31 06:08:44 +08:00
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
6543 23e1316337 Relax TestAdminCronTasks (#591)
Relax test since this will be variable upstream ...

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/591
Reviewed-by: Gusted <williamzijl7@hotmail.com>
2022-05-15 06:22:02 +08:00
Gusted f3ebdb8afe Add function to get commit diff/patch (#589)
- Adds function the gets a commit's diff or patch.
- Ref: https://github.com/go-gitea/gitea/pull/17095

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/589
Reviewed-by: John Olheiser <john.olheiser@gmail.com>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-committed-by: Gusted <williamzijl7@hotmail.com>
2022-05-15 06:16:26 +08:00
arkamar 319a978c6c Allow PR review with comments only (#570)
It is common to create PR review with Comments only, where foreword Body is empty. This is allowed by Gitea API, therefore SDK should return empty body error only if there are no comments.

Co-authored-by: Petr Vaněk <arkamar@atlas.cz>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/570
Reviewed-by: Norwin <noerw@noreply.gitea.io>
Reviewed-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: arkamar <arkamar@noreply.gitea.io>
Co-committed-by: arkamar <arkamar@noreply.gitea.io>
2022-05-02 03:09:34 +08:00
Gusted adebf1cd11 Add file commit history (#588)
- Allow to specify to only get commit history of specific file.
- Ref: https://github.com/go-gitea/gitea/pull/17652

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/588
Reviewed-by: John Olheiser <john.olheiser@gmail.com>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-committed-by: Gusted <williamzijl7@hotmail.com>
2022-05-01 15:48:52 +08:00