The Mechanic is not an official role - it's more a matter of "Running around, fixing whatever breaks".
Any occupant of a starship can use their turn to perform repairs.
The Engineer has Advantage on Repair rolls.
Repairs
You spend 2 consecutive turns trying to repair the ship. You make an INT Test on your second turn. Boosts the Ship Usage Die by one tier. It cannot be repaired to more than one tier below the normal maximum. An astromech reduces these repairs to 1 turn, and gives Advantage on the INT Test.