sigridci
sigridci copied to clipboard
Support multiple team/supplier names in metadata for GitHub Marketplace
Suggested by @bruno-oliveira. We support 4 options for supplying metadata. The 4th option is based on providing input parameters to the GitHub Action, and is typically used by people that use Sigrid CI directly from GitHub Marketplace. Because those input parameters are strings, we don't currently allow people to use multiple values for the 2 metadata fields that accept arrays: supplierNames
and teamNames
.
We need to investigate if lists/arrays are nowadays supported as input parameters. If not, we can still use poor man's lists using the notation aap,noot
, but we need to check.
In sigridci.py
there is already a hardcoded interpretation of teamNames that makes is difficult to supply multiple values:
https://github.com/Software-Improvement-Group/sigridci/blob/7e0a9f0726992c80fdf87433ea58c830b4c52196/sigridci/sigridci.py#L648-L652
One hack I now use is to supply a string with quoted values that misses the quotes at the end: team A", "team B", "team C
which will end up as ["team A", "team B", "team C"]
in the yaml that will get uploaded.
A cleaner alternative is to make a separate call to the API for which it is easier to provide a list.
At the moment a comma-separated list is still considered best-practice for GitHub Actions, which could also work on the commandline with environment variables.