Commit Graph

24 Commits

Author SHA1 Message Date
JimKarvo aafb820299 fix: correct docker-entrypoint.sh - replace base64-encoded content with actual shell script 2026-06-29 20:39:28 +00:00
JimKarvo 718569eda7 fix: restore events.go whitespace to canonical form 2026-06-29 20:24:48 +00:00
JimKarvo 72b50b88f2 fix: restore processor.go to correct EventHandler architecture (was slack.Client corruption) 2026-06-29 20:24:40 +00:00
JimKarvo c8b2dbe9dd fix: restore main.go to correct architecture (was urfave/cli corruption) 2026-06-29 20:24:18 +00:00
JimKarvo d33b1abd7e fix: rewrite main.go with raw Go source (was base64-corrupted) 2026-06-29 20:16:40 +00:00
JimKarvo e7d6abb942 fix: rewrite processor.go with raw Go source (was base64-corrupted) 2026-06-29 20:16:20 +00:00
JimKarvo a4af4f4f78 fix: rewrite cache.go with raw Go source (was base64-corrupted) 2026-06-29 20:15:13 +00:00
JimKarvo 357cecca84 fix: rewrite events.go with raw Go source (was base64-corrupted) 2026-06-29 20:14:47 +00:00
JimKarvo b706bc2338 fix: align docker-entrypoint.sh MANUAL_USER_MAPPINGS format with Go code
The entrypoint used jq to parse MANUAL_USER_MAPPINGS as JSON, but
ParseManualMappings() in Go uses "GiteaUsername:SlackID,GiteaUser2:SlackID2"
format. The mismatch caused "set -e" to kill the shell when jq failed
on non-JSON input, preventing the Go binary from ever starting.

Fix: replace jq JSON parsing with comma/colon splitting to match
the Go code's expected format.
2026-06-29 20:05:30 +00:00
JimKarvo 1ab139baa4 feat: support LOG_LEVEL env var for runtime log level config
Adds LOG_LEVEL env var support (debug/info/warn/error) that overrides
the --debug flag, enabling dynamic log level changes without rebuild.
2026-06-29 19:51:02 +00:00
JimKarvo 895b82096c fix: also check singular RequestedReviewer field for review_requested events
Gitea sends `requested_reviewer` (singular) field for `review_requested`
webhook actions, not always the `requested_reviewers` (plural/array).
The processor only checked the array form, so `usersToNotify` was always
empty and no notification was sent.

Also add more INFO-level logging for debugging the review_requested path.

Fixes: manual mappings worked but were never reached because the
processor never added the reviewer to the notification list.
2026-06-29 19:42:19 +00:00
JimKarvo 673cefeb90 fix: add MANUAL_USER_MAPPINGS support for users with mismatched emails
JimKarvo's Gitea email (dimitris@jksoftware.gr) differs from Slack
email (jimkarvo@gmail.com), so the email-based Slack lookup fails.
Add MANUAL_USER_MAPPINGS env var (format: GiteaUsername:SlackID,...)
to bypass email lookup when a manual mapping exists.

Changes:
- cache.go: ParseManualMappings() parses env var format
- cache.go: CachedResolver checks manual mappings first (step 0)
- main.go: reads MANUAL_USER_MAPPINGS env var, passes to resolver
2026-06-29 22:34:22 +03:00
JimKarvo 9e26698068 fix: use event.Reviewers instead of e.RequestedReviewer for review_requested 2026-06-29 18:54:59 +00:00
JimKarvo 8f08345bb2 chore: disable Renovate completely 2026-06-25 08:52:10 +00:00
JimKarvo 371b5f4304 chore: disable Renovate completely 2026-06-25 08:46:15 +00:00
JimKarvo 765fb04420 fix: use event.Reviewers instead of e.RequestedReviewer for review_requested
The review_requested case was reading e.RequestedReviewer (singular *GiteaUser),
but in some Gitea versions/webhook payloads this field is nil while the
reviewer data comes in requested_reviewers (plural array).
Now uses event.Reviewers from normalizePREvent, which handles both
PullRequest.RequestedReviewers and top-level requested_reviewers.
Keeps e.RequestedReviewer as a fallback for older Gitea versions.
2026-06-23 11:01:47 +00:00
JimKarvo c2c36b48eb Fix: use raw content (not base64) + single-line SQL for entrypoint 2026-06-22 10:31:52 +00:00
JimKarvo e818a8fb20 fix: create users table in entrypoint before seeding manual mappings 2026-06-22 10:21:54 +00:00
JimKarvo a1787b7b5d feat: seed manual user mappings from MANUAL_USER_MAPPINGS env var 2026-06-22 09:34:27 +00:00
JimKarvo c8056f8c47 fix: correct Dockerfile content (was base64-encoded) 2026-06-22 09:34:20 +00:00
JimKarvo 8438ebf48e feat: seed manual user mappings from MANUAL_USER_MAPPINGS env var 2026-06-22 09:32:54 +00:00
JimKarvo 1aefbae95e feat: add sqlite3 CLI + jq for manual user mappings 2026-06-22 09:32:44 +00:00
JimKarvo 6bf27aa40e Initial import with modified Dockerfile for env-based config generation 2026-06-22 11:56:10 +03:00
JimKarvo 28fa7537ac Initial commit 2026-06-22 08:55:54 +00:00