Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add "Mark notification as done" functionality#270

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

rfearing
Copy link
Contributor

@rfearingrfearing commentedApr 14, 2025
edited
Loading

AddMarkNotificationAsDone to notifications tooling

Note: Target branch isnotifications-tooling#225

Feature added

  • `mark_notification_done: Mark a specific notification thread as done

Technical implementation

  • I largely copiedmark_notification_read
  • For the paramthreadId,WithNumber ran into some issues, so I kept the param as a string. I'm open to suggestions.

@rfearingrfearing changed the titlefeat: add GitHub notifications tools for managing user notificationsAdd "Mark notification as done" functionalityApr 14, 2025
@rfearingrfearingforce-pushed therfearing/add-mark-notifications-as-done branch from2075a36 toedc1adaCompareApril 15, 2025 13:13
@rfearingrfearing marked this pull request as ready for reviewApril 15, 2025 13:31
@CopilotCopilotAI review requested due to automatic review settingsApril 15, 2025 13:31
Copy link
Contributor

@CopilotCopilotAI 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 adds the "Mark Notification as Done" functionality to the notifications tooling. The changes include:

  • Adding a new tool registration in pkg/github/server.go.
  • Implementing the MarkNotificationDone function in pkg/github/notifications.go to mark a specific notification thread as done.

Reviewed Changes

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

FileDescription
pkg/github/server.goRegisters the new tool for marking a notification as done.
pkg/github/notifications.goImplements MarkNotificationDone with parameter parsing and API call.
Comments suppressed due to low confidence (1)

pkg/github/notifications.go:260

  • [nitpick] Consider renaming the parameter 'getclient' to 'getClient' for consistency with similar functions and to improve readability.
func MarkNotificationDone(getclient GetClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {

@juruen
Copy link
Collaborator

@rfearing as having too many tools might become an issue, maybe it'd be worth exploring the possibility of merging some of these tools into one.

It seems that marking notifications might be a good candidate to having just one and using the parameters to decide what to do exactly.

And the same goes for the getters.

In general, we should probably explore providing higher level APIs instead of having a 1:1 mapping with the underlying API.

We are already doing that in some tools with a positive result.

In any case, these are just my two cents.

/cc@toby@SamMorrowDrums@williammartin

rfearing reacted with rocket emoji

Copy link
Contributor

@sridharavinashsridharavinash left a comment

Choose a reason for hiding this comment

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

Nice work! 💖

@rfearingrfearing merged commit6eaa8d3 intonotifications-toolingApr 16, 2025
15 checks passed
@rfearingrfearing deleted the rfearing/add-mark-notifications-as-done branchApril 16, 2025 13:13
@SamMorrowDrums
Copy link
Collaborator

Surprised this was merged without addressing@juruen 's comment.

Probably it makes more sense for the two mark notification tools to be one with an enum for what state to change it to.

Can consider as a follow-up though.

@SamMorrowDrums
Copy link
Collaborator

Oh, sorry I didn't realise this was merged into a branch!

@rfearing
Copy link
ContributorAuthor

@SamMorrowDrums,@juruen I targeted@sridharavinash's branch and that PR has not yet been merged

@sridharavinash I'm happy to invest some time into looking into@juruen's comment but in your branch.

SamMorrowDrums reacted with heart emoji

@SamMorrowDrums
Copy link
Collaborator

@rfearing thank you, really appreciate this too - I was just worried it landed into main without a final pass. There's a bit of a rebase involved to get it into main too :-D

Bu also happy to take a look at the next branch, I just missed it wasn't a merge to main!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@sridharavinashsridharavinashsridharavinash approved these changes

@juruenjuruenAwaiting requested review from juruen

@SamMorrowDrumsSamMorrowDrumsAwaiting requested review from SamMorrowDrums

@williammartinwilliammartinAwaiting requested review from williammartin

@tobytobyAwaiting requested review from toby

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@rfearing@juruen@SamMorrowDrums@sridharavinash

[8]ページ先頭

©2009-2025 Movatter.jp