Currently there is no straightforward way to detect the event type that triggered the pipeline.
The closest variable provided is CF_BUILD_TRIGGER but it does not provide information about the event itself such as whether the pipeline was triggered by a pull request, by a commit, by a tag, etc.
I think an additional variable should be provided with more information.