Skip to content

Fixed type error in member repo#28242

Merged
EvanHahn merged 1 commit into
mainfrom
refactor-resolvecontextsource
May 28, 2026
Merged

Fixed type error in member repo#28242
EvanHahn merged 1 commit into
mainfrom
refactor-resolvecontextsource

Conversation

@EvanHahn
Copy link
Copy Markdown
Contributor

no ref

This method had a type error, which was easy to fix by shortening it.

no ref

This method had a type error, which was easy to fix by shortening it.
@EvanHahn EvanHahn enabled auto-merge (squash) May 28, 2026 21:25
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f2cfec9b-e4ce-40f5-8bda-f1a576b8d01c

📥 Commits

Reviewing files that changed from the base of the PR and between 430098e and d432bcc.

📒 Files selected for processing (1)
  • ghost/core/core/server/services/members/members-api/repositories/member-repository.js

Walkthrough

This PR refactors the _resolveContextSource method in the member repository to use direct return statements for each context type check. The method previously assigned source values to an intermediate variable before returning it. The refactored version returns the corresponding source string directly from each conditional branch—import, system, api, or admin based on context, with a fallback to member. The logic and behavior remain unchanged.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing a type error in the member repository by refactoring the _resolveContextSource method.
Description check ✅ Passed The description is related to the changeset, indicating that a type error was fixed by shortening the method, which aligns with the refactoring summary.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor-resolvecontextsource

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Actionable comments posted: 0

@EvanHahn EvanHahn merged commit 564cf54 into main May 28, 2026
49 checks passed
@EvanHahn EvanHahn deleted the refactor-resolvecontextsource branch May 28, 2026 21:48
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