Skip to content

Conversation

mike182uk
Copy link
Member

ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed updatedBy & createdBy fields in the admin app as they are deprecated and should not be being used anywhere meaningful in the codebase

ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are deprecated
and should not be being used anywhere meaningful in the codebase
Copy link
Contributor

coderabbitai bot commented Jun 26, 2025

Walkthrough

This change removes the createdBy and updatedBy attributes from multiple model definitions and MirageJS factory files within the codebase. Specifically, these attributes—previously used to track the user responsible for creating or updating records—have been deleted from models such as API Key, Email, Integration, Invite, Label, Post, Role, Tag, User, and Webhook. Corresponding properties and assignments have also been removed from MirageJS factories and mock server configurations, ensuring consistency between application models and test data generation. No other model attributes, relationships, or factory behaviors were altered in this update.

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.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ghost/admin/mirage/factories/api-key.js

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Failed to load parser '@babel/eslint-parser' declared in 'ghost/admin/.eslintrc.js': Cannot find module '@babel/eslint-parser'
Require stack:

  • /ghost/admin/.eslintrc.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1369:15)
    at require.resolve (node:internal/modules/helpers:145:19)
    at Object.resolve (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2346:46)
    at ConfigArrayFactory._loadParser (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3325:39)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3099:43)
    at _normalizeObjectConfigDataBody.next ()
    at ConfigArrayFactory._normalizeObjectConfigData (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3040:20)
    at _normalizeObjectConfigData.next ()
    at ConfigArrayFactory.loadInDirectory (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2886:28)
    at CascadingConfigArrayFactory._loadConfigInAncestors (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3871:46)
ghost/admin/mirage/factories/role.js

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Failed to load parser '@babel/eslint-parser' declared in 'ghost/admin/.eslintrc.js': Cannot find module '@babel/eslint-parser'
Require stack:

  • /ghost/admin/.eslintrc.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1369:15)
    at require.resolve (node:internal/modules/helpers:145:19)
    at Object.resolve (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2346:46)
    at ConfigArrayFactory._loadParser (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3325:39)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3099:43)
    at _normalizeObjectConfigDataBody.next ()
    at ConfigArrayFactory._normalizeObjectConfigData (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3040:20)
    at _normalizeObjectConfigData.next ()
    at ConfigArrayFactory.loadInDirectory (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2886:28)
    at CascadingConfigArrayFactory._loadConfigInAncestors (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3871:46)
ghost/admin/mirage/factories/webhook.js

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Failed to load parser '@babel/eslint-parser' declared in 'ghost/admin/.eslintrc.js': Cannot find module '@babel/eslint-parser'
Require stack:

  • /ghost/admin/.eslintrc.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1369:15)
    at require.resolve (node:internal/modules/helpers:145:19)
    at Object.resolve (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2346:46)
    at ConfigArrayFactory._loadParser (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3325:39)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3099:43)
    at _normalizeObjectConfigDataBody.next ()
    at ConfigArrayFactory._normalizeObjectConfigData (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3040:20)
    at _normalizeObjectConfigData.next ()
    at ConfigArrayFactory.loadInDirectory (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2886:28)
    at CascadingConfigArrayFactory._loadConfigInAncestors (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3871:46)

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d87835f and 7b8ae17.

📒 Files selected for processing (22)
  • ghost/admin/app/models/api-key.js (0 hunks)
  • ghost/admin/app/models/email.js (0 hunks)
  • ghost/admin/app/models/integration.js (0 hunks)
  • ghost/admin/app/models/invite.js (0 hunks)
  • ghost/admin/app/models/label.js (0 hunks)
  • ghost/admin/app/models/post.js (0 hunks)
  • ghost/admin/app/models/role.js (0 hunks)
  • ghost/admin/app/models/tag.js (0 hunks)
  • ghost/admin/app/models/user.js (0 hunks)
  • ghost/admin/app/models/webhook.js (0 hunks)
  • ghost/admin/mirage/config/invites.js (0 hunks)
  • ghost/admin/mirage/factories/api-key.js (1 hunks)
  • ghost/admin/mirage/factories/email.js (0 hunks)
  • ghost/admin/mirage/factories/integration.js (0 hunks)
  • ghost/admin/mirage/factories/invite.js (0 hunks)
  • ghost/admin/mirage/factories/label.js (0 hunks)
  • ghost/admin/mirage/factories/page.js (0 hunks)
  • ghost/admin/mirage/factories/post.js (0 hunks)
  • ghost/admin/mirage/factories/role.js (1 hunks)
  • ghost/admin/mirage/factories/tag.js (0 hunks)
  • ghost/admin/mirage/factories/user.js (0 hunks)
  • ghost/admin/mirage/factories/webhook.js (1 hunks)
💤 Files with no reviewable changes (19)
  • ghost/admin/mirage/factories/email.js
  • ghost/admin/app/models/user.js
  • ghost/admin/mirage/factories/page.js
  • ghost/admin/app/models/invite.js
  • ghost/admin/mirage/factories/invite.js
  • ghost/admin/app/models/role.js
  • ghost/admin/app/models/api-key.js
  • ghost/admin/app/models/label.js
  • ghost/admin/app/models/tag.js
  • ghost/admin/mirage/factories/tag.js
  • ghost/admin/mirage/factories/label.js
  • ghost/admin/mirage/config/invites.js
  • ghost/admin/app/models/email.js
  • ghost/admin/mirage/factories/user.js
  • ghost/admin/mirage/factories/integration.js
  • ghost/admin/app/models/integration.js
  • ghost/admin/app/models/post.js
  • ghost/admin/app/models/webhook.js
  • ghost/admin/mirage/factories/post.js
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: cathysarisky
PR: TryGhost/Ghost#0
File: :0-0
Timestamp: 2025-05-20T21:08:21.026Z
Learning: In the Ghost project, translation files (ghost/i18n/locales/*/*.json) commonly have blank values for translations, and this is normal behavior that should not be flagged in reviews. These empty translations will be filled in separate PRs.
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Setup
🔇 Additional comments (3)
ghost/admin/mirage/factories/webhook.js (1)

5-16: LGTM! Clean removal of deprecated fields.

The removal of createdBy and updatedBy properties from the webhook factory is consistent with the PR objective to deprecate these fields across the codebase. The factory maintains proper structure with the remaining essential properties.

ghost/admin/mirage/factories/api-key.js (1)

4-18: LGTM! Deprecated user tracking fields properly removed.

The removal of createdBy and updatedBy properties from the api-key factory aligns with the systematic deprecation effort. The factory retains all essential functionality including proper secret generation and timestamp handling.

ghost/admin/mirage/factories/role.js (1)

3-8: LGTM! Consistent removal of deprecated fields.

The removal of createdBy and updatedBy properties from the role factory is consistent with the broader deprecation effort across the codebase. The factory maintains proper structure with static timestamps appropriate for test data generation.

✨ Finishing Touches
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@mike182uk mike182uk merged commit 564a35a into 6.x Jun 26, 2025
23 checks passed
@mike182uk mike182uk deleted the 6.x-PROD-1597-remove-createdBy-updatedBy branch June 26, 2025 16:21
ErisDS pushed a commit that referenced this pull request Jun 27, 2025
ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are
deprecated and should not be being used anywhere meaningful in the
codebase
ErisDS pushed a commit that referenced this pull request Jun 30, 2025
ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are
deprecated and should not be being used anywhere meaningful in the
codebase
ErisDS pushed a commit that referenced this pull request Jul 1, 2025
ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are
deprecated and should not be being used anywhere meaningful in the
codebase
ErisDS pushed a commit that referenced this pull request Jul 2, 2025
ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are
deprecated and should not be being used anywhere meaningful in the
codebase
ErisDS pushed a commit that referenced this pull request Jul 2, 2025
ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are
deprecated and should not be being used anywhere meaningful in the
codebase
ErisDS pushed a commit that referenced this pull request Jul 10, 2025
ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are
deprecated and should not be being used anywhere meaningful in the
codebase
ErisDS pushed a commit that referenced this pull request Jul 10, 2025
ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are
deprecated and should not be being used anywhere meaningful in the
codebase
ErisDS pushed a commit that referenced this pull request Jul 11, 2025
ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are
deprecated and should not be being used anywhere meaningful in the
codebase
ErisDS pushed a commit that referenced this pull request Jul 14, 2025
ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are
deprecated and should not be being used anywhere meaningful in the
codebase
ErisDS pushed a commit that referenced this pull request Jul 15, 2025
ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are
deprecated and should not be being used anywhere meaningful in the
codebase
ErisDS pushed a commit that referenced this pull request Jul 16, 2025
ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are
deprecated and should not be being used anywhere meaningful in the
codebase
ErisDS pushed a commit that referenced this pull request Jul 17, 2025
ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are
deprecated and should not be being used anywhere meaningful in the
codebase
ErisDS pushed a commit that referenced this pull request Jul 17, 2025
ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are
deprecated and should not be being used anywhere meaningful in the
codebase
ErisDS pushed a commit that referenced this pull request Jul 18, 2025
ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are
deprecated and should not be being used anywhere meaningful in the
codebase
ErisDS pushed a commit that referenced this pull request Jul 20, 2025
ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are
deprecated and should not be being used anywhere meaningful in the
codebase
ErisDS pushed a commit that referenced this pull request Jul 21, 2025
ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are
deprecated and should not be being used anywhere meaningful in the
codebase
ErisDS pushed a commit that referenced this pull request Jul 21, 2025
ref https://linear.app/ghost/issue/PROD-1597
ref #24053

Removed `updatedBy` & `createdBy` fields in the admin app as they are
deprecated and should not be being used anywhere meaningful in the
codebase
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.

1 participant