Github Trigger only for "PR opened or pushed to" event
K
Keshav
Current behaviour
The CircleCI pipeline is triggered by GitHub on three events: PR opened/updated, push to default branch, and tag push. To clone the correct frontend branch, we use pipeline.event.github.pull_request.head.ref — this works fine for PR events but is unavailable when a PR is merged (i.e. a push to the default branch), causing the pipeline to fail.
What we want
Restrict the GitHub trigger to PR events only (PR opened and pushed to an open PR), so the pipeline never starts on a merge to the default branch and the pull_request.head.ref parameter is always available.