-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat: Add create org invitation tool #1226
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
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 introduces a new GitHub organization invitation tool that allows creating invitations for users to join an organization through the MCP server. The tool supports inviting users by either GitHub user ID or email address and includes comprehensive validation and error handling.
- Added
CreateOrgInvitationfunction to create organization invitations via GitHub API - Integrated the new tool into the existing toolset framework as a write operation
- Comprehensive test coverage for various scenarios including success cases, validation errors, and API failures
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/github/tools.go | Integrates the new CreateOrgInvitation tool into the orgs toolset as a write operation |
| pkg/github/orgs.go | Implements the core CreateOrgInvitation function with parameter validation and GitHub API integration |
| pkg/github/orgs_test.go | Provides comprehensive test coverage for the CreateOrgInvitation functionality |
| pkg/github/toolsnaps/create_org_invitation.snap | Contains the tool definition snapshot for testing validation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
8966fd0 to
46389d6
Compare
I've added only the create-invitation, since that’s the only one I need at the moment.
And this is the first pull-req for this repository, so I'm not sure whether other tools for org should be implemented as well. (if so, I can do that)