feat: gitea client #1
Reference in New Issue
Block a user
Delete Branch "feat/gitea"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
378d008a91to9bd7d363ba9bd7d363batodb1ecd1e64@@ -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)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.
@@ -0,0 +10,4 @@// Fetch Diff using positional args from shared RepoArgsdiff, err := s.git.GetDiff(organisation, repo, prID)if err != nil {log.Fatalf("Error fetching diff: %v", err)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.
@@ -0,0 +14,4 @@}// Run Logiccomments, err := s.judgePR(context.Background(), diff)The 'ctx' parameter is ignored; 'context.Background()' is used instead. Use the provided context to ensure that cancellation signals and timeouts are properly propagated.
@@ -0,0 +16,4 @@// Run Logiccomments, err := s.judgePR(context.Background(), diff)if err != nil {log.Fatalf("Error judging PR: %v", err)Return the error to the caller instead of using 'log.Fatalf'. Library and service code should not dictate process termination.
db1ecd1e64to9d49d94eff