I'd like to be able to pipe file contents from a property mapping like
readme: file://README.md
to a JQ expression.
For example, since scorecards can't currently evaluate markdown fields, I'd like to add a
has_readme
boolean to my git repository blueprint, mapped like:
has_readme: (file://README.md // null) != null
For this case, with a GitHub integration, my workaround is to use
kind: file
mapping rules to do this, since they can read file
.content
. However, I need a separate mapping rule for _each file_ I need to evaluate in the repo, meaning the sync has to scan every repo in my organization once for each file I need to read. In my case, each file mapping rule takes 10+ minutes to resync, and I need 4 of them so far, adding 40-50 minutes to a full repository resync. Reading files probably isn't free, but maybe it would take less time to do it while traversing the whole list of repositories list once, instead? And it would clean up my mapping.
NOTE: This is a duplicate of "File ingestion - JQ manipulation", with the motivation of cleaning up mappings and reducing resync time.