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

Automatic Population of Permits #368

Open
0x4007 opened this issue Jan 16, 2025 · 2 comments
Open

Automatic Population of Permits #368

0x4007 opened this issue Jan 16, 2025 · 2 comments

Comments

@0x4007
Copy link
Member

0x4007 commented Jan 16, 2025

  • Using our metadata system we can easily GraphQL query for permits.
  • import the "login with github" button from work.ubq.fi
  • GraphQL query with authentication for private repos.
  • limit to previous 100 results or whatever is the max that GraphQL can return in a single shot
  • check if they have already been claimed, if so, discard
  • if unclaimed permits are found, import into the UI (we should already support multiple permits to be loaded in the UI)
> <!-- UbiquityOS - https://github.com/ubiquity-os-marketplace/text-conversation-rewards/actions/runs/12800722021 - GithubCommentModule.transform - 3b66e4af1489bb5f7beab3e8fa556577bfa50ec1 - @gentlementlegen
> {
>   "caller": "GithubCommentModule.transform"
> }
> -->
> 


So now we should be able to go directly to pay.ubq.fi and it should automatically populate the permits.

If we pass in the permit directly (as we do normally) then it should just load the permit as it currently does.

The automatic population should add the permits to the queue after and only if logged in.


I reviewed the updated metadata and we should search for

"UbiquityOS - GithubCommentModule.transform"

@zugdev
Copy link
Contributor

zugdev commented Jan 16, 2025

there is no upper bound to graphql query return count, its up to us to set that limit actually

@gentlementlegen
Copy link
Member

The order got changed after you request:
ubiquity-os/plugin-sdk#46

There is a graphql limit to a 100 nodes, will crash beyond that (you need pagination). Also, sending more that a 100 nodes in a query also crashes the request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants