Commit graph

22 commits

Author SHA1 Message Date
dfbe9d3ad1
add gpg token function 2024-09-13 11:21:37 -04:00
64b6c07029
add pin and unpin issues 2024-09-12 17:11:44 -04:00
2f616bb0da
add delete repo/org action secrets 2024-09-12 15:47:57 -04:00
8cfbeccb09
update module name 2024-09-12 15:17:01 -04:00
0c24c1e6e7
add repo action secret creation 2024-09-12 15:13:17 -04:00
qwerty287
136185be68 Exclude headers from error 2024-07-20 09:41:06 +00:00
Martijn van der Kleijn
b7c7d5ab5f Use different avatar URL when testing in CI
Signed-off-by: Martijn van der Kleijn <martijn.niji@gmail.com>
2024-06-16 00:11:17 +02:00
Martijn van der Kleijn
c686623cee ci: update testing for Forgejo 7.0.4 release (#12)
- bump Forgejo version to test against to 7.0.4
- ci: Increase the number of milestones to be checked in the test from 2 to 3
- ci: improve test stability by increasing sleep by 100ms
- ci: update avatar url in user test and test more user emails

Reviewed-on: https://codeberg.org/mvdkleijn/forgejo-sdk/pulls/12
Co-authored-by: Martijn van der Kleijn <martijn.niji@gmail.com>
Co-committed-by: Martijn van der Kleijn <martijn.niji@gmail.com>
2024-06-15 21:37:06 +00:00
Martijn van der Kleijn
0f7828d232 Reduce complexity for newHTTPSign()
Signed-off-by: Martijn van der Kleijn <martijn.niji@gmail.com>
2024-06-14 23:26:07 +02:00
Martijn van der Kleijn
1a95b51371 Mark gosec false positives
Signed-off-by: Martijn van der Kleijn <martijn.niji@gmail.com>
2024-06-14 22:35:52 +02:00
Martijn van der Kleijn
d2f7239d02 Bump dependencies
Signed-off-by: Martijn van der Kleijn <martijn.niji@gmail.com>
2024-05-03 17:49:13 +02:00
Martijn van der Kleijn
ae325d4bec Correct misspelling Forgjo
Signed-off-by: Martijn van der Kleijn <martijn.niji@gmail.com>
2024-05-03 17:43:42 +02:00
Bo-Yi Wu
29513fc519 feat: implement organization action secret creation (#661)
- Add `bytes` and `encoding/json` imports to `org_action.go`
- Implement `CreateSecretOption` struct with validation in `org_action.go`
- Add `CreateOrgActionSecret` function to create or update organization secrets in `org_action.go`
- Create new test file `org_action_test.go` with tests for creating and updating organization secrets
- Add `Data` field to `Secret` struct in `secret.go`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/661
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>
2024-05-03 17:39:02 +02:00
tobiasbp
e21c012dcb Get fields loginName & SourceID for users (#654)
This _PR_ adds the following fields to the _User_ struct:

-  _LoginName_: Currently returned by the Gitea API.
- _SourceID_: [Scheduled to be returned by the Gitea API as of version 1.22.0](https://github.com/go-gitea/gitea/pull/29718).

The fields are used for users with non-local Authentication Sources (LDAP, oAuth etc.).

Co-authored-by: tobias.petersen <tobias.petersen@unity3d.com>
Co-authored-by: appleboy <appleboy.tw@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/654
Reviewed-by: appleboy <appleboy.tw@gmail.com>
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: tobiasbp <tobiasbp@noreply.gitea.com>
Co-committed-by: tobiasbp <tobiasbp@noreply.gitea.com>
2024-05-03 17:37:08 +02:00
Bo-Yi Wu
f12d597965 feat(repo): support list of repo secrets (#660)
- Update comment to correctly describe `ListOrgActionSecretOption` as listing organization secrets instead of members
- Add new file `repo_action.go` with functionality to list a repository's secrets including the structure and API call

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

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/660
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>
2024-05-03 17:36:32 +02:00
appleboy
e9585a460d 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-05-03 17:34:26 +02:00
appleboy
54cf14f67a 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-05-03 17:30:19 +02:00
rjhaverkamp
62be687147 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-05-03 17:28:03 +02:00
6543
8942536a0b 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-05-03 17:27:14 +02:00
Martijn van der Kleijn
f4c493667c Make final corrections before fork is finalized (#3)
Reviewed-on: https://codeberg.org/mvdkleijn/forgejo-sdk/pulls/3
Co-authored-by: Martijn van der Kleijn <martijn.niji@gmail.com>
Co-committed-by: Martijn van der Kleijn <martijn.niji@gmail.com>
2024-05-03 14:54:54 +00:00
Martijn van der Kleijn
9bcec8a3b0 Correct module name
Signed-off-by: Martijn van der Kleijn <martijn.niji@gmail.com>
2024-05-03 16:35:47 +02:00
Martijn van der Kleijn
2e9e2fa7a3 feat: fork Gitea SDK (#1)
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>
2024-05-03 16:35:08 +02:00