If they do seem to be attacking the drone, remember it is best to fly straight up then away rather than descend immediately. It's much harder for birds to attack an ascending target than to dive on them.
Pigeons aren't predators and don't attack other birds, don't defend a home range, and by extension have no reason to attack a drone. They're excellent fliers in close quarters flocks and I've never heard of a mid-air collision between pigeons.
Hawks, falcons, eagles and such are a different concern.
Not sure of any ways to repel birds exactly. But so far in my experience, the Air 2s seems to be big/loud enough to deter attacks. I've had way more birds go after my Mini 2. Just try to get into the habit of watching their behavior if you're flying near birds. If you see any approach and start circling they could be getting ready to attack. Best thing to do is switch to sport mode and ascend straight up asap. Birds can't fly straight up like that so typically that'll be enough to scare them off or at least give you the chance to escape.