Comments (10)
Update, I actually just received a notification in Sparks from one of my own repos. Maybe it has to do with the repos I'm working with being private? 💭
from forge-sparks.
Update, I actually just received a notification in Sparks from one of my own repos. Maybe it has to do with the repos I'm working with being private? 💭
Maybe. The issue seems to be referencing this line:
forge-sparks/src/forges/github.js
Line 95 in 801dbd6
Meaning that the _getSubjectInfo
function is falling to get an url for some type of notification that you're getting.
In the meantime I need to figure out how to debug your issue. In github what kind of notifications are you getting? Like issues, pull requests, discussions, etc.
from forge-sparks.
All of them are pull request related, most are pull request review requests and some pull request comments.
from forge-sparks.
Can you sent me by mail ([email protected]) (or here if you don't mind making it public) the output of calling this in your terminal:
curl https://api.github.com/notifications -H "Authorization: token YOUR_TOKEN_HERE"
It should print the raw JSON Forge Sparks is getting.
from forge-sparks.
Yes for sure, I've redacted the name just to be on the safe side: (the missing notification is returned from the api call it seems)
[
{
"id": "7258350380",
"unread": true,
"reason": "author",
"updated_at": "2023-08-02T17:25:15Z",
"last_read_at": "2023-08-02T17:05:19Z",
"subject": {
"title": "Suddenly stopped receiving new notifications",
"url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/issues/10",
"latest_comment_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/issues/comments/1662656052",
"type": "Issue"
},
"repository": {
"id": 566851011,
"node_id": "R_kgDOIcl1ww",
"name": "forge-sparks",
"full_name": "rafaelmardojai/forge-sparks",
"private": false,
"owner": {
"login": "rafaelmardojai",
"id": 6210397,
"node_id": "MDQ6VXNlcjYyMTAzOTc=",
"avatar_url": "https://avatars.githubusercontent.com/u/6210397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rafaelmardojai",
"html_url": "https://github.com/rafaelmardojai",
"followers_url": "https://api.github.com/users/rafaelmardojai/followers",
"following_url": "https://api.github.com/users/rafaelmardojai/following{/other_user}",
"gists_url": "https://api.github.com/users/rafaelmardojai/gists{/gist_id}",
"starred_url": "https://api.github.com/users/rafaelmardojai/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rafaelmardojai/subscriptions",
"organizations_url": "https://api.github.com/users/rafaelmardojai/orgs",
"repos_url": "https://api.github.com/users/rafaelmardojai/repos",
"events_url": "https://api.github.com/users/rafaelmardojai/events{/privacy}",
"received_events_url": "https://api.github.com/users/rafaelmardojai/received_events",
"type": "User",
"site_admin": false
},
"html_url": "https://github.com/rafaelmardojai/forge-sparks",
"description": "Get git forges notifications",
"fork": false,
"url": "https://api.github.com/repos/rafaelmardojai/forge-sparks",
"forks_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/forks",
"keys_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/teams",
"hooks_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/hooks",
"issue_events_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/issues/events{/number}",
"events_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/events",
"assignees_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/assignees{/user}",
"branches_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/branches{/branch}",
"tags_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/tags",
"blobs_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/statuses/{sha}",
"languages_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/languages",
"stargazers_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/stargazers",
"contributors_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/contributors",
"subscribers_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/subscribers",
"subscription_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/subscription",
"commits_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/contents/{+path}",
"compare_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/merges",
"archive_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/downloads",
"issues_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/issues{/number}",
"pulls_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/pulls{/number}",
"milestones_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/milestones{/number}",
"notifications_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/labels{/name}",
"releases_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/releases{/id}",
"deployments_url": "https://api.github.com/repos/rafaelmardojai/forge-sparks/deployments"
},
"url": "https://api.github.com/notifications/threads/7258350380",
"subscription_url": "https://api.github.com/notifications/threads/7258350380/subscription"
},
{
"id": "7259767060",
"unread": true,
"reason": "review_requested",
"updated_at": "2023-08-02T15:29:51Z",
"last_read_at": "2023-08-02T15:30:40Z",
"subject": {
"title": "Refactor selector",
"url": "https://api.github.com/repos/redactedOrg/registration-funnel/pulls/351",
"latest_comment_url": null,
"type": "PullRequest"
},
"repository": {
"id": 529175093,
"node_id": "R_redacted",
"name": "registration-funnel",
"full_name": "redactedOrg/registration-funnel",
"private": true,
"owner": {
"login": "redactedOrg",
"id": 97439011,
"node_id": "O_redacted",
"avatar_url": "https://avatars.githubusercontent.com/u/97439011?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/redactedOrg",
"html_url": "https://github.com/redactedOrg",
"followers_url": "https://api.github.com/users/redactedOrg/followers",
"following_url": "https://api.github.com/users/redactedOrg/following{/other_user}",
"gists_url": "https://api.github.com/users/redactedOrg/gists{/gist_id}",
"starred_url": "https://api.github.com/users/redactedOrg/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/redactedOrg/subscriptions",
"organizations_url": "https://api.github.com/users/redactedOrg/orgs",
"repos_url": "https://api.github.com/users/redactedOrg/repos",
"events_url": "https://api.github.com/users/redactedOrg/events{/privacy}",
"received_events_url": "https://api.github.com/users/redactedOrg/received_events",
"type": "Organization",
"site_admin": false
},
"html_url": "https://github.com/redactedOrg/registration-funnel",
"description": null,
"fork": false,
"url": "https://api.github.com/repos/redactedOrg/registration-funnel",
"forks_url": "https://api.github.com/repos/redactedOrg/registration-funnel/forks",
"keys_url": "https://api.github.com/repos/redactedOrg/registration-funnel/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/redactedOrg/registration-funnel/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/redactedOrg/registration-funnel/teams",
"hooks_url": "https://api.github.com/repos/redactedOrg/registration-funnel/hooks",
"issue_events_url": "https://api.github.com/repos/redactedOrg/registration-funnel/issues/events{/number}",
"events_url": "https://api.github.com/repos/redactedOrg/registration-funnel/events",
"assignees_url": "https://api.github.com/repos/redactedOrg/registration-funnel/assignees{/user}",
"branches_url": "https://api.github.com/repos/redactedOrg/registration-funnel/branches{/branch}",
"tags_url": "https://api.github.com/repos/redactedOrg/registration-funnel/tags",
"blobs_url": "https://api.github.com/repos/redactedOrg/registration-funnel/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/redactedOrg/registration-funnel/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/redactedOrg/registration-funnel/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/redactedOrg/registration-funnel/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/redactedOrg/registration-funnel/statuses/{sha}",
"languages_url": "https://api.github.com/repos/redactedOrg/registration-funnel/languages",
"stargazers_url": "https://api.github.com/repos/redactedOrg/registration-funnel/stargazers",
"contributors_url": "https://api.github.com/repos/redactedOrg/registration-funnel/contributors",
"subscribers_url": "https://api.github.com/repos/redactedOrg/registration-funnel/subscribers",
"subscription_url": "https://api.github.com/repos/redactedOrg/registration-funnel/subscription",
"commits_url": "https://api.github.com/repos/redactedOrg/registration-funnel/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/redactedOrg/registration-funnel/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/redactedOrg/registration-funnel/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/redactedOrg/registration-funnel/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/redactedOrg/registration-funnel/contents/{+path}",
"compare_url": "https://api.github.com/repos/redactedOrg/registration-funnel/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/redactedOrg/registration-funnel/merges",
"archive_url": "https://api.github.com/repos/redactedOrg/registration-funnel/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/redactedOrg/registration-funnel/downloads",
"issues_url": "https://api.github.com/repos/redactedOrg/registration-funnel/issues{/number}",
"pulls_url": "https://api.github.com/repos/redactedOrg/registration-funnel/pulls{/number}",
"milestones_url": "https://api.github.com/repos/redactedOrg/registration-funnel/milestones{/number}",
"notifications_url": "https://api.github.com/repos/redactedOrg/registration-funnel/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/redactedOrg/registration-funnel/labels{/name}",
"releases_url": "https://api.github.com/repos/redactedOrg/registration-funnel/releases{/id}",
"deployments_url": "https://api.github.com/repos/redactedOrg/registration-funnel/deployments"
},
"url": "https://api.github.com/notifications/threads/7259767060",
"subscription_url": "https://api.github.com/notifications/threads/7259767060/subscription"
}
]
from forge-sparks.
So the "redactedOrg" notification is the one failing right?
Now can you show me the response to:
curl https://api.github.com/repos/redactedOrg/registration-funnel/pulls/351 -H "Authorization: token YOUR_TOKEN_HERE"
from forge-sparks.
Ah it's returning this:
{
"message": "Not Found",
"documentation_url": "https://docs.github.com/rest/pulls/pulls#get-a-pull-request"
}
However I figured out if I enable the full repo
scope on the access token I do get a response! And the app now shows the notifications! So I guess all that's needed to fix this is document in preferences panel that full repo
scope is needed?
from forge-sparks.
Right, so the problem is when Forge Sparks is trying to get more info about the subject it is not longer sung the notifications endpoint.
So I guess all that's needed to fix this is document in preferences panel that full repo scope is needed?
Yes, but the app shouldn’t fail so badly in this scenarios, the notification should be processed successfully but with less details.
from forge-sparks.
@Siilwyn pushed a fix to have a fallback url for the notification when we don't have access to the repo. And also documented the need of the full repo
scope.
Would you be able to test?
from forge-sparks.
Yes LGTM! Cheers 🎉
from forge-sparks.
Related Issues (20)
- Stuck at Loading HOT 10
- Error when adding Gitea account with access token that lacks `read:user` permission HOT 6
- [bug] Keep Running in Background shows "Request Failed" HOT 12
- [feat] Implement interacting with each notification separately HOT 2
- Document supported notification types
- [Flatpak] Can't add account / access secrets store
- Jira support
- some github notifications have incorrect links HOT 2
- [ Feature request ] Codeberg HOT 7
- [feat] Notification tools by using Github notification_referrer_id HOT 1
- Allow notification filtering based on org/project
- Cannot add GitHub and Codeberg profile HOT 8
- Option to keep read notifications HOT 3
- TypeScript HOT 2
- Display GitHub Status HOT 1
- Too many notification fill up the whole screen at launch HOT 2
- `Ctrl+a` keyboard shortcut overrides selecting all text in a text field HOT 2
- It's possible to open many Accounts windows HOT 1
- Memory leaks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forge-sparks.