-
Notifications
You must be signed in to change notification settings - Fork 703
Add list notifications tool #297
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
base: main
Are you sure you want to change the base?
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 adds a tool to list GitHub notifications, providing new endpoints and tests for retrieving notifications with customizable paging and filtering.
- Introduces a new notifications toolset in pkg/github/tools.go.
- Implements the ListNotifications handler in pkg/github/notifications.go with supporting tests in pkg/github/notifications_test.go.
- Updates pkg/github/server.go to include a new helper for optional boolean parameters and documents the change in README.md.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
pkg/github/tools.go | Adds a notifications toolset and registers it with the tool group. |
pkg/github/server.go | Adds OptionalBoolParamWithDefault helper but contains logic issues. |
pkg/github/notifications_test.go | Provides tests for the notifications tool functionality. |
pkg/github/notifications.go | Implements the ListNotifications tool. |
README.md | Updates documentation with the new notifications tool information. |
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 tool to list GitHub notifications along with its implementation, tests, and documentation updates.
- Introduces a notifications toolset with read functions.
- Implements the ListNotifications tool in the GitHub package.
- Provides tests for notifications behavior and updates the README documentation.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
pkg/github/tools.go | Adds a new toolset for notifications with read capabilities. |
pkg/github/notifications.go | Implements the notifications listing functionality. |
pkg/github/notifications_test.go | Adds tests ensuring proper behavior of the notifications tool. |
README.md | Updates documentation to include the new notifications tool details. |
Comments suppressed due to low confidence (1)
pkg/github/notifications_test.go:117
- [nitpick] Consider adding assertions for additional fields such as the URL to further improve test coverage of notification properties.
assert.Equal(t, *tc.expectedResponse[i].Subject.Title, *notification.Subject.Title)
require.NoError(t, err) | ||
assert.Equal(t, len(tc.expectedResponse), len(returnedNotifications)) | ||
for i, notification := range returnedNotifications { | ||
assert.Equal(t, *tc.expectedResponse[i].ID, *notification.ID) |
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.
Copilot is somewhat right here with:
[nitpick] Consider adding assertions for additional fields such as the URL to further improve test coverage of notification properties.
Description
Add a tool to list notifications
DoL exercise to add list notifications tool for github MCP server with with @krzd, @leachj, @geramirez using copilot agent mode
Screenshots
Closes: N/A -