feat: gitea client #1

Merged
schreifuchs merged 1 commits from feat/gitea into main 2026-02-13 09:30:02 +01:00
Owner
No description provided.
schreifuchs added 1 commit 2026-02-12 21:00:03 +01:00
schreifuchs reviewed 2026-02-12 21:41:10 +01:00
schreifuchs reviewed 2026-02-12 21:41:10 +01:00
schreifuchs reviewed 2026-02-12 21:41:10 +01:00
schreifuchs reviewed 2026-02-12 21:41:11 +01:00
schreifuchs force-pushed feat/gitea from 378d008a91 to 9bd7d363ba 2026-02-12 21:44:16 +01:00 Compare
schreifuchs force-pushed feat/gitea from 9bd7d363ba to db1ecd1e64 2026-02-12 21:53:15 +01:00 Compare
schreifuchs reviewed 2026-02-12 21:58:24 +01:00
schreifuchs reviewed 2026-02-12 21:58:24 +01:00
@@ -92,2 +116,2 @@
c.File, c.Line, c.Message, "---")
}
pierreService := pierre.New(ai, git)
pierreService.MakeReview(context.Background(), cfg.Repo.Owner, cfg.Repo.Repo, cfg.Repo.PRID)
Author
Owner

The error returned by 'MakeReview' is ignored. Always check return values from service methods to handle potential failures correctly and ensure the process exits with the correct status code.

The error returned by 'MakeReview' is ignored. Always check return values from service methods to handle potential failures correctly and ensure the process exits with the correct status code.
schreifuchs marked this conversation as resolved
schreifuchs reviewed 2026-02-12 21:58:24 +01:00
@@ -0,0 +10,4 @@
// Fetch Diff using positional args from shared RepoArgs
diff, err := s.git.GetDiff(organisation, repo, prID)
if err != nil {
log.Fatalf("Error fetching diff: %v", err)
Author
Owner

Service methods should return errors instead of calling 'log.Fatalf'. Terminating the process from within a service layer makes it difficult to test and prevents callers from performing cleanups.

Service methods should return errors instead of calling 'log.Fatalf'. Terminating the process from within a service layer makes it difficult to test and prevents callers from performing cleanups.
schreifuchs marked this conversation as resolved
schreifuchs reviewed 2026-02-12 21:58:25 +01:00
@@ -0,0 +14,4 @@
}
// Run Logic
comments, err := s.judgePR(context.Background(), diff)
Author
Owner

The 'ctx' parameter is ignored; 'context.Background()' is used instead. Use the provided context to ensure that cancellation signals and timeouts are properly propagated.

The 'ctx' parameter is ignored; 'context.Background()' is used instead. Use the provided context to ensure that cancellation signals and timeouts are properly propagated.
schreifuchs marked this conversation as resolved
schreifuchs reviewed 2026-02-12 21:58:25 +01:00
@@ -0,0 +16,4 @@
// Run Logic
comments, err := s.judgePR(context.Background(), diff)
if err != nil {
log.Fatalf("Error judging PR: %v", err)
Author
Owner

Return the error to the caller instead of using 'log.Fatalf'. Library and service code should not dictate process termination.

Return the error to the caller instead of using 'log.Fatalf'. Library and service code should not dictate process termination.
schreifuchs marked this conversation as resolved
schreifuchs force-pushed feat/gitea from db1ecd1e64 to 9d49d94eff 2026-02-12 22:08:17 +01:00 Compare
schreifuchs merged commit b67125024c into main 2026-02-13 09:30:02 +01:00
schreifuchs deleted branch feat/gitea 2026-02-13 09:30:03 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: schreifuchs/pierre-bot#1