Open eric-burel opened 11 months ago
Related to #297 Now the methods that loads the survey either locally or distantly will also get the repo SHA It's not yet used except in the logs for debugging purpose, next step is adding it to the GraphQL schema so surveyform/surveyadmin can query it
Then we may check if there is a mismatch with the distant repo and warn user
To get the latest commit of a distant repo: "https://api.github.com/repos/devographics/surveys/commits/main" (see https://stackoverflow.com/questions/45726013/how-can-i-get-last-commit-from-github-api)
To get the latest commit of a local repo:
(see https://stackoverflow.com/questions/949314/how-do-i-get-the-hash-for-the-current-commit-in-git)
It should probably throw in dev, and warn in prod.