optimism
optimism copied to clipboard
Automatically regenerate the deployment README whenever a deployment changes
Is your feature request related to a problem? Please describe.
We have a folder named deployments that holds the deployment artifacts for each of our deployments. Within this folder is a README that is generated based on the contents of the sub-folders within the deployments folder. We generate this README by running yarn autogen:markdown within the contracts repository. Unfortunately, we often forget to run this command and deployments are merged without also updating the README. I would like to prevent this from happening.
Describe the solution you'd like I would like to see some mechanism for automatically generating the README whenever the deployments are updated. I could see this being done in one of four ways:
- Some pre-commit hook that yells at you if a deployment folder was changed but the README was not also updated.
- An update to CI that yells at you if a deployment folder was changed but the README was not correctly updated.
- An update to CI that will automatically push a commit to the branch with the updated README whenever a deployment changes.
- An update to CI that will create a PR with the updated README whenever a deployment changes (basically the same as 3 but pull-based instead of push-based).
I'm leaning towards (2) for its simplicity.
Describe alternatives you've considered We could also just try to train the culture of looking for an updated README whenever a new deployment PR is opened, but that's still prone to human error. I like using software to eliminate chances for human error.
cc @tynes @snario would be great to have your input here.
#2373 is my proposed fix to this problem. If a deployment is changed but the markdown files aren't updated then CI will throw an error. We don't update our deployments very often so this shouldn't have any significant impact on our development speed.