-
Notifications
You must be signed in to change notification settings - Fork 0
Renamed files to kebab-case - core - services - part 2 #31
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
base: coderabbit_combined_20260121_augment_sentry_coderabbit_1_base_renamed_files_to_kebab-case_-_core_-_services__-_part_2_pr224
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request systematically refactors file naming conventions across the codebase, updating import paths from PascalCase/UpperCamelCase filenames to kebab-case and lowercase formats. Import statements in services, endpoints, repositories, tests, and utilities are modified accordingly. No runtime logic, control flow, or behavioral changes are introduced. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~20 minutes This refactoring consists of systematic, homogeneous import path normalization across 100+ files following an identical pattern (PascalCase/UpperCamelCase → kebab-case or lowercase filenames). Despite the large volume, each change is trivial with no logic alterations, control flow changes, or behavioral modifications. A reviewer can quickly verify the consistency of the naming convention updates through pattern matching and spot-checking. Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.40.5)ghost/core/test/unit/server/services/stats/posts.test.jsComment |
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: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
ghost/core/test/unit/server/services/members/members-api/services/token-service.test.js (1)
39-42: Pre-existing bug:this._issueris undefined in Mocha context.
thisrefers to the Mocha test context, not a class instance, sothis._issuerresolves toundefined. This causes jwt.verify to skip issuer verification entirely.Should use the
issuervariable from line 12 instead:🐛 Suggested fix
const decodedToken = jwt.verify(token, publicKey, { algorithms: ['RS512'], - issuer: this._issuer + issuer: 'http://127.0.0.1:2369/members/api' });Note: This is a pre-existing issue, not introduced by this PR's changes.
ghost/core/core/server/services/recommendations/recommendation-enabler-service.js (1)
25-27: Missingawaitin async method.The
asyncmethod doesn't await theedit()call, so any promise rejection goes unhandled and the method returns before the edit completes. Callers awaiting this method won't know when the operation actually finishes.🐛 Proposed fix
async setSetting(value) { - this.#settingsService.edit([{key: 'recommendations_enabled', value}], {context: {internal: true}}); + await this.#settingsService.edit([{key: 'recommendations_enabled', value}], {context: {internal: true}}); }
🧹 Nitpick comments (1)
ghost/core/test/unit/server/services/members/members-api/repositories/product-repository.test.js (1)
5-5: Pre-existing: Misleading describe block name.The describe block is named
'MemberRepository'but this file testsProductRepository. Consider updating the description to match the actual class being tested.🔧 Suggested fix
-describe('MemberRepository', function () { +describe('ProductRepository', function () {
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (198)
ghost/core/core/server/api/endpoints/authentication.jsghost/core/core/server/api/endpoints/users.jsghost/core/core/server/api/endpoints/utils/validators/input/settings.jsghost/core/core/server/services/activitypub/activity-pub-service.tsghost/core/core/server/services/adapter-manager/adapter-manager.jsghost/core/core/server/services/adapter-manager/index.jsghost/core/core/server/services/announcement-bar-service/announcement-bar-settings.jsghost/core/core/server/services/announcement-bar-service/announcement-visibility-values.jsghost/core/core/server/services/announcement-bar-service/index.jsghost/core/core/server/services/audience-feedback/audience-feedback-controller.jsghost/core/core/server/services/audience-feedback/audience-feedback-service.jsghost/core/core/server/services/audience-feedback/feedback-repository.jsghost/core/core/server/services/audience-feedback/feedback.jsghost/core/core/server/services/audience-feedback/index.jsghost/core/core/server/services/auth/session/express-session.jsghost/core/core/server/services/auth/session/session-store.jsghost/core/core/server/services/comments/comments-controller.jsghost/core/core/server/services/comments/comments-service-email-renderer.jsghost/core/core/server/services/comments/comments-service-emails.jsghost/core/core/server/services/comments/comments-service.jsghost/core/core/server/services/comments/comments-stats-service.jsghost/core/core/server/services/comments/index.jsghost/core/core/server/services/custom-redirects/custom-redirects-api.jsghost/core/core/server/services/custom-redirects/index.jsghost/core/core/server/services/donations/donation-bookshelf-repository.tsghost/core/core/server/services/donations/donation-payment-event.tsghost/core/core/server/services/donations/donation-service-wrapper.jsghost/core/core/server/services/donations/index.jsghost/core/core/server/services/email-analytics/email-analytics-provider-mailgun.jsghost/core/core/server/services/email-analytics/email-analytics-service-wrapper.jsghost/core/core/server/services/email-analytics/email-analytics-service.jsghost/core/core/server/services/email-analytics/event-processing-result.jsghost/core/core/server/services/email-analytics/events/start-email-analytics-job-event.jsghost/core/core/server/services/email-analytics/index.jsghost/core/core/server/services/email-analytics/jobs/fetch-latest/index.jsghost/core/core/server/services/email-service/EmailServiceWrapper.jsghost/core/core/server/services/email-suppression-list/email-suppression-list.jsghost/core/core/server/services/email-suppression-list/in-memory-email-suppression-list.jsghost/core/core/server/services/email-suppression-list/mailgun-email-suppression-list.jsghost/core/core/server/services/email-suppression-list/service.jsghost/core/core/server/services/explore-ping/explore-ping-service.jsghost/core/core/server/services/explore-ping/index.jsghost/core/core/server/services/explore/explore-service.jsghost/core/core/server/services/explore/index.jsghost/core/core/server/services/frontend-data-service/front-end-data-service.jsghost/core/core/server/services/frontend-data-service/index.jsghost/core/core/server/services/identity-tokens/identity-token-service-wrapper.jsghost/core/core/server/services/identity-tokens/identity-token-service.tsghost/core/core/server/services/identity-tokens/index.jsghost/core/core/server/services/invites/index.jsghost/core/core/server/services/invites/invites.jsghost/core/core/server/services/lib/dynamic-redirect-manager.jsghost/core/core/server/services/lib/email-content-generator.jsghost/core/core/server/services/lib/in-memory-repository.tsghost/core/core/server/services/lib/mailgun-client.jsghost/core/core/server/services/mail/ghost-mailer.jsghost/core/core/server/services/mail/index.jsghost/core/core/server/services/media-inliner/external-media-inliner.jsghost/core/core/server/services/media-inliner/service.jsghost/core/core/server/services/member-attribution/README.mdghost/core/core/server/services/member-attribution/attribution-builder.jsghost/core/core/server/services/member-attribution/index.jsghost/core/core/server/services/member-attribution/member-attribution-service.jsghost/core/core/server/services/member-attribution/outbound-link-tagger.jsghost/core/core/server/services/member-attribution/referrer-translator.jsghost/core/core/server/services/member-attribution/url-history.jsghost/core/core/server/services/member-attribution/url-translator.jsghost/core/core/server/services/member-welcome-emails/member-welcome-email-renderer.jsghost/core/core/server/services/member-welcome-emails/service.jsghost/core/core/server/services/members-events/event-storage.jsghost/core/core/server/services/members-events/index.jsghost/core/core/server/services/members-events/last-seen-at-cache.jsghost/core/core/server/services/members-events/last-seen-at-updater.jsghost/core/core/server/services/members/api.jsghost/core/core/server/services/members/importer/index.jsghost/core/core/server/services/members/importer/members-csv-importer-stripe-utils.jsghost/core/core/server/services/members/importer/members-csv-importer.jsghost/core/core/server/services/members/members-api/controllers/member-controller.jsghost/core/core/server/services/members/members-api/controllers/router-controller.jsghost/core/core/server/services/members/members-api/controllers/well-known-controller.jsghost/core/core/server/services/members/members-api/members-api.jsghost/core/core/server/services/members/members-api/repositories/event-repository.jsghost/core/core/server/services/members/members-api/repositories/member-repository.jsghost/core/core/server/services/members/members-api/repositories/product-repository.jsghost/core/core/server/services/members/members-api/services/geolocation-service.jsghost/core/core/server/services/members/members-api/services/member-bread-service.jsghost/core/core/server/services/members/members-api/services/payments-service.jsghost/core/core/server/services/members/members-api/services/token-service.jsghost/core/core/server/services/members/members-config-provider.jsghost/core/core/server/services/members/request-integrity-token-provider.jsghost/core/core/server/services/members/service.jsghost/core/core/server/services/members/single-use-token-provider.jsghost/core/core/server/services/members/stats/members-stats.jsghost/core/core/server/services/mentions-email-report/job.jsghost/core/core/server/services/mentions-email-report/mention-email-report-job.jsghost/core/core/server/services/mentions-email-report/service.jsghost/core/core/server/services/mentions-email-report/start-mention-email-report-job.jsghost/core/core/server/services/newsletters/index.jsghost/core/core/server/services/newsletters/newsletters-service.jsghost/core/core/server/services/notifications/index.jsghost/core/core/server/services/notifications/notifications.jsghost/core/core/server/services/offers/service.jsghost/core/core/server/services/outbox/events/start-outbox-processing-event.jsghost/core/core/server/services/outbox/index.jsghost/core/core/server/services/outbox/jobs/outbox-job.jsghost/core/core/server/services/recommendations/recommendation-enabler-service.jsghost/core/core/server/services/recommendations/service/in-memory-recommendation-repository.tsghost/core/core/server/services/recommendations/service/recommendation-service.tsghost/core/core/server/services/settings-helpers/index.jsghost/core/core/server/services/settings-helpers/settings-helpers.jsghost/core/core/server/services/settings/settings-bread-service.jsghost/core/core/server/services/settings/settings-service.jsghost/core/core/server/services/staff/staff-service-emails.jsghost/core/core/server/services/stats/content-stats-service.jsghost/core/core/server/services/stats/members-stats-service.jsghost/core/core/server/services/stats/mrr-stats-service.jsghost/core/core/server/services/stats/posts-stats-service.jsghost/core/core/server/services/stats/referrers-stats-service.jsghost/core/core/server/services/stats/service.jsghost/core/core/server/services/stats/stats-service.jsghost/core/core/server/services/stats/subscription-stats-service.jsghost/core/core/server/services/stripe/services/webhook/CheckoutSessionEventService.jsghost/core/core/server/services/themes/storage.jsghost/core/core/server/services/themes/theme-storage.jsghost/core/core/server/services/update-check/index.jsghost/core/core/server/services/update-check/update-check-service.jsghost/core/core/server/services/users.jsghost/core/core/server/services/verification-trigger.jsghost/core/core/server/services/webhooks/listen.jsghost/core/core/server/services/webhooks/webhook-trigger.jsghost/core/test/e2e-api/admin/settings.test.jsghost/core/test/e2e-api/members/send-magic-link.test.jsghost/core/test/e2e-browser/fixtures/ghost-test.jsghost/core/test/integration/services/email-service/email-event-storage.test.jsghost/core/test/integration/services/mailgun-email-suppression-list.test.jsghost/core/test/unit/server/services/activitypub/activity-pub-service.test.tsghost/core/test/unit/server/services/adapter-manager/adapter-manager.test.jsghost/core/test/unit/server/services/announcement-bar/announcement-bar-settings.test.jsghost/core/test/unit/server/services/audience-feedback/audience-feedback-service.test.jsghost/core/test/unit/server/services/auth/session/store.test.jsghost/core/test/unit/server/services/comments/comments-service-emails-renderer.test.jsghost/core/test/unit/server/services/custom-redirects/api.test.jsghost/core/test/unit/server/services/email-analytics/email-analytics-provider-mailgun.test.jsghost/core/test/unit/server/services/email-analytics/email-analytics-service.test.jsghost/core/test/unit/server/services/email-analytics/event-processing-result.test.jsghost/core/test/unit/server/services/email-suppression-list/email-suppression-list.test.jsghost/core/test/unit/server/services/explore-ping/explore-ping-service.test.jsghost/core/test/unit/server/services/frontend-data-service/frontend-data-service.test.jsghost/core/test/unit/server/services/identity-tokens/identity-token-service.test.tsghost/core/test/unit/server/services/lib/dynamic-redirect-manager.test.jsghost/core/test/unit/server/services/lib/email-content-generator.test.jsghost/core/test/unit/server/services/lib/in-memory-repository.test.tsghost/core/test/unit/server/services/lib/mailgun-client.test.jsghost/core/test/unit/server/services/media-inliner/test/external-media-inliner.test.jsghost/core/test/unit/server/services/member-attribution/attribution.test.jsghost/core/test/unit/server/services/member-attribution/history.test.jsghost/core/test/unit/server/services/member-attribution/outbound-link-tagger.test.jsghost/core/test/unit/server/services/member-attribution/referrer-translator.test.jsghost/core/test/unit/server/services/member-attribution/service.test.jsghost/core/test/unit/server/services/member-attribution/url-translator.test.jsghost/core/test/unit/server/services/member-welcome-emails/member-welcome-email-renderer.test.jsghost/core/test/unit/server/services/members-events/event-storage.test.jsghost/core/test/unit/server/services/members-events/last-seen-at-cache.test.jsghost/core/test/unit/server/services/members-events/last-seen-at-updater.test.jsghost/core/test/unit/server/services/members/config.test.jsghost/core/test/unit/server/services/members/importer/index.test.jsghost/core/test/unit/server/services/members/importer/members-csv-importer-stripe-utils.test.jsghost/core/test/unit/server/services/members/importer/members-csv-importer.test.jsghost/core/test/unit/server/services/members/members-api/controllers/member-controller.test.jsghost/core/test/unit/server/services/members/members-api/controllers/router-controller.test.jsghost/core/test/unit/server/services/members/members-api/repositories/event-repository.test.jsghost/core/test/unit/server/services/members/members-api/repositories/member-repository.test.jsghost/core/test/unit/server/services/members/members-api/repositories/product-repository.test.jsghost/core/test/unit/server/services/members/members-api/services/geolocation-service.test.jsghost/core/test/unit/server/services/members/members-api/services/members-bread-service.test.jsghost/core/test/unit/server/services/members/members-api/services/payments-service.test.jsghost/core/test/unit/server/services/members/members-api/services/token-service.test.jsghost/core/test/unit/server/services/members/request-integrity-token-provider.test.jsghost/core/test/unit/server/services/members/single-use-token-provider.test.jsghost/core/test/unit/server/services/mentions-email-report/mention-email-report-job.test.jsghost/core/test/unit/server/services/newsletters/service.test.jsghost/core/test/unit/server/services/notifications/notifications.test.jsghost/core/test/unit/server/services/outbox/index.test.jsghost/core/test/unit/server/services/recommendations/service/recommendation-service.test.tsghost/core/test/unit/server/services/settings-helpers/settings-helpers.test.jsghost/core/test/unit/server/services/settings/settings-bread-service.test.jsghost/core/test/unit/server/services/stats/content.test.jsghost/core/test/unit/server/services/stats/members.test.jsghost/core/test/unit/server/services/stats/mrr.test.jsghost/core/test/unit/server/services/stats/posts.test.jsghost/core/test/unit/server/services/stats/referrers.test.jsghost/core/test/unit/server/services/stats/stats.test.jsghost/core/test/unit/server/services/stats/subscriptions.test.jsghost/core/test/unit/server/services/update-check.test.jsghost/core/test/unit/server/services/users/users-service.test.jsghost/core/test/unit/server/services/verification-trigger.test.jsghost/core/test/unit/server/services/webhooks/trigger.test.jsghost/core/test/utils/e2e-framework-mock-manager.js
🧰 Additional context used
🧬 Code graph analysis (13)
ghost/core/core/server/services/settings/settings-service.js (1)
ghost/core/test/e2e-api/admin/settings.test.js (2)
require(6-6)SingleUseTokenProvider(4-4)
ghost/core/test/unit/server/services/members/config.test.js (2)
ghost/core/test/unit/server/services/newsletters/service.test.js (2)
require(10-10)require(11-11)ghost/core/test/integration/services/q-email-addresses.test.js (3)
require(5-5)require(7-7)require(9-9)
ghost/core/core/server/services/outbox/jobs/outbox-job.js (2)
ghost/core/core/server/services/outbox/index.js (2)
StartOutboxProcessingEvent(3-3)require(6-6)ghost/core/test/unit/server/services/outbox/index.test.js (1)
StartOutboxProcessingEvent(4-4)
ghost/core/test/unit/server/services/outbox/index.test.js (2)
ghost/core/core/server/services/outbox/index.js (2)
StartOutboxProcessingEvent(3-3)require(6-6)ghost/core/core/server/services/outbox/jobs/outbox-job.js (2)
StartOutboxProcessingEvent(2-2)require(1-1)
ghost/core/core/server/services/settings-helpers/index.js (1)
ghost/core/test/unit/server/services/settings-helpers/settings-helpers.test.js (1)
SettingsHelpers(4-4)
ghost/core/core/server/services/email-service/EmailServiceWrapper.js (2)
ghost/core/core/server/services/email-suppression-list/service.js (1)
MailgunClient(5-5)ghost/core/test/unit/server/services/lib/mailgun-client.test.js (1)
MailgunClient(6-6)
ghost/core/core/server/services/member-attribution/index.js (5)
ghost/core/test/unit/server/services/member-attribution/service.test.js (1)
MemberAttributionService(3-3)ghost/core/test/unit/server/services/member-attribution/url-translator.test.js (1)
UrlTranslator(3-3)ghost/core/test/unit/server/services/member-attribution/referrer-translator.test.js (1)
ReferrerTranslator(3-3)ghost/core/test/unit/server/services/member-attribution/attribution.test.js (1)
AttributionBuilder(4-4)ghost/core/test/unit/server/services/member-attribution/outbound-link-tagger.test.js (1)
OutboundLinkTagger(4-4)
ghost/core/test/unit/server/services/lib/mailgun-client.test.js (1)
ghost/core/core/server/services/email-suppression-list/service.js (1)
MailgunClient(5-5)
ghost/core/test/e2e-api/admin/settings.test.js (1)
ghost/core/core/server/services/settings/settings-service.js (2)
SingleUseTokenProvider(15-15)require(13-13)
ghost/core/core/server/services/outbox/index.js (2)
ghost/core/core/server/services/outbox/jobs/outbox-job.js (2)
StartOutboxProcessingEvent(2-2)require(1-1)ghost/core/test/unit/server/services/outbox/index.test.js (1)
StartOutboxProcessingEvent(4-4)
ghost/core/core/server/services/email-suppression-list/service.js (1)
ghost/core/test/unit/server/services/lib/mailgun-client.test.js (1)
MailgunClient(6-6)
ghost/core/core/server/services/email-analytics/email-analytics-service-wrapper.js (2)
ghost/core/test/unit/server/services/email-analytics/email-analytics-service.test.js (1)
EmailAnalyticsService(6-6)ghost/core/core/server/services/email-analytics/jobs/fetch-latest/index.js (1)
StartEmailAnalyticsJobEvent(2-2)
ghost/core/test/unit/server/services/settings-helpers/settings-helpers.test.js (1)
ghost/core/core/server/services/settings-helpers/index.js (1)
SettingsHelpers(4-4)
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Benchmark PR from qodo-benchmark#224
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.