Merged
Conversation
|
セキュリティレビューを実施しました。 By RISKEN review |
There was a problem hiding this comment.
Pull Request Overview
This PR updates the GitHub client to fetch private repositories for the authenticated user and adjusts related tests; it also adds a generated CLAUDE.md guide.
- Switch
listRepositoryForUserWithOptionto use/user/reposfor the authenticated user and/users/{login}/reposfor others. - Include the underlying
github.ClientinGitHubV3Clientand propagate it fromnewV3Client. - Update
Test_listRepositoryForUserWithOptionto initialize and use the new client shape. - Add
CLAUDE.mddocumentation for AI code assistance.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/github/github.go | Include Client in GitHubV3Client, add auth-user check and endpoint switch |
| pkg/github/github_test.go | Update test setup to construct a GitHubV3Client instead of raw service and fix typo |
| CLAUDE.md | Add generated guidance file for Claude Code |
Comments suppressed due to low confidence (4)
pkg/github/github_test.go:76
- The 'OK empty' test case no longer sets 'want' or 'wantError', so it doesn't verify behavior. Add 'want: []*github.Repository{}' and 'wantError: false' to ensure the empty-repos path is asserted.
name: "OK empty",
pkg/github/github_test.go:77
- The failure-path ('NG List Error') test was removed when refactoring. Reintroduce a case that mocks an API error and asserts 'wantError: true' to cover error propagation.
login: "owner",
pkg/github/github_test.go:88
- [nitpick] This 'client' variable shadows the earlier 'githubClient'. Rename it (e.g., 'v3Client') to avoid confusion between the API client and the risken client.
client := &GitHubV3Client{
CLAUDE.md:1
- [nitpick] This auto-generated guidance file lives at the repo root. Consider moving it under a 'docs/' directory or marking it as generated to keep root clutter minimal.
# CLAUDE.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
バグ
現在は、パブリックリポジトリのみを取得する実装になっていますが、認証ユーザのリポジトリも取得する必要があります。
認証ユーザー自身を検索する場合とその他のユーザーを検索する場合で、異なるAPIエンドポイントを使い分ける:
変更箇所
テスト