Open sweep-ai[bot] opened 2 weeks ago
[!IMPORTANT]
Review skipped
Bot user detected.
To trigger a single review, invoke the
@coderabbitai review
command.You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
This pull request was created by Sweep to resolve the following request by @harperreed:
Continue chatting at https://sweep-chat-demo.vercel.app/c/0a69ea4c-7b1b-432b-8d2d-83af2a445ce3.
Purpose
This pull request implements a Micropub service that allows creating, updating, and deleting blog posts using a Git-based content management system.
Description
The changes in this pull request include:
GitOperations
interface to provide functionality for managing blog posts in a Git repository.GitOperations
interface in theDefaultGitOperations
struct.GitOperations
interface in theMockGitOperations
struct for testing purposes.CreatePost
,UpdatePost
, andDeletePost
methods in theDefaultGitOperations
struct to handle the corresponding Micropub operations.CreatePost
,UpdatePost
, andDeletePost
methods in theoperations_test.go
file.sanitizeFilename
function to ensure that the generated filenames are valid and consistent.Summary
The key changes in this pull request are:
internal/git/mock_git.go
: Implements a mockGitOperations
interface for testing.internal/git/operations.go
: Implements theGitOperations
interface for managing blog posts in a Git repository.internal/git/operations_test.go
: Adds unit tests for theGitOperations
implementation.