feat: #168395616 - automation of registry entry #520
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this MR, we demonstrate the usage of Google Sheets as an alternative registry storage, instead of the static
registry.json
. This is so that we can do some fun stuff (automation, etc.) with Google Sheets.User story
❗ 29 Jul edit: We're waiting for general availability of FormSG webhooks
Key changes
In feat: automated registry verify#7, added
googleApiKey
intoOpenCertsVerificationManagerOptions
verify
now needs to havegoogleApiKey: GOOGLE_API_KEY
passed inPublicly inspectable Google Sheets registry: https://docs.google.com/spreadsheets/d/1nhhD3XvHh2Ql_hW27LNw01fC-_I6Azt_XzYiYGhkmAU/edit#gid=103906216
Discovery
Things to note (in case anyone else faces the same issues):
Please use 2 Google API keys: one set to no restrictions to be used by Jest (i.e. for console), another with HTTP referrer restrictions to be used by the web. The key with the web restriction will not work in the command-line
opencerts-website
usesverify#feat/automated-registry
- ifverify#feat/automated-registry
is force pushed, mustnpm uninstall github.com/OpenCerts/verify.git#feat/automated-registry
then reinstall againwhen
npm install
ing git branches, make sure the branch has thedist
filesDependencies like
verify
do not access environment variables, must passgoogleApiKey: GOOGLE_API_KEY
via optionsTodo