-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore: Project structure #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Caution Review failedThe pull request is closed. WalkthroughThis update refactors imports across the codebase to consolidate internal dependencies under the Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant GitHub as GitHub Actions
participant Repo as Repository
Dev->>GitHub: Push or PR (with/without "testing" label)
alt On PR with "testing" label
GitHub->>Repo: Run gofmt (dry-run)
alt Formatting changes detected
GitHub->>Repo: Auto-commit fixes to PR branch
else No changes
GitHub-->>Dev: No action
end
else On push to main
GitHub->>Repo: Run gofmt
alt Formatting changes detected
GitHub->>Repo: Create branch, commit fixes
GitHub->>Repo: Open PR with fixes
else No changes
GitHub-->>Dev: No action
end
end
sequenceDiagram
participant App as App
participant Sentry as Sentry
App->>Sentry: Initialize Sentry
App->>App: Run main logic
App->>Sentry: sentry.Flush (on shutdown)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @gocanto, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request focuses on a significant refactoring effort, extracting core application functionalities into a new, dedicated metal package. This change involves renaming the previous boost package and moving responsibilities such as application bootstrapping, environment variable handling, database connections, logging, and HTTP routing into this new, more appropriately named package. The goal is to improve the overall structure, maintainability, and organization of the codebase by centralizing related utilities and services.
Highlights
- Package Renaming: The existing
boostpackage has been entirely renamed tometalacross the codebase, including imports and references incli/main.go,database/seeder/main.go, andmain.go. - Core Logic Extraction: Core application bootstrapping logic, environment handling, database connection, logging, and Sentry initialization have been extracted and centralized into the newly created
metalpackage, promoting better modularity and separation of concerns. - Centralized Routing: HTTP route definitions for various API endpoints (e.g., profile, experience, posts, categories) are now centralized within
metal/router.go, providing a single, organized place for managing the application's routing. - New Test Coverage: New unit tests have been added in
metal/metal_test.goto ensure the correctness and stability of the functionalities provided by the extractedmetalpackage.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request successfully refactors the boost package into a new metal package. The changes are mostly moving files and renaming imports, which is a good step for code organization. My review focuses on the new metal package, where I've identified several areas for improvement. These include a critical bug in database connection handling, incorrect usage of Sentry, unhandled errors in environment configuration, and some Go anti-patterns. I've also suggested ways to improve test robustness and reduce code duplication in the router.
6217134 to
f68ca58
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🔭 Outside diff range comments (2)
database/seeder/seeds/factory.go (1)
31-33: Avoid panicking inside library-level seed helpersSeveral branches call
panic(err)when seeding fails. In non-CLI libraries this makes graceful error handling impossible and will crash the host process.
Consider bubbling the error up (or collecting errors and returning a single aggregated error) instead of panicking.Also applies to: 47-59, 77-93, 141-143, 159-161, 185-187, 211-213, 237-240, 267-269
metal/makefile/app.mk (1)
41-57: Potential conflict with duplicaterun-clitargets.There are two
run-clitargets defined - one in this file (lines 41-57) that requires database secrets and runs via Docker Compose, and another simpler one inmetal/makefile/cli.mk. This could lead to conflicts depending on the include order in the main Makefile.Consider renaming one of these targets to avoid conflicts:
- Keep the Docker-based one as
run-cli-docker- Keep the simple one as
run-cliOr ensure the include order in the main Makefile is such that the intended target takes precedence.
♻️ Duplicate comments (1)
.github/workflows/gofmt.yml (1)
12-12: Verify Go version availability.Same concern as in tests.yml - Go version 1.24.5 seems unusually high. Please verify this version exists and is intended.
🧹 Nitpick comments (4)
database/truncate.go (1)
36-36: Fix typo in success message.Minor typo: "sucessfully" should be "successfully".
- fmt.Println(fmt.Sprintf("Table [%s] sucessfully truncated.", tables[i])) + fmt.Println(fmt.Sprintf("Table [%s] successfully truncated.", tables[i]))pkg/sentry.go (1)
5-5: LGTM! Import path update is consistent.The import path update follows the same pattern as other files in this refactoring. However, note that the AI summary mentions Sentry integration analysis showing it's not effectively used for error capturing - consider addressing this in a follow-up.
sentry_analysis.md (1)
7-7: Fix markdown formatting issues for better consistency.Address these style improvements:
- Remove trailing colons from headings (lines 7 and 12) per markdown best practices
- Consider rewording line 16 to avoid repetitive sentence beginnings
-### What's Present: +### What's Present -### Critical Issues: +### Critical Issues -4. **No Panic Recovery**: Panics are used throughout the codebase but not captured by Sentry. +4. **No Panic Recovery**: The codebase uses panics throughout but doesn't capture them with Sentry.Also applies to: 12-12, 16-16
metal/kernel/kernel_test.go (1)
263-267: Consider cross-platform compatibility for temporary directory creation.The hard-coded
/tmppath may not work on Windows systems. Consider usingos.TempDir()for better cross-platform support while still maintaining deterministic paths.-func getLowerTempDir(t *testing.T) string { - // Create a temporary directory in /tmp which should be lowercase - return "/tmp/testlogs" + strings.ToLower(strings.ReplaceAll(t.Name(), "/", "_")) -} +func getLowerTempDir(t *testing.T) string { + // Create a temporary directory that works cross-platform + return filepath.Join(os.TempDir(), "testlogs"+strings.ToLower(strings.ReplaceAll(t.Name(), "/", "_"))) +}You'll need to import
path/filepathfor this change.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (38)
.github/workflows/gofmt.yml(1 hunks).github/workflows/tests.yml(3 hunks).gitignore(1 hunks)Makefile(2 hunks)database/connection.go(2 hunks)database/connection_test.go(1 hunks)database/repository/repository_test.go(1 hunks)database/repository/users.go(1 hunks)database/seeder/main.go(1 hunks)database/seeder/seeds/factory.go(1 hunks)database/seeder/seeds/seeder_test.go(1 hunks)database/truncate.go(1 hunks)go.mod(1 hunks)handler/tests/db.go(1 hunks)main.go(2 hunks)metal/cli/accounts/factory.go(1 hunks)metal/cli/accounts/factory_test.go(1 hunks)metal/cli/accounts/handler_test.go(1 hunks)metal/cli/clitest/helpers.go(1 hunks)metal/cli/main.go(2 hunks)metal/cli/panel/menu.go(1 hunks)metal/cli/posts/handler_test.go(1 hunks)metal/kernel/app.go(1 hunks)metal/kernel/factory.go(2 hunks)metal/kernel/helpers.go(2 hunks)metal/kernel/ignite.go(1 hunks)metal/kernel/kernel_test.go(4 hunks)metal/kernel/router.go(2 hunks)metal/makefile/app.mk(2 hunks)metal/makefile/cli.mk(1 hunks)pkg/http/handler.go(1 hunks)pkg/http/middleware/pipeline.go(1 hunks)pkg/llogs/files_logs.go(2 hunks)pkg/llogs/files_logs_test.go(1 hunks)pkg/media/media_test.go(1 hunks)pkg/sentry.go(1 hunks)pkg/validator.go(2 hunks)sentry_analysis.md(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (6)
metal/kernel/helpers.go (4)
metal/kernel/app.go (1)
App(16-23)boost/helpers.go (2)
a(22-29)a(13-20)pkg/llogs/driver.go (1)
Close(3-5)boost/boost_test.go (1)
TestCloseLogs(251-268)
pkg/validator.go (1)
pkg/validator_test.go (2)
TestValidator_PassesAndRejects(11-43)
metal/kernel/app.go (4)
metal/kernel/router.go (1)
Router(24-29)pkg/sentry.go (1)
Sentry(8-12)pkg/llogs/driver.go (1)
Driver(3-5)env/env.go (1)
App(9-15)
pkg/llogs/files_logs.go (2)
boost/boost_test.go (1)
TestMakeLogs(180-203)cli/clitest/helpers.go (1)
MakeTestEnv(78-80)
database/connection_test.go (3)
env/env_test.go (3)
TestGetSecretOrEnv_Env(33-41)TestGetEnvVar(9-15)TestAppEnvironmentChecks(43-67)boost/boost_test.go (2)
TestMakeEnv(39-47)validEnvVars(19-37)cli/clitest/helpers.go (1)
MakeTestEnv(78-80)
metal/makefile/cli.mk (1)
cli/main.go (1)
main(26-86)
🪛 LanguageTool
sentry_analysis.md
[style] ~16-~16: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...context is added to Sentry events. 4. No Panic Recovery: Panics are used throu...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
🪛 markdownlint-cli2 (0.17.2)
sentry_analysis.md
7-7: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
12-12: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
🔇 Additional comments (59)
go.mod (1)
3-3: Go version directive is valid.Go 1.24.5 is a legitimate patch release in the 1.24 series (with 1.24.6 released on August 6, 2025). This update is correct and safe—no further changes are needed.
pkg/media/media_test.go (1)
97-112: LGTM! Improved test reliability.The test now explicitly verifies the storage directory path using the current working directory, which provides more precise and deterministic validation compared to the previous implementation. The error handling for
os.Getwd()and use offilepath.Joinalso improve cross-platform compatibility.handler/tests/db.go (1)
11-11: LGTM! Import path updated correctly.The import path has been correctly updated from
"github.com/oullin/env"to"github.com/oullin/metal/env"as part of the project structure refactoring.database/truncate.go (1)
6-6: LGTM! Import path updated correctly.The import path has been correctly updated from
"github.com/oullin/env"to"github.com/oullin/metal/env"as part of the project structure refactoring.metal/cli/panel/menu.go (1)
6-6: No residual legacy imports detectedAll occurrences of
github.com/oullin/cliandgithub.com/oullin/envhave been removed from source files,go.mod, andgo.sum. No further action is needed.metal/cli/accounts/handler_test.go (1)
7-7: Import path update LGTMThe test now pulls
clitestfrom the reorganisedmetalmodule, which keeps the test suite consistent with the new project layout.database/connection_test.go (1)
14-14: Env package path aligned with new module – looks goodThe swap to
github.com/oullin/metal/envmatches the broader refactor and should compile cleanly oncego.modis tidied.metal/cli/clitest/helpers.go (1)
11-11: Helpers now reference the correctenvpackageNo functional impact; confirms test helpers compile under the new package hierarchy.
database/seeder/seeds/seeder_test.go (1)
13-13: Seeder tests updated to newenvpathConsistent with the rest of the migration; nothing further required.
database/seeder/seeds/factory.go (1)
3-9: Confirmenvmodule path update is fully propagatedSwitching the import to
github.com/oullin/metal/envlooks correct, but please rungo mod tidy && go test ./...to be sure all downstream references compile cleanly and the new module path exists ingo.mod.metal/cli/accounts/factory.go (1)
3-9: Import path rename—double-checkgo.modreplace directiveThe new path
github.com/oullin/metal/envmust be declared ingo.mod. If this repo is a multi-module workspace, remember to add the correspondingreplace(or update all consumers) to prevent version drift.pkg/llogs/files_logs_test.go (1)
3-8: LGTM – test import updatedThe import path change aligns with the project restructure and should be transparent to test behavior.
metal/cli/posts/handler_test.go (1)
11-15: Updatedclitestpath – rungo test ./metal/cli/...Compilation should succeed once all sub-packages are on the new
metal/clipath. Running the CLI test suite will quickly reveal any lingering old imports.database/repository/users.go (1)
3-6: Module path updated; verify cross-package type compatibilityEnsure the
env.Environmenttype exported bygithub.com/oullin/metal/envis identical to the one previously consumed, otherwise subtle mismatches (e.g., different struct tags) may break JSON/env loading.metal/cli/accounts/factory_test.go (1)
4-4: LGTM! Import path update aligns with package restructuring.The import path update from
"github.com/oullin/cli/clitest"to"github.com/oullin/metal/cli/clitest"is consistent with the broader package reorganization under themetalnamespace.database/repository/repository_test.go (1)
15-15: LGTM! Import path update aligns with package restructuring.The import path update from
"github.com/oullin/env"to"github.com/oullin/metal/env"is consistent with the broader package reorganization under themetalnamespace.metal/kernel/ignite.go (2)
1-1: Package rename fromboosttokernellooks appropriate.The package rename better reflects the bootstrapping/initialization nature of this code.
5-5: Import path update verified — no remainingboostreferences
I’ve checked the entire codebase and found no occurrences ofgithub.com/oullin/boostorboost.in Go files. All imports have been successfully migrated to themetalnamespace.metal/makefile/cli.mk (1)
1-4: LGTM! Clean and simple makefile target for running the CLI.The
run-clitarget is well-structured with proper.PHONYdeclaration and correctly navigates to the CLI directory before execution.metal/makefile/app.mk (2)
1-1: LGTM! Addedtest-allto .PHONY declaration.Good practice to declare the new target as phony.
59-60: LGTM! Clean and standard test-all target.The
test-alltarget usinggo test ./...is the idiomatic way to run all tests recursively across the project.pkg/http/handler.go (1)
12-12: LGTM! Excellent structured logging improvement.The change from format string logging to structured logging with key-value pairs is a best practice that improves log parsing and observability.
pkg/http/middleware/pipeline.go (1)
5-5: LGTM! Import path update aligns with project restructuring.The import path update from
github.com/oullin/envtogithub.com/oullin/metal/envis consistent with the project structure refactoring objectives.database/connection.go (2)
6-6: LGTM! Import path update is consistent.
52-69: Excellent structured logging improvements!The conversion from
fmt.Printlnto structuredslogcalls with key-value pairs is a significant improvement for observability and log parsing. Each log entry now includes meaningful context:
- Error details with structured error information
- Database driver type information
- Database statistics for health monitoring
- Clear separation markers for readability
pkg/validator.go (2)
9-10: LGTM! Import formatting improvement.
90-90: Good consistency fix in error message.The change from "Field" to "field" makes the error message consistent with other validation error messages in the same method, and removes the extra space for better formatting.
metal/kernel/app.go (3)
1-1: LGTM: Package restructuring is consistent.The package name change from
boosttokernelaligns with the project-wide refactoring to consolidate code under themetalnamespace.
9-9: Import path consistency confirmed
No remaining references togithub.com/oullin/envwere found across the codebase—all imports have been updated togithub.com/oullin/metal/env.
19-19: Logs field type change is consistent across the codebase.
- In metal/kernel/factory.go, MakeLogs returns an llogs.Driver interface backed by a FilesLogs value.
- The App struct’s logs field is declared as llogs.Driver, matching the factory signature.
- Tests in metal/kernel/kernel_test.go assert driver.(llogs.FilesLogs) (a value type), and database/seeder/main.go calls logs.Close() on the interface.
No pointer-vs-value mismatches were found. All usages align with the interface return type—no changes needed.
metal/cli/main.go (2)
6-10: LGTM: Import path updates are consistent with project restructuring.The import paths have been correctly updated to use the new
metalnamespace structure.
23-23: LGTM: Function call updated consistently.The function call changed from
boost.MakeDbConnectiontokernel.MakeDbConnection, which is consistent with the package restructuring.pkg/llogs/files_logs.go (1)
5-5: LGTM: Import path update is consistent.The import path update from
github.com/oullin/envtogithub.com/oullin/metal/envaligns with the project-wide restructuring.metal/kernel/helpers.go (4)
1-1: LGTM: Package restructuring is consistent.The package name change from
boosttokernelaligns with the project-wide refactoring.
7-7: LGTM: Import path update is consistent.The import path update to
github.com/oullin/metal/envis consistent with the project restructuring.
19-19: LGTM: Method simplification aligns with type changes.The direct call to
a.logs.Close()is consistent with the type change from*llogs.Drivertollogs.Driverin the App struct. This simplification removes unnecessary pointer dereferencing.
27-27: LGTM: Method simplification is consistent.The direct call to
a.db.Close()removes unnecessary intermediate variable assignment and maintains consistency with the logging method changes.main.go (5)
5-5: LGTM: New imports support Sentry flush functionality.The addition of
sentry-goandtimeimports supports the new deferred Sentry flush call, which is good practice for ensuring events are sent before application shutdown.Also applies to: 12-12
7-7: LGTM: Import path update is consistent with restructuring.The import path change from
github.com/oullin/boosttogithub.com/oullin/metal/kernelaligns with the project-wide package restructuring.
15-15: LGTM: Global variable type updated consistently.The type change from
*boost.Appto*kernel.Appis consistent with the package restructuring and import changes.
19-20: LGTM: Function calls updated consistently.The function calls have been correctly updated from
boost.Igniteandboost.MakeApptokernel.Igniteandkernel.MakeApp, maintaining the same parameters and error handling.
32-32: LGTM: Sentry flush ensures proper event delivery.The deferred
sentry.Flush(2 * time.Second)call is good practice as it ensures any buffered Sentry events are sent before the application exits. The 2-second timeout provides reasonable time for event delivery without blocking shutdown indefinitely.Makefile (1)
57-59: LGTM! Help text formatting is consistent.The new help entries for
run-cli,run-main, andtest-allfollow the established formatting pattern and provide clear descriptions..github/workflows/tests.yml (2)
11-13: LGTM! Improved workflow trigger conditions.The conditional logic properly handles both push events and PR events, excluding drafts unless specifically labeled for testing. This provides better control over when tests run.
44-47: All test directories verified
The following directories exist and contain Go test files as expected:
metal/kernel: 1 test filemetal/env: 1 test filemetal/cli: 5 test filesThe workflow’s test commands can run against these paths without issue.
metal/kernel/factory.go (3)
58-61: LGTM! Improved error handling.The addition of explicit error checking for
strconv.Atoiprevents silent failures and provides clear error messages whenENV_DB_PORTcontains invalid values.
15-33: Sentry flush is properly handled in main.goA deferred call to
sentry.Flush(2 * time.Second)exists inmain.go, ensuring events are sent on shutdown. No further changes are needed here.
45-52: Safe to merge: MakeLogs return‐type change verifiedI searched all call sites of
MakeLogs(env)—in metal/kernel/app.go, metal/kernel/kernel_test.go, and database/seeder/main.go—and found no pointer dereferences or type assertions to*llogs.FilesLogs. Every caller now treats the result as thellogs.Driverinterface, so this breaking change is fully adopted.Please also confirm that removing the explicit Sentry flush call won’t drop events: ensure your Sentry driver’s shutdown logic (e.g., its
Close()method) still flushes any pending events before exit.database/seeder/main.go (1)
1-30: LGTM! Consistent package refactoring.The import updates and function call changes are consistent with the package restructuring from
boosttometal/kernel. The simplified log closing (logs.Close()instead of(*logs).Close()) correctly reflects the return type change inMakeLogs..github/workflows/gofmt.yml (1)
18-42: LGTM! Improved workflow configuration.The enhancements include:
- Better checkout configuration with head ref and full history
- Explicit write permissions
- More detailed git-auto-commit-action configuration
- Upgraded action version for better reliability
These changes improve the workflow's reliability and clarity.
sentry_analysis.md (1)
1-37: Excellent comprehensive analysis of Sentry implementation status.This document provides valuable insight into the current Sentry integration gaps and offers actionable recommendations for proper error monitoring implementation. The structured approach clearly separating what's present, critical issues, and recommendations makes it easy to understand the current state and next steps.
metal/kernel/kernel_test.go (4)
179-205: LGTM! Improved test reliability with deterministic directory handling.The explicit directory creation with
os.MkdirAlland deferred cleanup withos.RemoveAllprovides better control over test environment setup. The variable name changes (d→driver) also improve code readability.
223-248: LGTM! Consistent directory handling pattern.Good use of the same directory handling pattern as in
TestMakeLogs, ensuring consistency across test functions.
269-290: LGTM! Better variable naming and consistent directory handling.The change from
ltologsmakes the variable purpose clearer, and the directory handling follows the established pattern from other test functions.
1-1: LGTM! Package rename aligns with project restructuring.The package name change from
boosttokernelis consistent with the broader refactoring to consolidate components under themetalnamespace.metal/kernel/router.go (4)
1-12: LGTM! Clean import organization and consistent package restructuring.The package rename to
kerneland import path update togithub.com/oullin/metal/envalign with the project restructuring. ThebaseHttpalias effectively distinguishes between the standard library and custom HTTP packages.
14-16: LGTM! Well-designed interface for static route abstraction.The
StaticRouteResourceinterface provides a clean abstraction that enables the generic helper function while maintaining consistency with existing API patterns.
18-22: Excellent use of generics to eliminate code duplication!The
addStaticRoutehelper function effectively consolidates the repetitive pattern of handler creation, pipeline wrapping, and route registration. The generic type constraint ensures type safety while supporting different handler implementations.
65-91: Outstanding refactoring! Dramatic reduction in code duplication.The transformation of all static route methods to use the
addStaticRoutehelper is exemplary. Each method is now concise and focused on configuration rather than implementation details, significantly improving maintainability while preserving functionality.
e48971a to
a2a13e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (1)
.github/workflows/gofmt.yml (1)
57-84: Edge-case: branch name collisions
BRANCH_NAME="gofmt-fixes-$(date +%Y%m%d-%H%M%S)"can still collide if the job runs multiple times within the same second (e.g., force-pushed commits). Consider appending-${{ github.run_id }}or the short SHA to make collisions impossible.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
.github/workflows/gofmt.yml(1 hunks).gitignore(1 hunks)Makefile(2 hunks)main.go(2 hunks)metal/cli/accounts/handler_test.go(1 hunks)metal/cli/main.go(2 hunks)metal/cli/posts/handler_test.go(1 hunks)metal/makefile/app.mk(2 hunks)pkg/llogs/files_logs.go(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (8)
- metal/cli/posts/handler_test.go
- metal/cli/accounts/handler_test.go
- metal/cli/main.go
- .gitignore
- Makefile
- pkg/llogs/files_logs.go
- metal/makefile/app.mk
- main.go
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/gofmt.yml
87-87: the runner of "peter-evans/create-pull-request@v5" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (1)
.github/workflows/gofmt.yml (1)
44-56: Potential missing secret –GUS_GH_EMAIL
The commit step hard-depends on theGUS_GH_EMAILsecret. A missing or miss-spelled secret will abort the action with “Environment secret not defined”:commit_user_email: ${{ secrets.GUS_GH_EMAIL }}Verify that the secret is present in the repository/org settings or fall back to the default
github.actor@users.noreply.github.com.
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Documentation
Style
Chores