Skip to content

release v3.0.0-rc.3#141

Merged
KinjiKawaguchi merged 2 commits intomainfrom
develop
Apr 2, 2026
Merged

release v3.0.0-rc.3#141
KinjiKawaguchi merged 2 commits intomainfrom
develop

Conversation

@KinjiKawaguchi
Copy link
Copy Markdown
Member

@KinjiKawaguchi KinjiKawaguchi commented Apr 2, 2026

KinjiKawaguchi and others added 2 commits April 2, 2026 18:38
<!-- 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>
Copilot AI review requested due to automatic review settings April 2, 2026 09:50
@KinjiKawaguchi KinjiKawaguchi merged commit 3b71b7a into main Apr 2, 2026
10 checks passed
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

Comment on lines +28 to +33
const member = await this.memberRepo.findById(input.id);
if (!member) {
return { member: null };
}

const discordAccounts = await this.discordRepo.findByMemberId(member.id);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 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.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 GetMemberWithDiscordAccountsUseCase and expose it via MemberService.
  • Move MemberWithDiscordAccounts type into the shared application DTO module and update the list use case to use it.
  • Update package-lock.json with 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);
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
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.

2 participants