-
Notifications
You must be signed in to change notification settings - Fork 4
Add GitHub profile management endpoints #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: maximgorbatyuk <13348685+maximgorbatyuk@users.noreply.github.com>
| [ApiController] | ||
| [Route("api/github")] | ||
| [HasAnyRole(Role.Admin)] | ||
| public class GithubController : ControllerBase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice, but it is not enough. Please create Handlers with commands. Also, please create special ...QUeryParams classes for endpoints with pagination. I am going to introduce searching feature in the future, so separate classes that inherit PageModel, will be required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've refactored the implementation to use the Handler pattern with separate QueryParams classes as requested. Each endpoint now has its own handler implementing IRequestHandler<TRequest, TResult> and QueryParams classes that inherit from PageModel for future search functionality extensibility. The structure now matches the existing patterns in the codebase like CompaniesController. Changes in commit ee35bc5.
…sses Co-authored-by: maximgorbatyuk <13348685+maximgorbatyuk@users.noreply.github.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This PR implements the requested GitHub profile management endpoints for admin users as specified in the issue.
Added Endpoints
/api/github/profiles- Paginated list of GitHub profiles ordered by creation date (desc)/api/github/chats- Paginated list of GitHub profile bot chats ordered by usage (messages count desc), then by creation date (desc)/api/github/processing-jobs- Complete list of GitHub processing jobs ordered by creation date (desc) without pagination/api/github/processing-jobs/{username}- Delete a GitHub processing job by usernameImplementation Details
Files Added
GithubController.cs- Main API controller with admin-only accessGithubProfileDto.cs- Data transfer object for GitHub profilesGithubProfileBotChatDto.cs- Data transfer object for bot chatsGithubProfileProcessingJobDto.cs- Data transfer object for processing jobsKey Features
[HasAnyRole(Role.Admin)])PageModelandAsPaginatedAsyncpatterns for profiles and chats endpointsInterviewsControllerExample Usage
The implementation uses direct database access following existing patterns and maintains consistency with the current codebase architecture.
Fixes #126.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.