The modulemd-generate-macros script expects, that some mandatory attributes that are described as AUTOMATIC, are filled in the modulemd YAML file (such as name, stream, version, context, and arch). Otherwise, it fails, please see
https://github.com/rpm-software-management/modulemd-tools/tree/master/modulemd-generate-macros#wrong-modulemd-yaml-file
We can add a feature checking whether the passed modulemd YAML file is a part of a GIT repository and if yes, generating those values (well, at least some of them).