Passing build variables to commands

Hey @Benjamin,
you are right build.pull_request.labels is primary designed to use if (conditional) logic, not for direct use in commands. There are some ways to work around, depends on your needs.
Basically, you can set metadata based on the build.pull_request.labels condition, and then reference that metadata in your commands. We have some similar answer on our community forum, please check here.

But if you need the labels directly in your command you can fetch them using the GitHub API.

Thanks,

1 Like