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

Add fetch for categories json on validation #215

Merged

Conversation

adamgoth
Copy link
Collaborator

@adamgoth adamgoth commented Nov 1, 2021

Link to Clubhouse story

https://app.shortcut.com/dux-makerdao/story/481/update-categories-in-the-validator-function-for-when-polls-are-created

What does this PR do?

When validating poll markdown (polling/create), this update will now fetch categories dynamically from the community repo. If it fails, it will fallback to the hardcoded categories we have been relying on.

Steps for testing:

Go to polling/create, ensure validation works

Add a GIF:

@shortcut-integration
Copy link

@vercel
Copy link

vercel bot commented Nov 1, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/dux-core-unit/governance-portal-v2/88fkQKwM5pFLtSnrkhwUQzCgQ7mj
✅ Preview: https://governance-portal-v2-git-chore-sc-481updat-6a2f05-dux-core-unit.vercel.app

@codecov
Copy link

codecov bot commented Nov 1, 2021

Codecov Report

Merging #215 (32be1c3) into develop (f34f561) will decrease coverage by 0.00%.
The diff coverage is 38.46%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #215      +/-   ##
===========================================
- Coverage    38.19%   38.18%   -0.01%     
===========================================
  Files           62       62              
  Lines         1605     1608       +3     
  Branches       505      503       -2     
===========================================
+ Hits           613      614       +1     
- Misses         985      987       +2     
  Partials         7        7              
Impacted Files Coverage Δ
pages/account.tsx 77.41% <ø> (ø)
pages/executive/[proposal-id].tsx 0.00% <ø> (ø)
pages/polling/[poll-hash].tsx 0.00% <0.00%> (ø)
lib/maker/index.ts 31.14% <100.00%> (ø)
pages/polling.tsx 61.45% <100.00%> (+0.40%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0d98ee...32be1c3. Read the comment docs.

modules/polling/helpers/validator.ts Outdated Show resolved Hide resolved
…al-v2 into chore/sc-481/update-categories-in-the-validator-function
@rafinskipg rafinskipg mentioned this pull request Nov 2, 2021
@adamgoth adamgoth merged commit a6a605d into develop Nov 2, 2021
@adamgoth adamgoth deleted the chore/sc-481/update-categories-in-the-validator-function branch November 2, 2021 13:07
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.

2 participants