What I’m trying to do is actually see if an array of label names is one of the labels in a PR. I know that I can get an array of the labels in the PR using
github.event.pull_request.labels.*.name. In one of my matrix, I have an array of required labels. For example:
matrix: required-labels: [ 'label1', 'label2' ]
Some approaches, using
bash I thought of were iterating both arrays or trying to use
I’m having problem converting
github.event.pull_request.labels.*.name to bash array. The problem here seems to be it converts to something that looks like
[ "some-label" ]
Which causes problems like
some-label being trying to be executed as a command.
I thought I could use
contains, but it doesn’t seem like I can use replacement in bash.
For example something like the following
$label doesn’t work. Is there any mechanism to do this at all?
Or any suggestions on how I can convert
github.event.pull_request.labels.*.name to a bash array?