I have a simple question but unfortunately, I couldn’t find it searching! And I am a newbie in CircleCI and coding so feel free to explain plain things.
I am using config.yml version 2 for our automated deployment using CircleCI integrated with Bitbucket. I want to know how can I recognize which events from Bitbucket triggered the pipeline? for example was it Push, PR update, or Merge? I have already selected my desired webhooks in the Bitbucket setting.
So in simple words, I need to do something like this in my config.yml:
- run: name: Which-event-triggered command: | if [ $event == "PR_updated" ]; then ./an_script.sh else ./another_script.sh fi
Any bits of help or ideas would be really appreciated.