Skip to content
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

[FEAT]: notifications: filter done/undone #2656

Closed
1 task done
antonengelhardt opened this issue Apr 11, 2024 · 2 comments
Closed
1 task done

[FEAT]: notifications: filter done/undone #2656

antonengelhardt opened this issue Apr 11, 2024 · 2 comments
Labels
Status: Triage This is being looked at and prioritized Type: Feature New feature or request

Comments

@antonengelhardt
Copy link

antonengelhardt commented Apr 11, 2024

Describe the need

Hello,

the GitHub Raycast Extension has a command (Notifications) to fetch all notifications for the user using the listNotificationsForAuthenticatedUser() endpoint:

Screenshot-Arc-006646@2x

const {
    data,
    isLoading,
    mutate: mutateList,
  } = useCachedPromise(async () => {
    const response = await octokit.rest.activity.listNotificationsForAuthenticatedUser({ all: true });
    return response.data;
  });

When setting the all-parameter to true, it returns all notifications (including done ones). When setting it to false, only unread notifications are returned.

The GitHub Website groups notifications depending if they're done or undone. Additionally, a filter can display only the unread notifications:

Screenshot-Arc-006648@2x

@tom-sherman proposed to follow the GitHub style in a recently opened issue. Following the Github style would mean that the extension would have to group the notifications by undone/done and highlight unread ones, which is currently impossible, because there is no way to tell if a notification is done or not.

My proposal is that either

  1. the notification object gets a done attribute of boolean type (then we can partition the notifications ourselves) or
  2. that the listNotificationsForAuthenticatedUser() endpoint gets more filters e.g showDone (bool), showRead (boolean).

Thanks for considering. Cheers.

SDK Version

v3.1.2

API Version

v20

Relevant log output

-

Code of Conduct

  • I agree to follow this project's Code of Conduct
@antonengelhardt antonengelhardt added Status: Triage This is being looked at and prioritized Type: Feature New feature or request labels Apr 11, 2024
Copy link

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@wolfy1339
Copy link
Member

That is out of scope for this package. We only provide wrappers around the GitHub API

Feel free to submit this as a feature request to GitHub for their API.
https://github.com/orgs/community/discussions/categories/api-and-webhooks

@wolfy1339 wolfy1339 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage This is being looked at and prioritized Type: Feature New feature or request
Projects
Archived in project
Development

No branches or pull requests

2 participants