-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add user profiles and document talks usage #14
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
Add user profile fetching and document talks repository usage. ## Changes - Add getUser() function to fetch user profiles - Add GraphQL query for user data with social accounts - Add comprehensive test suite for user profiles - Document how to fetch talks using existing event functions - Update README with API documentation ## Features - User profile metadata (name, bio, company, location) - Social account links (LinkedIn, Twitter, etc.) - Follower/following counts and repository count - Reuses existing event APIs for talks repositories 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Pull Request Overview
This PR adds a new getUser() function to fetch GitHub user profiles, which is useful for retrieving speaker information in the context of the GitEvents library. The feature includes a new GraphQL query, implementation logic, comprehensive tests, and updated documentation.
- Implements
getUser()function to fetch user profiles via GitHub GraphQL API - Adds comprehensive test coverage including parameter validation, success cases, error handling, and optional API integration tests
- Updates documentation with usage examples and feature listing
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/users.js | New module implementing the getUser() function with parameter validation and data transformation logic |
| src/graphql/user.gql | GraphQL query definition for fetching user profile data |
| src/lib/parseGql.js | Registers the new user query with the parseGql utility |
| src/index.js | Exports the new getUser() function as part of the public API |
| test/users.test.js | Comprehensive test suite covering validation, success cases, null handling, and error scenarios |
| README.md | Documentation for the new feature with usage examples |
| package.json | Version bump from 0.0.3-dev to 0.0.4 |
| package-lock.json | Lockfile updated to reflect version change |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Extract validateParams into shared utility module (src/lib/validateParams.js) - Remove duplicated validateParams from events.js, teams.js, and users.js - Align socialAccounts null handling with teams.js (remove redundant || null) - Add updatedAt field to README example for completeness Addresses code review comments from Copilot: - #14 (comment) - #14 (comment) - #14 (comment) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Resolves merge conflicts by integrating both user profiles and file fetching features from main branch. Conflict resolutions: - README.md: Added both user profiles and file fetching documentation - src/index.js: Imported both getUserProfile and getFileContent, fixed getUser to use getGraphqlClient() with proper validation - src/lib/parseGql.js: Added both userQuery and fileQuery imports All 50 tests passing after merge. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
🎉 This PR is included in version 1.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
Adds user profile fetching for speaker information and documents
how to use existing APIs for talks repositories.
Closes #7
Closes #8
Changes
API Usage - User Profiles
Talks Repository Support
Talks stored as issues use existing event functions:
Features
User Object Structure
Test Plan
🤖 Generated with Claude Code