Commit Graph

50 Commits

Author SHA1 Message Date
Derrick Hammer 41b25abaaf
fix: use installation_id not app_id 2024-02-12 01:02:09 -05:00
Derrick Hammer 1c1f78559d
fix: need to subclass StandardClaims to make Issuer any 2024-02-12 01:01:58 -05:00
Derrick Hammer 608cfad501
fix: string/number hacks 2024-02-12 00:47:29 -05:00
Derrick Hammer 669a6eaf6d
fix: need to cast appId as string,then parse to int 2024-02-12 00:43:04 -05:00
Derrick Hammer 846e5df758
fix: put under the /api/v3 route space 2024-02-12 00:40:35 -05:00
Derrick Hammer 3565331a58
fix: need to trim upper and lower case 2024-02-12 00:40:09 -05:00
Derrick Hammer fb752f1f3a
feat: add routes for app install tokens 2024-02-12 00:33:56 -05:00
Derrick Hammer 346849cc8c
refactor: ensure only a given install can access its access tokens with the app-install-get-access-token route 2024-02-12 00:18:52 -05:00
Derrick Hammer d962eb5304
refactor: put api under both /api and /api/v3 2024-02-12 00:01:22 -05:00
Derrick Hammer 41532495bc
feat: implement github jwt verification via middleware 2024-02-11 23:55:02 -05:00
Derrick Hammer d83df43411
fix: encoding wrong version 2024-02-11 23:25:43 -05:00
Derrick Hammer e907aa7e99
fix: must use json marshal to convert to bytes, then unmarshal to a map 2024-02-11 23:23:32 -05:00
Derrick Hammer ae9b036cb5
fix: need to convert struct to a map to inject installation id 2024-02-11 23:07:14 -05:00
Derrick Hammer d5ac5e4b3c
fix: needs to be a pointer receiver 2024-02-11 22:37:32 -05:00
Derrick Hammer e7bfd0c6c9
fix: ensure o.refresher can never be nil 2024-02-11 22:33:08 -05:00
Derrick Hammer a439ca8002
fix: only run keep alive if loading token is a success 2024-02-11 22:32:22 -05:00
Derrick Hammer 4faa7c9b88
fix: bad url 2024-02-11 16:37:13 -05:00
Derrick Hammer 8dd6e83fae
refactor: make config stateful 2024-02-11 16:33:56 -05:00
Derrick Hammer bbe7e8e053
refactor: run config in a lifecycle 2024-02-11 16:32:19 -05:00
Derrick Hammer 34898771ab
refactor: make oauth DI managed 2024-02-11 16:30:03 -05:00
Derrick Hammer 6d20106bb5
refactor: viper can't save a struct, got to do it ourselves 2024-02-11 16:27:24 -05:00
Derrick Hammer 0cf1b8827a
refactor: just try to parse and check expire without verification 2024-02-11 16:26:54 -05:00
Derrick Hammer 4b429e6d59
refactor: use our exchange 2024-02-11 15:00:13 -05:00
Derrick Hammer 055f502114
chore: RouterParams not needed 2024-02-11 14:59:07 -05:00
Derrick Hammer 150c5c6cb2
feat: add token monitoring and refresh 2024-02-11 14:58:04 -05:00
Derrick Hammer 5036d0bca4
feat: add SaveConfig 2024-02-11 14:50:53 -05:00
Derrick Hammer 0365862777
feat: initial rest api support with /repos/{owner}/{repo}/pulls/{pull_number}/files 2024-02-11 14:17:19 -05:00
Derrick Hammer ea4e4aa00a
fix: support both auth token and oauth token 2024-02-11 14:12:48 -05:00
Derrick Hammer 8abe1e7981
feat: add convertCommitFile 2024-02-11 14:03:03 -05:00
Derrick Hammer 0c78013f38
fix: Owner missing from convertRepo 2024-02-11 06:32:38 -05:00
Derrick Hammer e95732d479
fix: need to prefix with pull_request. 2024-02-11 06:25:50 -05:00
Derrick Hammer 12c71a26bf
fix: use Header.Set 2024-02-11 06:20:18 -05:00
Derrick Hammer 8167255a0a
fix: we need to encode the new version, not the original 2024-02-11 05:38:36 -05:00
Derrick Hammer 865c639557
fix: add toNormalizedJson to match github output 2024-02-11 05:35:15 -05:00
Derrick Hammer 300b074f86
fix: skip a nil label 2024-02-11 05:23:51 -05:00
Derrick Hammer bf74d45404
fix: if RequestedReviewers or Labels are empty, add dummy nil 2024-02-11 05:22:35 -05:00
Derrick Hammer 7cfcbad86d
fix: add missing data in PullRequestEvent 2024-02-11 05:08:41 -05:00
Derrick Hammer e1d8e122ce
feat: add convertLabel 2024-02-11 04:56:30 -05:00
Derrick Hammer 4afb7eb108
refactor: add nil checks on all converts 2024-02-11 04:50:01 -05:00
Derrick Hammer 0093a15645
fix: add missing convertChanges 2024-02-11 04:47:58 -05:00
Derrick Hammer d97dd79e59
refactor: move convert functions to dedicated file, create convertPullRequestEvent and translatePrAction 2024-02-11 04:42:11 -05:00
Derrick Hammer 64319ee7d0
fix: add missing call to webhook manager 2024-02-11 04:42:10 -05:00
Derrick Hammer 90fbbf94e1
refactor: verifyWebhookDataMiddleware just need to store the wehbook data in context 2024-02-11 04:25:52 -05:00
Derrick Hammer 36a661bd71
feat: add webhooks manager and switch to using dedicated pull_request webhook endpoint. Also add iniyial pull_request support 2024-02-11 04:03:00 -05:00
Derrick Hammer 9262bb0555
feat: initial dummy webhook support. use gitea VerifyWebhookSignatureMiddleware instead. 2024-02-11 04:01:35 -05:00
Derrick Hammer 26f497f062
fix: missing embedding fx.In 2024-02-11 04:01:34 -05:00
Derrick Hammer e8af456476
feat: add middleware to verify gitea webhooks 2024-02-11 04:01:34 -05:00
Derrick Hammer 5ac86cc75c
refactor: split route setup to each set of routes 2024-02-11 04:01:34 -05:00
Derrick Hammer 4456b54550
feat: server bones and initial github apps setup support 2024-02-11 04:01:27 -05:00
Derrick Hammer 99727e8614 Initial commit 2024-02-10 00:08:50 +00:00