fix(ci): handle merge_group events in change detection (#2839)
The change detection script only handled pull_request and push events.
For merge_group events (used by GitHub merge queues), github.event.before
is empty, causing the diff base to be unset and jobs to be skipped or fail.
Use github.event.merge_group.base_sha as the diff base for merge_group
events so CI runs correctly when PRs are added to the merge queue.