feat: implement GetCurrentUserPAT RPC#1450
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR adds a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~35 minutes Possibly related PRs
Suggested reviewers
📝 Coding Plan
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. Comment Tip CodeRabbit can generate a title for your PR based on the changes.Add |
Pull Request Test Coverage Report for Build 23184366935Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
core/userpat/service_test.go (1)
1360-1362: Assert enriched scope fields in the success path.The success case only verifies PAT ID. Please also assert
RoleIDs/ProjectIDsso regressions in scope enrichment are caught.internal/api/v1beta1connect/user_pat_test.go (1)
394-514: Add a PAT-auth happy-path test case.Please add a case where principal type is PAT (or non-user) with
principal.Userpopulated, and assert success. That locks in the intended auth behavior for this RPC.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4f79baed-8949-4473-b27e-8d742413a559
⛔ Files ignored due to path filters (2)
proto/v1beta1/frontier.pb.gois excluded by!**/*.pb.goproto/v1beta1/models.pb.gois excluded by!**/*.pb.go
📒 Files selected for processing (12)
Makefilecore/userpat/mocks/policy_service.gocore/userpat/models/pat.gocore/userpat/service.gocore/userpat/service_test.gointernal/api/v1beta1connect/interfaces.gointernal/api/v1beta1connect/mocks/user_pat_service.gointernal/api/v1beta1connect/user_pat.gointernal/api/v1beta1connect/user_pat_test.gopkg/server/connect_interceptors/authorization.goproto/v1beta1/frontier.pb.validate.goproto/v1beta1/frontierv1beta1connect/frontier.connect.go
Summary
GetCurrentUserPATRPC handler that retrieves a single PAT by ID for the authenticated userprincipal.User != nilinstead of principal type)Manual Tests