Skip to content

Combine tools #349

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

Draft
wants to merge 3 commits into
base: notifications-tooling
Choose a base branch
from
Draft

Conversation

rfearing
Copy link
Contributor

@rfearing rfearing commented Apr 25, 2025

👉🏼 👉🏼 Note the target branch is notifications-tooling, not master

From my previous PR into the same target branch, where I added "mark notification as done" I received the feedback to combine some of the tooling so we don't add as many tools for notification. This is my attempt to do that. Note, I definitely used :copilot: for help.

👇🏼 Previous feedback:
Previous feedback

@rfearing rfearing marked this pull request as ready for review April 25, 2025 16:52
@Copilot Copilot AI review requested due to automatic review settings April 25, 2025 16:52
@rfearing rfearing requested a review from a team as a code owner April 25, 2025 16:52
Copy link
Contributor

@Copilot Copilot AI left a 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 consolidates various GitHub notification tools into a single ManageNotifications tool to reduce redundant tooling and simplify the API.

  • Combined separate functions for marking a notification as read, marking all notifications as read, and marking a notification as done into one unified tool.
  • Updated tooling registration in pkg/github/tools.go and merged logic in pkg/github/notifications.go to support action-based behavior.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
pkg/github/tools.go Registering notifications tool now using GetNotifications and ManageNotifications.
pkg/github/notifications.go Consolidated and refactored notification actions into a single switch-case structure.

if lastReadAt != "" {
lastReadTime, err := time.Parse(time.RFC3339, lastReadAt)
switch action {
case "mark_read":
Copy link
Preview

Copilot AI Apr 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'mark_read' action does not call any API to mark a notification as read; it directly returns a success message. Please add the appropriate API call to actually mark the notification as read.

Copilot uses AI. Check for mistakes.

@rfearing rfearing requested a review from sridharavinash April 25, 2025 16:53
@rfearing
Copy link
Contributor Author

rfearing commented Apr 25, 2025

@juruen, @sridharavinash, @SamMorrowDrums, This is my attempt to address this previous comment: #270 (comment)

Sorry for the pings. I'm going to take another look at this first.

@rfearing rfearing marked this pull request as draft April 25, 2025 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant