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

Fetch permits #383

Draft
wants to merge 19 commits into
base: development
Choose a base branch
from
Draft

Fetch permits #383

wants to merge 19 commits into from

Conversation

zugdev
Copy link
Contributor

@zugdev zugdev commented Feb 20, 2025

Resolves #368

Requires ubiquity-os-marketplace/text-conversation-rewards#284

At this stage of the PR I have the following set of features:

  1. GitHub Authentication
  2. Reads from URL if present
  3. Fetches permits from Supabase if authenticated and no URL permits
  4. Renders the ones which have all the proper data in Supabase

For the permits generated previous to ubiquity-os-marketplace/text-conversation-rewards#284 : I will either write a script to backfill the NULL columns in Supabase, but preferably I will scrape from GitHub issue given that location is present for most permits.

update: I've decided to go with the backfill on the backend so this PR requires ubiquity-os-marketplace/text-conversation-rewards#284.

@zugdev zugdev marked this pull request as draft February 20, 2025 04:57
Copy link
Contributor

Unlisted dependencies (1)

Filename unlisted
static/scripts/rewards/render-transaction/fetch-permits.ts @octokit/rest

@ubiquity-os-deployer
Copy link

ubiquity-os-deployer bot commented Feb 20, 2025

Copy link
Contributor

github-actions bot commented Feb 20, 2025

Preview Deployment
ed6673372a9905326aba97458cc9311ce0183967

@zugdev
Copy link
Contributor Author

zugdev commented Feb 22, 2025

As of now, what allows us to fetch permits is this RLS rule.

image

However the table partners, for example, doesn't have that setup.

image

In my fork of the DB I will create the same rule, however someone with better context can decide if it's appropriate in production.

Copy link
Contributor

ubiquity-os bot commented Feb 26, 2025

@zugdev, this task has been idle for a while. Please provide an update.

@zugdev
Copy link
Contributor Author

zugdev commented Feb 27, 2025

Yo @EresDev any idea why the Run unit tests for pages functions / testing workflow fails here?

@EresDev
Copy link
Contributor

EresDev commented Feb 27, 2025

Yo @EresDev any idea why the Run unit tests for pages functions / testing workflow fails here?

Similar error when we had problem with yarn version. Try regenerating yarn.lock and committing with correct yarn version.

@zugdev
Copy link
Contributor Author

zugdev commented Feb 27, 2025

All broken now 👀

node: 20.10.0
yarn: 1.22.22

@EresDev
Copy link
Contributor

EresDev commented Feb 27, 2025

I see your yarn changes locked versions in yarn.lock. Updates them to new allowed versions. This was same problem before.

Grok's response seems helpful.

@zugdev zugdev mentioned this pull request Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatic Population of Permits
2 participants