Skip to content

feat: add dry-run param - #29

Merged
cristianmessel-cs merged 3 commits into
mainfrom
feat/add-dry-run-param
Sep 23, 2026
Merged

cristianmessel-cs merged 3 commits into
mainfrom
feat/add-dry-run-param

Conversation

@cristianmessel-cs

Copy link
Copy Markdown
Contributor

No description provided.

@cristianmessel-cs

Copy link
Copy Markdown
Contributor Author
 ## Code Review

 **internal/review/pipeline.go:139**
 Consider avoiding a direct `fmt.Println` dependency here. Since `Pipeline` already takes a `logger`, it might be cleaner (and more testable) to inject an `io.Writer` for dry-run output via `Options`/the constructor, so tests can capture and assert on the printed content instead of relying on actual
 stdout. This also decouples the pipeline from a global process stream.

 **internal/review/pipeline.go:141**
 Returning immediately after printing the dry-run output means any code that normally runs after `PublishComment` succeeds (if present later in this function) will be skipped in dry-run mode. Worth double-checking there's no post-publish side effect (metrics, status updates, etc.) that should still execute
 even when not actually posting a comment.

 **internal/review/pipeline.go:30**
 This PR introduces branching pipeline behavior (`dryRun`) but doesn't add a test covering it. Consider adding a test that runs the pipeline with `DryRun: true` and asserts `PublishComment` is never invoked on the SCM client mock, to guard against regressions.

@cristianmessel-cs
cristianmessel-cs marked this pull request as ready for review September 23, 2026 12:42
@cristianmessel-cs
cristianmessel-cs merged commit b6d17f3 into main Sep 23, 2026
1 check passed
@cristianmessel-cs
cristianmessel-cs deleted the feat/add-dry-run-param branch September 23, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants