isomerpages / isomercms-backend

A static website builder and host for the Singapore Government
5 stars 1 forks source link

feat(formsg): clone repo on webhook trigger from forms #947

Closed seaerchin closed 1 year ago

seaerchin commented 1 year ago

Problem

See here

Solution

  1. add an endpoint at /formsg/clone-repo
  2. add handler to clone at that endpoint based on the form's reply. The form has validation build in (email domain must be .open.gov.sg and must verify email + repo is a required field)

New env vars

Notes

this was tested locally through updating the EFS_VOL_PATH + originUrl (use https instead of ssh as i was facing auth issues) and found working Screenshot 2023-09-26 at 7 01 04 PM Screenshot 2023-09-26 at 7 01 37 PM

seaerchin commented 1 year ago

This PR has quite a number of infra moving parts - eg.

  1. formsg
  2. efs
  3. be

Could we do a quick sanity check testing on stg before release? since this is internal use using post deploy testing is also fine, thoughts?

tbh, i think the only difference between testing on staging vs not, is that the clone step takes place in a different environment (with all of the annoyances that entails); i think i'll just do post-deploy cos it's not open to public anyway.