Commit Graph

149 Commits

Author SHA1 Message Date
238df92888 Untangle Spike architecture with bridge pattern
Split the monolithic gitea/helpers.ts (which had Discord imports and created circular dependencies) into three focused libs:

1. **gitea/** — Pure API client: fetchPR, fetchReviewComments, convertUsername, threadName. No side effects or external deps.

2. **discord/** — Discord client setup: bot login, event listeners, slash commands. Now isolated from Gitea internals.

3. **bridge/** — New integration layer: webhook handler, DB mappings (Gitea PR ↔ Discord thread), Discord helpers, and createPRComment.

Dependencies now flow one direction: bridge → gitea and bridge → discord. No circular imports.

Added:
- Barrel exports (index.ts) for each lib with public API
- README.md for each lib documenting the barrel exports
- Comprehensive spike README.md with setup guide and architecture explanation
- Integration tests for webhooks (callback-based, no race conditions)
- Unit tests for pure API functions
- CLAUDE.md with links to each lib's README

This architecture makes it possible for AI to understand a lib by reading just its README, keeping context focused and small.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-09 15:23:11 -07:00
bb401f8252 Update README.md
Some checks failed
CI / test (push) Has been cancelled
2025-12-03 11:20:16 -08:00
78c0dcf2e5 Merge pull request 'Discord has a max message length of 2000, keep the PR title below that!' (#7) from max-message-length into main
Some checks are pending
CI / test (push) Waiting to run
Reviewed-on: #7
2025-12-03 18:55:32 +00:00
e46fb0dd7a Discord has a max message length of 2000, keep the PR title below that!
Some checks failed
CI / test (pull_request) Has been cancelled
2025-12-03 10:51:54 -08:00
d169c19e8a Merge pull request 'Good enough gitea/discord integration' (#6) from review-comments into main
Some checks failed
CI / test (push) Has been cancelled
Reviewed-on: #6
2025-11-13 22:55:24 +00:00
9e7eb70b4f better
Some checks failed
CI / test (pull_request) Has been cancelled
2025-11-13 14:53:34 -08:00
f156e91bcd this is good enough
Some checks are pending
CI / test (push) Waiting to run
2025-11-13 10:59:49 -08:00
e2feb9cc1a great 2025-11-12 17:13:25 -08:00
34de1f8e40 Much better 2025-11-12 16:38:33 -08:00
fd939af0b7 This is much better
Some checks are pending
CI / test (push) Waiting to run
2025-11-12 11:49:10 -08:00
1bd8ecba7a Update webhook-handler.ts
Some checks are pending
CI / test (push) Waiting to run
2025-11-12 10:03:43 -08:00
726961ca99 let me cook
Some checks are pending
CI / test (push) Waiting to run
2025-11-12 09:55:23 -08:00
c85c61ed95 Update defunkt's name
Some checks failed
CI / test (push) Has been cancelled
2025-11-07 15:43:03 -08:00
c2cf89f1d2 Only one proc needed
Some checks are pending
CI / test (push) Waiting to run
2025-11-07 15:29:27 -08:00
f404f7c99b add logs 2025-11-07 15:07:24 -08:00
bff5aa05f5 spike, you are alive
Some checks failed
CI / test (push) Waiting to run
CI / test (pull_request) Has been cancelled
2025-11-07 14:58:20 -08:00
59d51c4be4 cool dude 2025-11-07 14:40:11 -08:00
a41e086d76 yes
Some checks failed
CI / test (pull_request) Has been cancelled
2025-11-07 10:31:37 -08:00
883c69d517 get that subdomain
Some checks are pending
CI / test (push) Waiting to run
2025-11-07 09:52:53 -08:00
bdf6a288b1 try it out!
Some checks are pending
CI / test (push) Waiting to run
2025-11-07 09:39:57 -08:00
142d9ddf9b no more
Some checks are pending
CI / test (push) Waiting to run
2025-10-07 19:26:16 -07:00
e5904927eb don't break on lowercase readmes 2025-09-25 21:15:53 -07:00
e4b0ebc3e1 apps 2025-09-23 19:03:37 -07:00
Chris Wanstrath
3fc9bfad4a sneaker wip 2025-09-23 17:55:41 -07:00
8f8c70e10e fixed runner 2025-09-19 17:35:22 -07:00
329550f44a arg completer 2025-09-19 17:32:19 -07:00
Chris Wanstrath
881ed132c0 ignore local sqlite file 2025-09-08 14:05:12 -07:00
Chris Wanstrath
5d7f27e296 nose-bbs 2025-09-08 13:49:14 -07:00
f20e280b19 REMEMBER US FOR A YEAR! 2025-08-13 09:39:31 -07:00
Chris Wanstrath
c6977cd760 github api 2025-07-30 13:30:04 -07:00
Chris Wanstrath
eac2e4e009 truisms 2025-07-28 18:00:39 -07:00
Chris Wanstrath
a85ce30c2d TODO 2025-07-28 16:03:55 -07:00
Chris Wanstrath
65f3cbb74f full project metadata in json 2025-07-28 12:59:35 -07:00
Chris Wanstrath
d8f34197c4 big 2025-07-28 12:53:43 -07:00
Chris Wanstrath
f882b535d6 futuristic css (not really) 2025-07-28 11:36:48 -07:00
Chris Wanstrath
14d983974b index cards 2025-07-28 11:33:37 -07:00
Chris Wanstrath
3159b3c160 shhh 2025-07-28 11:26:45 -07:00
Chris Wanstrath
8df0c3d80b use DATA_DIR 2025-07-28 11:24:18 -07:00
Chris Wanstrath
ae6d191b91 project urls 2025-07-28 11:21:48 -07:00
Chris Wanstrath
ed7e1349b5 activity 2025-07-28 10:41:45 -07:00
Chris Wanstrath
6ac231ce36 api 2025-07-28 10:06:54 -07:00
Chris Wanstrath
11b693c5cb jazz it up 2025-07-28 09:57:29 -07:00
Chris Wanstrath
2613e241fa move things around 2025-07-28 09:54:31 -07:00
4d7041f2b1 better docs 2025-07-25 14:39:14 -07:00
3abadc3b51 Clean up 2025-07-25 14:31:11 -07:00
e7b334a72b Merge branch 'main' of https://github.com/probablycorey/the-workshop 2025-07-25 14:15:25 -07:00
3742a016aa Added cron 2025-07-25 14:15:23 -07:00
Chris Wanstrath
389578803d RIP attache 2025-07-25 10:18:31 -07:00
0e058001ac Create ci.yml 2025-07-22 16:41:56 -07:00
1429889f6f Better naming 2025-07-22 16:29:30 -07:00