make rebuildstaging merge details not crash on merge commit
reformat other branches message for rebuildstaging merge details

and only include branches that are in staging.yaml
Merge pull request #4758 from dimagi/better-merge-details

Better merge details