Fixing an issue when running the step in a build triggered by the trigger-bitrise-workflow step. The failure was caused by dereferencing a nil variable (pull_request_id in the build parameters).
Example error message:
Getting current build Build info: panic: runtime error: invalid memory address or nil pointer dereference
Thanks @daviswalker !