potiuk commented on pull request #10380: URL: https://github.com/apache/airflow/pull/10380#issuecomment-679254618
It's there. Standalone bash `pre-commit` script that will only do anything if any of the .mermaid files changed vs. hashes stored next to them. That "anything" is installing mermaid in a separate node virtualenv (in ,build/mermaid folder - the ".build" folder is already all but ignored due to being used by breeze). It will install mermaid there, first time when it is run and keep on reusing it every next time it is run. If there is no change in those files or if you have no npm installed, the pre-commit will silently succeed. If you do not touch any of those files, it's a no-op - both for the developers and for the CI. First of all pre-commit will be skipped if those files are not changed, secondly - even if you run pre-commit with `--all-files` those files will be skipped as the .md5 hashes will not change for them. And even if they do, but you have npm, they will be silently ignored. I even made sure not to commit the mermaid-config.json - it is dynamically generated by the self-contained bash script. I expect this script to never change (unless we want to update colors/fonts etc. in the generated mermaid files). ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
