-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
There was an error generating sponsors. ❌ - Cannot read 'viewer' of undefined #450
Comments
Are you fetching as a user or an organization? The two scopes I've provided my action are If you are fetching sponsors as an organization account, you must provide the action with |
Hello @JamesIves I'm fetching as a user. Still not sure what's causing that. It only started happening after the new release. Before that (probably 5 days ago) it was working just fine (with same yml and PAT) |
Can you share the permission levels of your PAT? Is it scoped as |
Share the permission levels (how?) That's the only selected scope for my PAT. I do also have an organization (But why should it matter, The repository is in my user profile, Not in organization) |
By sharing I meant providing screenshots of the permission levels. The read:org permission is required as the action requests Organization in the GraphQL query, this is done so if an organization user sponsors you it will show up in your list of sponsors, the bug this fixed was causing organization sponsors to a user account to not show up. If you're trying to populate a list of sponsors as an organization account you'd provide the same permission scope but you'd also set the organization parameter in the workflow to true. The action requires read only permission to user and org even as a user account. Can you please try selecting read:user and read:org and try again? |
Yes, That worked! Apparently, the action now needs both scopes. Thank you. |
I'm glad that worked! Pinning for visibility. |
This should definitely be highlighted in docs and in error message! |
It is mentioned several times 😅 |
Failed to generate sponsors
the previous version was working fine, now i get this error after new release :
Error: There was an error generating the updated file: Cannot read property 'viewer' of undefined ❌
Here's my workflow yml
File :
.github/workflows/sponsors.yml
PAT has a scope
user:read
as well.Is this a bug in new release, or I'm doing something wrong here?
The text was updated successfully, but these errors were encountered: