release v3.0.0-rc.3#141
Conversation
<!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/su-its/core/pull/139" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end -->
## Summary - MemberIdを指定して単一メンバーとそのDiscordアカウント情報を取得する `GetMemberWithDiscordAccountsUseCase` を追加 - `MemberService` に `getMemberWithDiscordAccounts(id)` メソッドを追加 - 既存の `ListMembersWithDiscordAccounts` の個別版として、同じ `MemberWithDiscordAccounts` 型を返す ## Why MemberとDiscordAccountを紐づけて個別取得するニーズに対応するため。集約の境界は維持したまま、クエリ側のアプリケーション層で合成する方針。 ## Test plan - [ ] `getMemberWithDiscordAccounts` に存在するMemberIdを渡して、DiscordAccount付きで返ることを確認 - [ ] 存在しないMemberIdを渡して `null` が返ることを確認 - [ ] DiscordAccount未連携のMemberに対して空配列が返ることを確認 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/su-its/core/pull/140" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end --> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| const member = await this.memberRepo.findById(input.id); | ||
| if (!member) { | ||
| return { member: null }; | ||
| } | ||
|
|
||
| const discordAccounts = await this.discordRepo.findByMemberId(member.id); |
There was a problem hiding this comment.
📝 Info: New use case makes sequential DB calls instead of parallel
The new GetMemberWithDiscordAccountsUseCase at src/application/usecase/member/GetMemberWithDiscordAccounts.ts:28-33 first fetches the member, then sequentially fetches discord accounts. This is necessary because the member lookup can return null (short-circuiting at line 29-31), so the two calls can't be parallelized with Promise.all like they are in ListMembersWithDiscordAccountsUseCase (src/application/usecase/member/ListMembersWithDiscordAccounts.ts:26-29). The sequential approach is correct here since the second query depends on the first succeeding.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Pull request overview
This PR prepares the v3.0.0-rc.3 release by adding a dedicated “get member with Discord accounts” query path and consolidating the related DTO type, alongside dependency lockfile updates.
Changes:
- Add
GetMemberWithDiscordAccountsUseCaseand expose it viaMemberService. - Move
MemberWithDiscordAccountstype into the shared application DTO module and update the list use case to use it. - Update
package-lock.jsonwith dependency version bumps.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/executable/memberService.ts | Wires a new use case into MemberService to fetch a single member with Discord accounts. |
| src/application/usecase/member/ListMembersWithDiscordAccounts.ts | Switches to the centralized MemberWithDiscordAccounts DTO type. |
| src/application/usecase/member/index.ts | Exports the newly added GetMemberWithDiscordAccounts use case. |
| src/application/usecase/member/GetMemberWithDiscordAccounts.ts | Implements the new use case to fetch a member and their Discord accounts. |
| src/application/dto.ts | Introduces MemberWithDiscordAccounts as a shared DTO type. |
| package-lock.json | Updates locked dependency versions for the release. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const getMemberByEmail = new GetMemberByEmailUseCase(memberRepo); | ||
| const getMemberByDiscordId = new GetMemberByDiscordIdUseCase(discordRepo, memberRepo); | ||
| const getMemberList = new GetMemberListUseCase(memberRepo); | ||
| const getMemberWithDiscord = new GetMemberWithDiscordAccountsUseCase(memberRepo, discordRepo); |
There was a problem hiding this comment.
getMemberWithDiscord is an ambiguous local name given the service method is getMemberWithDiscordAccounts and the use case is GetMemberWithDiscordAccountsUseCase. Renaming the variable (and its usage) to getMemberWithDiscordAccounts (or similar) would improve readability and reduce the chance of mixing it up with other Discord-related use cases.
Uh oh!
There was an error while loading. Please reload this page.