You don't even need any diodes.
Change resistor values to your preference. Keep R1/(R2||R3) small enough to make sure the common point still above VIH(MIN) when one of the IO stuck low. Beware of "always on" internal pullup like STM32's 40kΩ on reset pin, picking a too high value for R2 and R3 may cause IO pin to not go low enough below VIL(MAX) when needed.
It was for reset circuit so you probably also don't need the caps, although it's still nice to have for debounce.